reset_circuit

StarTopologyGateSet.reset_circuit(qubits)

Build the circuit resetting these qubits to \(|0\rangle\).

Every reset sits between two barriers over the whole register, so no gate moves across it. Without spam_qubits, the circuit resets the qubits asked for. With them, the device resets the group at once: resetting any of its qubits resets all of them. A qubit outside the group gets \(|0\rangle\) from it. The group is reset, one of its qubits is exchanged with that qubit, and the group is reset again.

That exchange overwrites the group, so resetting a qubit outside it means resetting the group as well. Those qubits have to be in qubits too.

lower_resets() rewrites a circuit’s own reset instructions into this shape.

Parameters:

qubits (int | Iterable[int]) – Qubit to reset, or several of them.

Return type:

Any

Returns:

A logical circuit over the gate set’s qubits.

Raises:

QuasarError – If resetting a qubit outside spam_qubits would overwrite one that was not asked for.