Stabilizer formalism and syndromes
Use commuting Pauli checks to define codes, diagnose errors, and separate stabilizers from logical operators.
On this page
The question for today
What you’ll understand
- Count encoded qubits from independent commuting generators.
- Calculate syndromes from Pauli commutation signs.
- Determine distance using nontrivial logical operators rather than check weight.
A stabilizer code replaces a large list of code vectors with a smaller list of checks. Every valid code state has eigenvalue plus one for each check, while errors may change selected signs. The formalism is powerful because Pauli products either commute or anticommute, reducing many calculations to binary arithmetic. Its central distinction is between a harmless check operator, a detectable error, and an undetectable operator that changes the logical state.
Compatible checks define a subspace
A stabilizer is an Abelian subgroup of the n-qubit Pauli group that excludes minus identity. Choose r independent Hermitian generators. Their common positive eigenspace has dimension and stores logical qubits. Independence matters: multiplying generators may produce additional checks without imposing additional constraints. Including minus identity would demand that a nonzero state equal its own negative and would leave no code space at all.
Check compatibility is an operator condition, not a statement about whether their symbols look different. Two Pauli strings acquire a minus sign for each site where their nonidentity single-qubit factors anticommute. An even number of such sites gives overall commutation. Thus overlapping X and Z checks can be compatible, provided the overlap has even parity. This rule allows simultaneous syndrome measurements in principle, though the circuits that implement those measurements still require a schedule and a fault model.
A syndrome records anticommutation
Represent an error by a Pauli E, ignoring its physically irrelevant overall phase. If E anticommutes with a check, the error changes that check eigenvalue from plus one to minus one. Encode a negative outcome by syndrome bit one. The syndrome is therefore a list of commutation signs, independent of the logical amplitudes. It identifies an error sector and may leave several possible physical errors within that sector.
Binary notation stores a Pauli as two length-n vectors x and z: each site contains an X factor, a Z factor, both for Y up to phase, or neither. The commutation sign of two strings is their binary symplectic product. All additions and inner products here use arithmetic modulo two. Ordinary real dot products would give the wrong criterion. Binary notation speeds syndrome calculations but suppresses phases that must be restored when calculating actual gate products or state amplitudes.
Zero syndrome does not mean identity
The Pauli normalizer consists of strings commuting with every stabilizer. Some are stabilizers themselves and act as identity on the code. The others implement nontrivial logical operations while producing zero syndrome. Logical X and Z representatives for the same logical qubit must anticommute, even though each commutes with all checks. Multiplying a representative by a stabilizer changes its physical support without changing its code action.
Distance is the minimum weight of a nontrivial Pauli logical operator. With perfect syndrome measurements, a distance-d code corrects arbitrary unknown Pauli errors of weight at most the integer part of half of d minus one. It detects every harmful Pauli below distance, while stabilizer elements are harmless. Check weight is a different quantity: high-weight checks do not establish high distance. Faulty measurements and propagating gate faults need a circuit-level analysis beyond this data-error statement.
Work it through
Four qubits, two checks, and a detected Y error
Take and . Count logical qubits, find the syndrome of , and determine the distance.
The generators overlap in four anticommuting positions, an even number, so they commute. They are independent and generate no minus identity. Hence , and .
Y on qubit two anticommutes with the X factor of the first check and the Z factor of the second. Its syndrome is . Every single-site nonidentity Pauli anticommutes with at least one check.
The weight-two string commutes with both checks: it has two X-Z overlaps in the second. It is not one of the four stabilizer elements. Therefore distance is two, which detects one unknown data error but cannot guarantee its correction.
This is a four-physical-qubit code with two logical qubits and distance two; detecting the Y error does not uniquely identify its site.
The living notebook
Explore the model
Interactive lab · probability
Detection and probability are separate questions
Reset and set . Predict the zero-error binomial bar and the one-error bar . These counts can accompany a restricted independent-fault model. Use Step to inspect the highlighted outcome probabilities. The instrument does not compute stabilizer syndromes, error types, logical distance, or correction success.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forCounting how often one site fails does not determine whether a syndrome can locate and correct that failure.
Pause & reason
Check your understanding
Your turn
Try it yourself
For the repetition checks , compare and . Compute their syndromes and decide whether each is a stabilizer or a nontrivial logical operator. What is the unrestricted distance?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Commutation gives the syndrome, but code action distinguishes the two zero-syndrome possibilities.
Compare with the solution
Both operators commute with both checks, so both syndromes are . The operator is a generator and acts as identity on the code. The operator gives plus one on 000 and minus one on 111, so it is a nontrivial logical Z. Its weight is one, proving unrestricted distance one. This does not contradict correction of a single X under the restricted noise model.
Keep the idea
Take it with you
- Independent commuting checks determine code dimension.
- Syndromes follow from anticommutation and do not identify logical amplitudes.
- Distance measures the smallest nontrivial logical support, not the size of a check.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.