Known Issues
Classically Controlled Gates (Mid-Circuit Measurement With Feedback)
Status: workaround available; fix scheduled with the vendor (IQM). Last updated: 12/11/26
What the Feature Is
VLQ supports classically controlled gates (also called real-time feedback or feed-forward):
a qubit is measured in the middle of a circuit (mid-circuit measurement),
and a later gate is applied only if the measurement result is 1.
In Qiskit this is written with if_test, and on IQM hardware it is compiled to the cc_prx gate:
qc.measure(0, m[0]) # mid-circuit measurement -> classical bit m
with qc.if_test((m[0], 1)): # classical condition
qc.x(1) # applied only when m = 1Typical uses: active qubit reset, error-correction protocols, teleportation.
Symptom
Such circuits are accepted and run without any error message, but the conditional gate does not follow the current measurement. The results look random (about 50%) instead of following the measured value. Simple circuits without mid-circuit measurement are not affected.
Cause
Each run of a circuit is called a shot; a job repeats the circuit for many shots.
The measurement result needs a short time (a few hundred nanoseconds) to travel
from the readout electronics to the electronics that drive the target qubit.
On VLQ, the system currently waits slightly too short (a timing setting, control_delays),
so the conditional gate is decided before the new result arrives and uses the result from the previous shot.
This is a configuration issue in the vendor’s control software, not a user error, and the qubits themselves work correctly.
Workaround
Add a short delay after the mid-circuit measurement, before the conditional gate, so that the result has time to arrive.
Case 1: conditional gate on the measured qubit itself (e.g. active reset)
qc.measure(0, m[0])
qc.delay(0.5, 0, unit="us") # wait 0.5 µs on the measured qubit
with qc.if_test((m[0], 1)):
qc.x(0)Verified on QB1: the qubit ends in 0 on 97.5% of shots (about 50% without the delay).
Case 2: conditional gate on another qubit
qc.measure(0, m[0])
qc.barrier() # make the delay start after the measurement
qc.delay(0.5, 1, unit="us") # wait 0.5 µs on the target qubit
with qc.if_test((m[0], 1)):
qc.x(1)Verified on QB1 → QB2: correct behaviour from 0.4 µs of delay.
Put the delay on the right qubit
The delay must act on the qubit that receives the conditional gate.
In a single-qubit circuit, qc.delay(..., 1, ...) refers to a qubit that does not exist;
in a multi-qubit circuit it may delay a qubit that is not involved.
Use a barrier when the target is another qubit
Without qc.barrier(), the compiler may start the delay at the beginning of the circuit,
in parallel with the measurement, so most of it has no effect.
Without a barrier, about 1.5–2 µs of delay is needed instead of 0.5 µs.
Cost of the delay
While waiting, qubits in superposition slowly lose their quantum information (decoherence, characterised by the time T2, about 11 µs on VLQ). A 0.5 µs delay costs roughly 4% coherence for such qubits. This is fine for testing; for production results, prefer waiting for the fix.
How to Check That Feedback Works
Run the circuit below. If feedback works, the two measured bits are equal (results 0 0 and 1 1, about 50% each).
If they look random, the issue is present.
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
q = QuantumRegister(2); m = ClassicalRegister(1, "m"); f = ClassicalRegister(1, "f")
qc = QuantumCircuit(q, m, f)
qc.h(q[0]) # put qubit 0 in superposition (random 0/1)
qc.measure(q[0], m[0])
with qc.if_test((m[0], 1)):
qc.x(q[1]) # copy the result to qubit 1
qc.measure(q[1], f[0])This section will be updated when the fix is applied.
Glossary
| Term | Meaning |
|---|---|
| Qubit | The basic unit of a quantum computer; VLQ has 24 (QB1–QB24). |
| Shot | One run of a circuit; a job repeats it many times to collect statistics. |
| Mid-circuit measurement | Measuring a qubit in the middle of a circuit, not only at the end. |
| Classically controlled gate / feedback / feed-forward | A gate applied only if a previous measurement gave a certain result. |
cc_prx | IQM’s name for a classically controlled single-qubit rotation (e.g. an X gate). |
| Delay | An instruction that makes a qubit wait for a given time. |
| Barrier | A scheduling instruction: qubits must finish everything before it before anything after it starts. |
| Superposition | A qubit state that is a mix of 0 and 1 until measured. |
| Decoherence / T2 | The gradual loss of a qubit’s quantum information over time; T2 is its characteristic time. |

