Surface Code Syndrome Extraction
The surface code interleaves data and measure qubits so each stabilizer is read every cycle by a fixed, local four-CNOT schedule.
Data and measure qubits
A practical surface-code layout uses a checkerboard of two qubit roles. Data qubits hold the encoded information; measure qubits sit between them, each dedicated to one stabilizer. Half the measure qubits read X-type plaquettes and half read Z-type plaquettes. Every measure qubit couples only to its four neighboring data qubits, so the whole array is nearest-neighbor and fits a planar chip.
The measurement cycle
In each cycle, every measure qubit is reset, entangled with its four data neighbors by four CNOTs (Hadamard-wrapped for X-checks), and then measured. The four CNOTs follow a fixed order, often described as N, E, W, S or a Z-shaped pattern, chosen so that faults do not spread into uncorrectable errors and so that X and Z measure qubits do not collide. One full cycle produces a complete syndrome frame.
# One Z-check measure qubit m with data neighbors in fixed order
circuit.reset(m)
for d in (north, east, west, south): # fixed schedule
circuit.cx(d, m)
circuit.measure(m, frame_bit)
- Data qubits interleaved with dedicated X- and Z-measure qubits.
- Each stabilizer read by four CNOTs to nearest neighbors, every cycle.
- A fixed CNOT order prevents faults from spreading badly.
- One cycle yields a full syndrome frame; cycles repeat continuously.
Space-time decoding
Because measurements are noisy, a single frame is unreliable. The code runs many cycles and a defect is defined as a location where the syndrome changes between consecutive frames. Errors and measurement faults then appear as endpoints in a three-dimensional space-time graph, which the matching decoder processes. To reliably read out or protect a distance-d patch, roughly d cycles are performed, a point developed in measurement errors and repeated measurement.
This repeating, local, hardware-friendly cycle is what makes the surface code the front-runner for scalable fault tolerance.