lower_resets

CRXGateSet.lower_resets(circuit)

Rewrite a circuit’s resets as the resets the device performs.

A circuit asks for \(|0\rangle\) with reset, which Qiskit writes one qubit at a time. Consecutive resets, with any barriers among them, are lowered as one run, by reset_circuit(). Resets separated by a gate are separate runs.

With spam_qubits, the group is the granularity the device offers. Resetting one of its qubits resets the whole group, and the returned circuit says so: a reset on qubit 0 of a pair comes back as a reset of both.

The result is a logical circuit, and lowering it again returns it unchanged. compile() runs this step itself, and lowers the gates between the resets to natives.

Parameters:

circuit (Any) – Circuit to rewrite. Returned unchanged when it holds no reset.

Return type:

Any

Returns:

The circuit with each run of resets replaced by reset_circuit().

Raises:

QuasarError – If a run resets a qubit outside spam_qubits without the group.