Measuring Stabilizers
A stabilizer code protects information without ever directly measuring the data. Instead we measure the stabilizer generators. Each measurement returns a eigenvalue, and the pattern of results — the syndrome — tells us which error occurred, while leaving the encoded state intact.
Why measure stabilizers and not the data
Measuring a data qubit in the computational basis would collapse the superposition we are trying to protect. The trick of quantum error correction is to measure operators that commute with the encoded information and whose eigenvalues reveal only the error. The stabilizer generators are exactly such operators: they act as on the codespace, so on an error-free state they return and disturb nothing. An error shifts the eigenvalue of any generator it anticommutes with to , flagging the error without exposing the logical state.
The syndrome
For a code with generators and an error acting on a codeword ,
with the sign equal to if and commute and if they anticommute. The syndrome is the bit string
It is a function of the error alone, not of . Different correctable errors produce different syndromes, and a decoder maps the syndrome back to a recovery operation.
Measuring a stabilizer with an ancilla
We extract one syndrome bit per generator using an ancilla qubit. The standard circuit for a -type parity is:
- Prepare an ancilla in .
- Apply from data qubit to the ancilla, then from to the ancilla.
- Measure the ancilla in the computational basis.
Each CNOT XORs a data bit into the ancilla, so after both the ancilla holds the parity — outcome means eigenvalue , outcome means . Crucially, because the ancilla is controlled by the data, it learns only the parity, never the individual bit values, so the encoded superposition survives. (-type stabilizers are measured the same way after conjugating the ancilla with Hadamards, or equivalently using the ancilla as the control.)
A worked example: the bit-flip code
The three-qubit bit-flip code has stabilizers and . The four single-qubit bit-flip errors give the syndromes:
| Error | Anticommutes with | Syndrome | | --- | --- | --- | | none | — | | | | | | | | | | | | | |
Every distinct correctable error has a distinct syndrome, so the decoder simply inverts the table: syndrome means "flip qubit 1." This is the discrete, classical core of error correction.
Try it
Encode , inject a bit-flip on data qubit , then measure both stabilizers and onto two ancillas. Read out the syndrome — it should be .
Sign in on the full site to ask questions and join the discussion.