Skip to content

Pauli stabilizers describe a quantum subspace by the measurements that always return +1+1 on it. The signs matter: XXXX and ZZZZ can both have eigenvalue +1+1, but their product is −YY-YY, so adding +YY+YY as another +1+1 constraint makes the equations impossible. Keeping this minus sign is the first step toward understanding quantum codes.

This page develops small examples by direct multiplication. The stabilizer formalism extends these ideas to binary linear algebra, code projectors, logical operators and Clifford circuits.

Required background. Pauli matrices supplies the Hermitian matrices X,Y,ZX,Y,Z and tensor products. Subscripts label physical qubits; an omitted factor is the identity.

Helpful background. Why quantum error correction is possible explains what a code must preserve when errors occur.

A Pauli string is a tensor product of I,X,Y,ZI,X,Y,Z. The full nn-qubit Pauli group also includes scalar phases:

Pn={iℓP1⊗⋯⊗Pn},\mathcal P_n=\{i^\ell P_1\otimes\cdots\otimes P_n\},

where ℓ∈{0,1,2,3}\ell\in\{0,1,2,3\} and each Pj∈{I,X,Y,Z}P_j\in\{I,X,Y,Z\}. These phases make the set closed under multiplication. For example, XY=iZXY=iZ is not one of the four phase-free single-qubit matrices.

Use the standard Hermitian convention Y=σyY=\sigma_y. A binary check is then a signed Hermitian Pauli g=±Pg=\pm P, with g†=gg^\dagger=g and g2=Ig^2=I. The nonidentity checks have eigenvalues ±1\pm1. The exceptional checks +I+I and −I-I have only one eigenvalue: the former imposes no constraint, while the latter has no +1+1 eigenvector. Elements ±iP\pm iP are anti-Hermitian and cannot themselves be binary observables.

To stabilize ∣ψ⟩|\psi\rangle means to satisfy g∣ψ⟩=∣ψ⟩g|\psi\rangle=|\psi\rangle. Changing gg to −g-g selects the opposite eigenspace of the underlying observable. This use of a sign is different from an unobservable overall phase multiplying a state vector.

The cyclic products are

XY=iZ,YZ=iX,ZX=iY.XY=iZ,\qquad YZ=iX,\qquad ZX=iY.

Reversing either pair gives a minus sign. Multiply tensor factors in their original order and keep every scalar phase:

(X1Y2)(Z1X2)=(XZ)1(YX)2=(−iY1)(−iZ2)=−Y1Z2.\begin{aligned} (X_1Y_2)(Z_1X_2) &=(XZ)_1(YX)_2\\ &=(-iY_1)(-iZ_2)=-Y_1Z_2. \end{aligned}

For commutation, a shorter calculation suffices. At a given qubit, distinct nonidentity Pauli letters anticommute; equal letters or a pair containing II commute. If ν(P,Q)\nu(P,Q) counts the anticommuting positions, then

PQ=(−1)ν(P,Q)QP.PQ=(-1)^{\nu(P,Q)}QP.

Thus two strings commute when this count is even. For example, X1X2X3X_1X_2X_3 commutes with Z1Z2Z_1Z_2 because qubits 1 and 2 each contribute a minus sign. But X1X2X_1X_2 anticommutes with Z2Z3Z_2Z_3. Overall signs do not change commutation, although they do change products and selected eigenspaces.

Compatible checks and independent constraints

Section titled “Compatible checks and independent constraints”

A stabilizer group SS is a commuting subgroup of Pn\mathcal P_n that excludes −I-I. Its common +1+1 eigenspace is

C={∣ψ⟩:g∣ψ⟩=∣ψ⟩ for every g∈S}.\mathcal C=\{|\psi\rangle:g|\psi\rangle=|\psi\rangle\text{ for every }g\in S\}.

The two conditions have different jobs. Anticommuting checks cannot share a nonzero eigenvector: if g∣ψ⟩=h∣ψ⟩=∣ψ⟩g|\psi\rangle=h|\psi\rangle=|\psi\rangle, then gh∣ψ⟩=∣ψ⟩gh|\psi\rangle=|\psi\rangle but also gh∣ψ⟩=−hg∣ψ⟩=−∣ψ⟩gh|\psi\rangle=-hg|\psi\rangle=-|\psi\rangle. Commuting checks can still be inconsistent if a product equals −I-I, because their +1+1 equations would imply −∣ψ⟩=∣ψ⟩-|\psi\rangle=|\psi\rangle.

By contrast, a product equal to +I+I indicates a repeated constraint. For a consistent list, independence means that no nonempty product of the generators equals II. If rr independent generators act on nn qubits, then

∣S∣=2r,dim⁡C=2n−r.|S|=2^r,\qquad \dim\mathcal C=2^{n-r}.

Each independent commuting Pauli condition halves the dimension. Merely appending a product of existing generators does not halve it again. The projector derivation proves this count and explains why r≤nr\le n.

For two qubits,

(X1X2)(Z1Z2)=−Y1Y2. (X_1X_2)(Z_1Z_2)=-Y_1Y_2.

The checks XXXX and ZZZZ are independent and have a one-dimensional common +1+1 sector, spanned by

∣Φ+⟩=∣00⟩+∣11⟩2.|\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt2}.

Adding −YY-YY repeats their product and changes nothing. Adding +YY+YY is inconsistent: the product of all three proposed generators is −I-I. In terms of eigenvalues, any joint eigenstate obeys y=−xzy=-xz, where x,z,yx,z,y are its XX,ZZ,YYXX,ZZ,YY results. Only two of these signs are independent.

Four Bell-state sectors indexed by XX and ZZ eigenvalues; the YY eigenvalue is minus their product in every sector

The four Bell states occupy the four simultaneous eigenspaces of XXXX and ZZZZ. Here ∣Φ±⟩=(∣00⟩±∣11⟩)/2|\Phi^\pm\rangle=(|00\rangle\pm|11\rangle)/\sqrt2 and ∣Ψ±⟩=(∣01⟩±∣10⟩)/2|\Psi^\pm\rangle=(|01\rangle\pm|10\rangle)/\sqrt2. The YYYY sign is fixed by XX ZZ=−YYXX\,ZZ=-YY; it cannot be chosen as a third independent sign.

For small lists, generate all products while retaining their signs. A product −I-I signals inconsistency; repeated products reveal dependence. For larger lists the number of products grows exponentially, so the binary methods in the next page become useful (Gottesman, 1997).

Let g1,…,grg_1,\ldots,g_r be independent stabilizers. For a Pauli error EE, define

gjE=χE(gj)Egj,χE(gj)∈{+1,−1}.g_jE=\chi_E(g_j)Eg_j,\qquad\chi_E(g_j)\in\{+1,-1\}.

If ∣ψ⟩|\psi\rangle lies in the code, then

gjE∣ψ⟩=χE(gj)E∣ψ⟩.g_jE|\psi\rangle=\chi_E(g_j)E|\psi\rangle.

The signs therefore give the ideal check outcomes after that Pauli error: its syndrome. The equivalent bit is sj(E)=(1−χE(gj))/2s_j(E)=(1-\chi_E(g_j))/2, with zero for commutation and one for anticommutation. This algebra predicts ideal outcomes; syndrome measurement explains the circuits and their possible faults.

The signs respect products:

χE(gh)=χE(g)χE(h).\chi_E(gh)=\chi_E(g)\chi_E(h).

To see this, move EE past hh and then gg, collecting the two commutation signs. Thus a redundant check g3=g1g2g_3=g_1g_2 must satisfy χE(g3)=χE(g1)χE(g2)\chi_E(g_3)=\chi_E(g_1)\chi_E(g_2). Arbitrary independent sign choices for all three would be inconsistent. Replacing gg by −g-g does not change its commutation sign with EE; it changes the code sector from which the error starts.

Different errors can have the same syndrome. If EE and FF do, E†FE^\dagger F commutes with every check. It may act trivially on the code or may change the logical information. A syndrome identifies an eigensector, not necessarily a unique error.

Take g1=X1X2X3g_1=X_1X_2X_3 and g2=Z1Z2g_2=Z_1Z_2. They commute, and

g1g2=(−iY1)(−iY2)X3=−Y1Y2X3.g_1g_2=(-iY_1)(-iY_2)X_3=-Y_1Y_2X_3.

Their group contains exactly II, g1g_1, g2g_2 and −Y1Y2X3-Y_1Y_2X_3. It excludes −I-I, so two independent checks on three qubits leave a two-dimensional code space.

Error g1g_1 sign g2g_2 sign
II, g1g_1, X3X_3 +1+1 +1+1
X1X_1, X2X_2 +1+1 −1-1
Z1Z_1, Z2Z_2, Z3Z_3 −1-1 +1+1
Y1Y_1, Y2Y_2 −1-1 −1-1

The table groups the listed errors by syndrome; it is not an enumeration of all three-qubit Paulis. For example, Y1Y_1 differs from X1Z1X_1Z_1 only by a phase, so its two signs are the products of the X1X_1 and Z1Z_1 signs.

To see why an all-plus result need not mean no error, choose the basis

∣a⟩=(∣000⟩+∣111⟩)/2,∣b⟩=(∣001⟩+∣110⟩)/2.\begin{aligned} |a\rangle&=(|000\rangle+|111\rangle)/\sqrt2,\\ |b\rangle&=(|001\rangle+|110\rangle)/\sqrt2. \end{aligned}

Both satisfy the two checks. But X3X_3 swaps ∣a⟩|a\rangle and ∣b⟩|b\rangle, whereas II and g1g_1 leave both unchanged. This is a valid one-logical-qubit code, but it does not protect against every single-qubit error: an undetected weight-one operator changes the encoded state. The general language for these actions is developed in logical operators.

Exercise 1: Multiply a Signed Pauli String

Section titled “Exercise 1: Multiply a Signed Pauli String”

Calculate

A=(−X1Y2)(Z1X2),B=(X1I2)(Y1Z2).\begin{aligned} A&=(-X_1Y_2)(Z_1X_2),\\ B&=(X_1I_2)(Y_1Z_2). \end{aligned}

State whether each result is Hermitian. Identify the phase error made by replacing every local product with only its resulting Pauli letter.

Solution

For AA, keep the leading minus sign and use XZ=−iYXZ=-iY and YX=−iZYX=-iZ:

A=−(−iY1)(−iZ2)=−(−i)2Y1Z2=Y1Z2.\begin{aligned} A&=-(-iY_1)(-iZ_2)\\ &=-(-i)^2Y_1Z_2=Y_1Z_2. \end{aligned}

The two factors of −i-i multiply to −1-1, which cancels the supplied minus sign. Thus AA is Hermitian. For BB,

B=(XY)1Z2=iZ1Z2.B=(XY)_1Z_2=iZ_1Z_2.

This element is anti-Hermitian and is not a binary check. Ignoring local phases loses the sign cancellation in AA and the decisive factor ii in BB.

Let P=X1Y2Z4P=X_1Y_2Z_4 and Q=Z1Y2X3X4Q=Z_1Y_2X_3X_4 on four qubits. Compute ν(P,Q)\nu(P,Q) and decide whether PP and QQ commute. Then replace QQ by Q′=Z1X2X3X4Q'=Z_1X_2X_3X_4 and repeat.

Solution

For PP and QQ, qubit 1 contributes one anticommutation because XX and ZZ differ, qubit 2 contributes none because both letters are YY, qubit 3 contributes none because PP has II, and qubit 4 contributes one because ZZ and XX differ. Hence ν(P,Q)=2\nu(P,Q)=2 and

PQ=(−1)2QP=QP.PQ=(-1)^2QP=QP.

For Q′Q', qubits 1, 2, and 4 each contain distinct nonidentity letters. Thus ν(P,Q′)=3\nu(P,Q')=3 and

PQ′=(−1)3Q′P=−Q′P.PQ'=(-1)^3Q'P=-Q'P.

The first pair commutes and the second anticommutes. No overall phase calculation is needed for this binary decision.

Exercise 3: Separate inconsistent and redundant checks

Section titled “Exercise 3: Separate inconsistent and redundant checks”

Compare the two signed two-qubit lists

L−=(X1X2,  Z1Z2,  −Y1Y2),L+=(X1X2,  Z1Z2,  +Y1Y2).\begin{aligned} L_-&=(X_1X_2,\;Z_1Z_2,\;-Y_1Y_2),\\ L_+&=(X_1X_2,\;Z_1Z_2,\;+Y_1Y_2). \end{aligned}

Both lists are pairwise commuting. Decide which third entry is redundant and which list is inconsistent. Give the independent rank and stabilized dimension wherever those quantities exist.

Solution

The product of the first two checks is

(X1X2)(Z1Z2)=(−iY1)(−iY2)=−Y1Y2.\begin{aligned} (X_1X_2)(Z_1Z_2) &=(-iY_1)(-iY_2)\\ &=-Y_1Y_2. \end{aligned}

In L−L_-, the third check is exactly the product of the first two. It is redundant, so the raw list length is three but the independent rank is r=2r=2. The group excludes −I-I, and for n=2n=2 its all-plus sector has dimension 22−2=12^{2-2}=1.

In L+L_+, multiplying all three listed checks gives (−Y1Y2)(+Y1Y2)=−I(-Y_1Y_2)(+Y_1Y_2)=-I. The list is therefore inconsistent and has no nonzero common +1+1 vector. The phase sign distinguishes harmless redundancy from a fatal obstruction.

Exercise 4: Replace Generators Without Changing the Sector

Section titled “Exercise 4: Replace Generators Without Changing the Sector”

For the worked group generated by g1=X1X2X3g_1=X_1X_2X_3 and g2=Z1Z2g_2=Z_1Z_2, replace g2g_2 with g2′=g1g2=−Y1Y2X3g'_2=g_1g_2=-Y_1Y_2X_3. Show directly that (g1,g2′)(g_1,g'_2) generates the same group, has the same independent rank, and stabilizes the same sector.

Solution

The new generator g2′=g1g2g'_2=g_1g_2 belongs to the original group, so every product of g1g_1 and g2′g'_2 belongs to ⟨g1,g2⟩\langle g_1,g_2\rangle. Conversely,

g1g2′=g1(g1g2)=g12g2=g2,g_1g'_2=g_1(g_1g_2)=g_1^2g_2=g_2,

where commutation and g12=Ig_1^2=I were used. Thus each old generator is generated by the new pair, and the groups coincide. Neither new generator is II, and their product is g2≠±Ig_2\ne\pm I, so the pair remains independent with r=2r=2 and dim⁡C=2\dim\mathcal C=2.

If a vector has eigenvalue +1+1 under g1g_1 and g2g_2, it has eigenvalue +1+1 under their product g2′g'_2. Conversely, eigenvalue +1+1 under g1g_1 and g2′g'_2 implies eigenvalue +1+1 under g1g2′=g2g_1g'_2=g_2. The stabilized sectors are identical.

For the worked generators g1=X1X2X3g_1=X_1X_2X_3 and g2=Z1Z2g_2=Z_1Z_2, compute the signatures of X1X_1, X2X_2, X1X2X_1X_2, and X3X_3. Identify a pair with the same syndrome and two distinct all-plus operators. Use the explicit basis ∣a⟩,∣b⟩|a\rangle,|b\rangle to decide whether the four errors are jointly correctable.

Solution

Both X1X_1 and X2X_2 commute with g1g_1 and anticommute with g2g_2, so each has signature (+1,−1)(+1,-1). They have the same syndrome. Character multiplication gives

χX1X2(gj)=χX1(gj)χX2(gj),\chi_{X_1X_2}(g_j) =\chi_{X_1}(g_j)\chi_{X_2}(g_j),

so X1X2X_1X_2 has (+1,+1)(+1,+1). Directly, its two overlaps with g2g_2 also give even parity. The operator X3X_3 commutes with g1g_1 because its only nonidentity letter equals the third XX, and it has disjoint support from g2g_2, so it too has (+1,+1)(+1,+1).

Thus X1,X2X_1,X_2 are a pair with the same syndrome, while X1X2X_1X_2 and X3X_3 are distinct undetected Paulis. The explicit basis above gives X1X2∣a⟩=∣b⟩X_1X_2|a\rangle=|b\rangle and X1X2∣b⟩=∣a⟩X_1X_2|b\rangle=|a\rangle. Thus X1†X2X_1^\dagger X_2 is not scalar on the code: the pair X1,X2X_1,X_2 already fails the Knill–Laflamme test, and the four-error set is not jointly correctable.

Exercise 6: Find a state from three checks

Section titled “Exercise 6: Find a state from three checks”

Analyze the three-qubit list

h1=X1X2,h2=Z1Z2,h3=Z3.h_1=X_1X_2, \qquad h_2=Z_1Z_2, \qquad h_3=Z_3.

Check Hermiticity, pairwise commutation, independence, and exclusion of −I-I; state the group size and stabilized dimension; and compute the signature of E=X1Y3E=X_1Y_3. Identify the normalized state in the stabilized sector.

Solution

Each hjh_j is a Hermitian signed Pauli string and squares to II. The first pair has two distinct nonidentity overlaps and therefore commutes; h3h_3 has disjoint support from both h1h_1 and h2h_2. The product of the first pair is

h1h2=(−iY1)(−iY2)=−Y1Y2.h_1h_2=(-iY_1)(-iY_2)=-Y_1Y_2.

The four products generated by h1,h2h_1,h_2 are I,h1,h2,−Y1Y2I,h_1,h_2,-Y_1Y_2, all acting trivially on qubit 3. Multiplying any of them by h3=Z3h_3=Z_3 gives a distinct string with nonidentity third support. Hence no nonempty product is II or −I-I: the list is independent, has rank r=3r=3, and generates 23=82^3=8 elements without the minus identity. With n=3n=3,

dim⁡C=23−3=1.\dim\mathcal C=2^{3-3}=1.

For E=X1Y3E=X_1Y_3, the X1X_1 factor commutes with h1h_1 and anticommutes with h2h_2, while Y3Y_3 anticommutes with h3h_3. Therefore

(χE(h1),χE(h2),χE(h3))=(+1,−1,−1).(\chi_E(h_1),\chi_E(h_2),\chi_E(h_3)) =(+1,-1,-1).

The stabilized state is ∣Φ+⟩12∣0⟩3|\Phi^+\rangle_{12}|0\rangle_3. The first two checks fix the Bell pair and Z3Z_3 fixes the third qubit. A one-dimensional code space specifies a known state; it has no freedom to encode an unknown logical qubit.

  • D. Gottesman, Stabilizer Codes and Quantum Error Correction, Ph.D. thesis, California Institute of Technology (1997), chapter 3, arXiv:quant-ph/9705052 — signed Pauli groups, stabilized subspaces and error syndromes.
  • D. Gottesman, “An introduction to quantum error correction and fault-tolerant quantum computation,” Proceedings of Symposia in Applied Mathematics 68, 13–58 (2010), arXiv:0904.2557 — introductory stabilizer calculations and their relation to error correction.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), chapter 10, doi:10.1017/CBO9780511976667 — textbook treatment and examples.