Stabilizer Measurement Cycles
A surface-code computation is a sequence of identical measurement cycles. In each cycle every ancilla is entangled with its data neighbours and then measured, producing one classical bit per check. We never measure the data qubits directly — that would destroy the logical state — so the ancilla acts as a probe that reports a parity while leaving the data's superposition intact.
Extracting a Z-type check with an ancilla
To measure the plaquette operator without learning the individual values of qubits and , we use a fresh ancilla prepared in and apply a CNOT from each data qubit into the ancilla:
The ancilla ends up holding the parity . Measuring it returns
- when the data parity is even ( or ) — the eigenvalue of ;
- when the parity is odd ( or ) — the eigenvalue.
Crucially the data register is left in untouched, and for a superposition the ancilla measurement projects only onto a definite parity sector, never onto a single data basis state. That is exactly what lets the same check repeat round after round.
A quiet round
Consider the cleanest possible cycle: both data qubits in , no error present. The parity is even, so the ancilla measures with certainty. The whole register stays in
and the syndrome bit reads — "this check sees nothing wrong." Establishing this error-free baseline is the first thing any decoder needs; the next lesson injects an error and watches the bit flip.
Try it
Build one quiet round of the check. Use qubits and as data (both )
and qubit as the ancilla. Apply c.cx(0, 2) and c.cx(1, 2), then measure the ancilla.
The grader checks that the only outcome with non-zero probability is — syndrome .
After running, the Probabilities tab should show a single bar at with probability .
Sign in on the full site to ask questions and join the discussion.