research30 min studyLesson 434 in Physics

Stabilizer formalism and syndromes

Use commuting Pauli checks to define codes, diagnose errors, and separate stabilizers from logical operators.

On this page

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 2n−r2^{n-r} and stores k=n−rk=n-r 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.

S=⟨g1,…,gr⟩,[gi,gj]=0,−I∉S,dim⁡C=2n−rS=\langle g_1,\ldots,g_r\rangle,\quad [g_i,g_j]=0,\quad -I\notin S,\qquad \dim\mathcal C=2^{n-r}
The dimension formula assumes independent commuting Pauli generators on n two-level systems. The check operators and their eigenvalues are dimensionless.↔ Scroll wide equations horizontally.

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.

gjE=(−1)sjEgj,sj=xj⋅zE+zj⋅xE(mod2)g_jE=(-1)^{s_j}Eg_j,\qquad s_j=\mathbf x_j\cdot\mathbf z_E+\mathbf z_j\cdot\mathbf x_E\pmod2
The binary vectors label Pauli support, not physical positions or continuous phase-space coordinates. A syndrome bit one denotes an ideal negative check outcome.↔ Scroll wide equations horizontally.

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.

d=min⁡E∈N(S)∖Swt⁡(E),t=⌊d−12⌋d=\min_{E\in N(S)\setminus S}\operatorname{wt}(E),\qquad t=\left\lfloor\frac{d-1}{2}\right\rfloor
Global Pauli phases are ignored in the normalizer quotient. The correction bound concerns unknown data errors with ideal checks, rather than arbitrary faults in the measurement circuit.↔ Scroll wide equations horizontally.

Four qubits, two checks, and a detected Y error

Take g1=X1X2X3X4g_1=X_1X_2X_3X_4 and g2=Z1Z2Z3Z4g_2=Z_1Z_2Z_3Z_4. Count logical qubits, find the syndrome of Y2Y_2, and determine the distance.

  1. The generators overlap in four anticommuting positions, an even number, so they commute. They are independent and generate no minus identity. Hence r=2,n=4r=2,n=4, and k=2k=2.

  2. Y on qubit two anticommutes with the X factor of the first check and the Z factor of the second. Its syndrome is (1,1)(1,1). Every single-site nonidentity Pauli anticommutes with at least one check.

  3. The weight-two string X1X2X_1X_2 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.

The result

This is a four-physical-qubit code with two logical qubits and distance two; detecting the Y error does not uniquely identify its site.

Explore the model

Interactive lab

Interactive lab · probability

Detection and probability are separate questions

Reset and set p=0.10,n=4p=0.10,n=4. Predict the zero-error binomial bar 0.94=0.65610.9^4=0.6561 and the one-error bar 4(0.1)(0.9)3=0.29164(0.1)(0.9)^3=0.2916. 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.

Detection and probability are separate questionsThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

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.

Check your understanding

A Pauli commutes with every check but is not a stabilizer, with global phases ignored. What does it do?

Try it yourself

For the repetition checks Z1Z2,Z2Z3Z_1Z_2,Z_2Z_3, compare Z3Z_3 and Z1Z2Z_1Z_2. 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 (0,0)(0,0). The operator Z1Z2Z_1Z_2 is a generator and acts as identity on the code. The operator Z3Z_3 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.

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.