Computing Library › Quantum Error Correction
Quantum Error Correction

Flag Fault-Tolerant Syndrome Extraction

Flag-based syndrome extraction schedules a few ancilla qubits so that any harmful measurement fault is detected, keeping the effective distance intact.

Putting flags into a full cycle

A fault-tolerant syndrome-extraction cycle must guarantee that no single fault, whether on data, ancilla, or a gate, produces an uncorrectable error. Flag-based schemes reach this guarantee by pairing each measurement ancilla with one or more flag qubits and ordering the entangling gates so that the specific faults which would spread into high-weight data errors always flip a flag.

Two-stage decoding

Kronos motion — error correction

Decoding then proceeds in two stages. First the flags are read: if no flag fired, the ordinary syndrome is trusted and decoded normally. If a flag fired, the decoder consults a precomputed table of which data-error patterns are consistent with that flag pattern and syndrome, and corrects accordingly. This conditional logic recovers the code's full distance despite mid-circuit faults.

The number of flags needed grows with the check weight and the target distance, but stays far below the cat-state cost. For distance-three codes a single flag per check often suffices; higher distances need more careful multi-flag circuits, and general constructions exist for arbitrary distance.

Flag schemes must be combined with repeated measurement because a measurement outcome can itself be wrong. Repeating syndrome extraction across several rounds and decoding the whole spacetime history, with flags marking suspicious rounds, is how real machines keep both data and measurement faults under control.