Computing Library › Quantum Error Correction
Quantum Error Correction

Flag Qubits

A flag qubit is a small ancilla that raises an alarm when a syndrome measurement itself faults, giving fault tolerance with very few extra qubits.

The problem flags solve

When a single ancilla measures a high-weight stabilizer, one fault on that ancilla during the sequence of entangling gates can spread into several correlated data errors, more than the code can correct. The brute-force fix, Shor-style cat-state ancillas, uses many extra qubits. Flag qubits achieve the same protection with as little as one extra qubit per check.

How a flag works

Kronos motion — error correction

A flag qubit is entangled with the measurement ancilla at the start and end of the syndrome circuit. If a dangerous fault occurs partway through, it flips the flag as well as corrupting the data. The flag outcome then tells the decoder that a special, higher-weight error may have occurred, so the decoder can look for exactly that pattern rather than trusting the naive syndrome.

The design principle is that any fault which would create an error too big for the code to handle must first trip the flag. Verifying this requires enumerating the fault paths through the specific syndrome circuit, which is why flag-circuit design is careful and code-specific.

Flag-based fault tolerance made small codes practical on hardware with tight qubit budgets, and it underlies several early logical-qubit demonstrations on ion-trap and superconducting devices. It is now a standard tool for keeping syndrome extraction fault tolerant without paying the large ancilla overhead of the original constructions.