Skip to content

The stabilizer formalism describes quantum subspaces using commuting Pauli constraints. It replaces many amplitude calculations with binary linear algebra, while retaining the signs needed to identify the state or code. The same language describes error syndromes, logical operators, Clifford gates and ideal Pauli measurements. A code’s stabilizers specify its allowed subspace; they do not specify an arbitrary logical state inside that subspace.

Helpful background. Pauli group and stabilizers develops signed products and small examples. Why error correction is possible gives the Knill–Laflamme criterion, and multi-qubit gates supplies controlled gates and conjugation.

We use ordered qubits and binary row vectors. Physical noise, syndrome-extraction circuits and decoder design are developed in syndrome measurement and decoders; the calculations here describe ideal operators and measurements.

For nn ordered qubits, the Pauli group is

Pn={iℓP:  P=P1⊗⋯⊗Pn,ℓ∈{0,1,2,3},Pj∈{I,X,Y,Z}}.\mathcal P_n = \big\{ i^\ell P:\; P=P_1\otimes\cdots\otimes P_n, \ell\in\{0,1,2,3\}, P_j\in\{I,X,Y,Z\} \big\}.

The phases ±1\pm1 and ±i\pm i make the set closed under multiplication. Every Pauli string is unitary. A Pauli string with phase ±1\pm1 is Hermitian. A nonidentity Hermitian string has eigenvalues ±1\pm1; +I+I and −I-I have only their single fixed eigenvalue.

Two Pauli strings either commute or anticommute. On one qubit,

XZ=−ZX,XY=−YX,YZ=−ZY,\begin{aligned} XZ&=-ZX, \\ XY&=-YX, \\ YZ&=-ZY, \end{aligned}

while equal Pauli factors commute. Tensor-product strings commute exactly when the number of positions containing different nonidentity Pauli factors is even.

Global phase is irrelevant to the support and commutation pattern, but signs are not disposable in a stabilizer description. The constraints

g∣ψ⟩=∣ψ⟩g|\psi\rangle=|\psi\rangle

and

(−g)∣ψ⟩=∣ψ⟩(-g)|\psi\rangle=|\psi\rangle

select opposite eigenspaces of the same observable.

Ignore phase temporarily and represent a Pauli string by a binary row vector

v=(x∣z)∈F22n.\mathbf v = (\mathbf x\mid\mathbf z) \in \mathbb F_2^{2n}.

On qubit jj,

(xj,zj)(x_j,z_j) Pauli factor
(0,0)(0,0) II
(1,0)(1,0) XX
(0,1)(0,1) ZZ
(1,1)(1,1) YY up to phase

A convenient Hermitian representative is

P(x,z)=i∑jxjzjX(x)Z(z),P(\mathbf x,\mathbf z) = i^{\sum_j x_jz_j} X(\mathbf x)Z(\mathbf z),

where

X(x)=∏j=1nXjxj,Z(z)=∏j=1nZjzj.\begin{aligned} X(\mathbf x) &= \prod_{j=1}^n X_j^{x_j}, \\ Z(\mathbf z) &= \prod_{j=1}^n Z_j^{z_j}. \end{aligned}

Vector addition is modulo two, but the exponent of ii uses the integer overlap count modulo four. For example, P(11∣11)=i2(X1X2)(Z1Z2)=Y1Y2P(11\mid11)=i^2(X_1X_2)(Z_1Z_2)=Y_1Y_2. Reducing that overlap count modulo two too early would give the wrong sign.

Multiplication adds the binary vectors and produces a separate phase. Writing v=(x∣z)\mathbf v=(\mathbf x\mid\mathbf z) and w=(x′∣z′)\mathbf w=(\mathbf x'\mid\mathbf z'), let q(v)=∑jxjzjq(\mathbf v)=\sum_j x_jz_j as an integer. Then

P(v)P(w)=iη(v,w)P(v+w),\begin{aligned} P(\mathbf v)P(\mathbf w) &=i^{\eta(\mathbf v,\mathbf w)}P(\mathbf v+\mathbf w), \end{aligned}

where the exponent is evaluated modulo four:

η(v,w)=q(v)+q(w)+2z⋅x′−q(v+w).\eta(\mathbf v,\mathbf w) =q(\mathbf v)+q(\mathbf w) +2\mathbf z\cdot\mathbf x'-q(\mathbf v+\mathbf w).

The vector sum inside qq is first taken modulo two; the dot product in this exponent is an integer. The extra 2z⋅x′2\mathbf z\cdot\mathbf x' arises from moving Z(z)Z(\mathbf z) past X(x′)X(\mathbf x'). For commuting Hermitian rows, η\eta is even, so a product’s sign is updated by η/2\eta/2 modulo two, together with the two original sign bits. This is the information that an unsigned row operation would lose.

For

v=(x∣z),w=(x′∣z′),\mathbf v=(\mathbf x\mid\mathbf z), \qquad \mathbf w=(\mathbf x'\mid\mathbf z'),

define

ω(v,w)=x⋅z′+z⋅x′(mod2).\omega(\mathbf v,\mathbf w) = \mathbf x\cdot\mathbf z' + \mathbf z\cdot\mathbf x' \pmod 2.

Then

P(v)P(w)=(−1)ω(v,w)P(w)P(v).P(\mathbf v)P(\mathbf w) = (-1)^{\omega(\mathbf v,\mathbf w)} P(\mathbf w)P(\mathbf v).

Thus the strings commute when ω=0\omega=0 and anticommute when ω=1\omega=1.

Introduce the 2n×2n2n\times2n matrix

Λ=(0InIn0).\Lambda = \begin{pmatrix} 0&I_n\\ I_n&0 \end{pmatrix}.

For row vectors,

ω(v,w)=vΛwT.\omega(\mathbf v,\mathbf w) = \mathbf v\Lambda\mathbf w^{\mathsf T}.

This binary symplectic form is the common algebra behind commuting checks, syndrome extraction, logical operators, and Clifford conjugation.

A qubit stabilizer group SS is an abelian subgroup of Pn\mathcal P_n such that

−I∉S.-I\notin S.

The stabilized subspace is

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

The exclusion of −I-I is essential. If both ∣ψ⟩=−∣ψ⟩|\psi\rangle=-|\psi\rangle were required, the only solution would be the zero vector.

Suppose SS has rr independent commuting Hermitian generators,

S=⟨g1,…,gr⟩.S = \langle g_1,\ldots,g_r \rangle.

Independence means that no nonempty product of generators equals II. Every group element is a product

g1a1⋯grar,aj∈F2,g_1^{a_1}\cdots g_r^{a_r}, \qquad a_j\in\mathbb F_2,

so

∣S∣=2r.|S|=2^r.

The binary generator matrix

H=[HX∣HZ]H = \left[ H_X\mid H_Z \right]

has one row per generator. Pairwise commutation is equivalent to

HΛHT=0(mod2),H\Lambda H^{\mathsf T}=0 \pmod2,

or

HXHZT+HZHXT=0(mod2).H_XH_Z^{\mathsf T} + H_ZH_X^{\mathsf T} = 0 \pmod2.

The row space is therefore an isotropic subspace: every pair of its vectors has zero symplectic product. Its rank cannot exceed nn. These binary equations test commutation, but a dependent signed list still needs a phase check to exclude −I-I, as the Bell-state example shows.

Each commuting generator contributes a +1+1-eigenspace projector:

Πj=I+gj2.\Pi_j = \frac{I+g_j}{2}.

Their product projects onto the common code space:

PS=∏j=1rI+gj2=12r∑g∈Sg.\begin{aligned} P_S &= \prod_{j=1}^r \frac{I+g_j}{2} \\ &= \frac{1}{2^r} \sum_{g\in S}g. \end{aligned}

Only the identity Pauli has nonzero trace, with Tr⁡I=2n\operatorname{Tr}I=2^n. Therefore

dim⁡C(S)=Tr⁡PS=2n2r=2n−r.\begin{aligned} \dim\mathcal C(S) &= \operatorname{Tr}P_S \\ &= \frac{2^n}{2^r} \\ &= 2^{n-r}. \end{aligned}

An [[n,k]][[n,k]] stabilizer code has

r=n−kr=n-k

independent stabilizer generators. When r=nr=n, the code space is one-dimensional and defines a pure stabilizer state. When r<nr<n, it encodes k=n−rk=n-r logical qubits.

For a stabilizer state ∣ψ⟩|\psi\rangle, the density operator has the compact expansion

∣ψ⟩⟨ψ∣=12n∑g∈Sg.|\psi\rangle\langle\psi| = \frac{1}{2^n} \sum_{g\in S}g.

For a code with k>0k>0, the same expression is the maximally mixed encoded state:

PS2k=12n∑g∈Sg.\frac{P_S}{2^k} = \frac{1}{2^n} \sum_{g\in S}g.

Replacing a generator by its product with another generator does not change SS. Binary row operations on HH, with the corresponding product signs updated, therefore change the generating set while preserving the code. This freedom is useful for Gaussian elimination, measurement updates, and circuit design.

The abstract code may be unchanged, but generator choice can matter physically. Different generating sets can have different Pauli weights, geometrical supports, ancilla schedules, and fault-propagation behavior.

Worked Example: The Four-Qubit Detection Code

Section titled “Worked Example: The Four-Qubit Detection Code”

Consider four physical qubits with

gX=X1X2X3X4,gZ=Z1Z2Z3Z4.\begin{aligned} g_X&=X_1X_2X_3X_4, \\ g_Z&=Z_1Z_2Z_3Z_4. \end{aligned}

The generators commute because they anticommute at four qubit positions. They are independent, so r=2r=2 and

k=n−r=4−2=2.k=n-r=4-2=2.

The code is an [[4,2,2]][[4,2,2]] stabilizer code. Its projector is

P=14(I+gX+gZ+gXgZ).P = \frac14 \left( I+g_X+g_Z+g_Xg_Z \right).

Every one-qubit Pauli error anticommutes with at least one generator:

Error on any qubit jj syndrome (sX,sZ)(s_X,s_Z)
XjX_j (0,1)(0,1)
ZjZ_j (1,0)(1,0)
YjY_j (1,1)(1,1)

The code detects every single-qubit Pauli error. It does not locate the damaged qubit because all four XjX_j errors, for example, have the same syndrome. For a general single-qubit channel, a no-error component can also remain in the code; detection does not promise a flag on every run.

One valid choice of logical Pauli representatives is

X‾1=X1X2,Z‾1=Z2Z3,X‾2=X2X3,Z‾2=Z3Z4.\begin{aligned} \overline X_1&=X_1X_2, & \overline Z_1&=Z_2Z_3, \\ \overline X_2&=X_2X_3, & \overline Z_2&=Z_3Z_4. \end{aligned}

Each operator commutes with gXg_X and gZg_Z. The designated logical pairs anticommute, while cross pairs commute. None belongs to SS.

Because weight-22 logical Paulis exist and all weight-11 Paulis are detectable,

d=2.d=2.

The code detects one arbitrary qubit error and can correct one known-location erasure, but it cannot correct an arbitrary unknown-location one-qubit error. This is a useful warning: a nonzero syndrome can certify that an error occurred without providing enough information for deterministic recovery.

Logical Operators and the Pauli Normalizer

Section titled “Logical Operators and the Pauli Normalizer”

Let

CPn(S)={Q∈Pn:  Qg=gQfor every g∈S}C_{\mathcal P_n}(S) = \big\{ Q\in\mathcal P_n:\; Qg=gQ \quad\text{for every }g\in S \big\}

be the Pauli centralizer of SS. In stabilizer-code language this set is commonly called the Pauli normalizer N(S)N(S). Here the Pauli normalizer equals the centralizer: Pauli conjugation sends a stabilizer gg to gg or −g-g, and −g-g cannot also belong to SS when −I-I is excluded.

There are three possibilities for a Pauli operator QQ:

  1. QQ anticommutes with some g∈Sg\in S. It maps the code to an orthogonal syndrome sector.
  2. Q∈SQ\in S up to phase. It acts as a scalar phase on every code vector, leaving density operators unchanged.
  3. Q∈N(S)∖SQ\in N(S)\setminus S up to phase. It preserves the code but acts nontrivially on logical information.

The logical Pauli group is represented by the quotient

N(S)/S,N(S)/S,

which retains the scalar Pauli phases. A phase-free description is particularly convenient: set L=row⁡(H)L=\operatorname{row}(H) and let L⊥L^\perp denote its symplectic orthogonal complement. Then

logical Pauli labels=L⊥/L,dim⁡(L⊥/L)=2k.\begin{gathered} \text{logical Pauli labels}=L^\perp/L,\\ \dim(L^\perp/L)=2k. \end{gathered}

Thus there are 4k4^k logical labels, including the identity. In statements below involving N(S)∖SN(S)\setminus S, membership is understood modulo scalar phases; a global −I-I is not a nontrivial logical error. For an [[n,k]][[n,k]] code, one can choose representatives

X‾1,…,X‾k,Z‾1,…,Z‾k\overline X_1,\ldots,\overline X_k, \qquad \overline Z_1,\ldots,\overline Z_k

that commute with every stabilizer and satisfy

X‾iZ‾j=(−1)δijZ‾jX‾i,[X‾i,X‾j]=0,[Z‾i,Z‾j]=0.\begin{aligned} \overline X_i\overline Z_j &= (-1)^{\delta_{ij}} \overline Z_j\overline X_i, \\ [\overline X_i,\overline X_j] &= 0, \\ [\overline Z_i,\overline Z_j] &= 0. \end{aligned}

Multiplying a logical representative by any stabilizer produces the same logical operation on the code:

X‾i∼X‾ig,g∈S.\overline X_i \sim \overline X_i g, \qquad g\in S.

This equivalence is the algebraic source of stabilizer-code degeneracy.

For a stabilizer code with k>0k>0, distance is the minimum weight of a nontrivial logical Pauli:

d=min⁡v∈L⊥∖Lwt⁡(v).d=\min_{\mathbf v\in L^\perp\setminus L}\operatorname{wt}(\mathbf v).

Here weight counts the qubit positions with (xj,zj)≠(0,0)(x_j,z_j)\ne(0,0). For k=0k=0, the quotient has no nontrivial logical label and this minimum is empty; one must state a separate convention if assigning a distance to a stabilizer state.

The definition also explains why low-weight stabilizers do not reduce distance. A low-weight stabilizer is undetectable but logically trivial. Degenerate codes can therefore have stabilizers whose weight is below dd.

Let an error Pauli have binary vector

e=(eX∣eZ).\mathbf e = (\mathbf e_X\mid\mathbf e_Z).

Its syndrome against the rr generator rows is

s=HΛeT∈F2r.\mathbf s = H\Lambda\mathbf e^{\mathsf T} \in \mathbb F_2^r.

Equivalently,

s=HXeZT+HZeXT(mod2).\mathbf s = H_X\mathbf e_Z^{\mathsf T} + H_Z\mathbf e_X^{\mathsf T} \pmod2.

The measured eigenvalue of generator gjg_j is

(−1)sj(-1)^{s_j}

for an ideal code state after error EE, because

gjE∣ψL⟩=(−1)sjE∣ψL⟩.g_jE|\psi_L\rangle = (-1)^{s_j} E|\psi_L\rangle.

The syndrome map is linear:

s(e+f)=s(e)+s(f).\mathbf s(\mathbf e+\mathbf f) = \mathbf s(\mathbf e) + \mathbf s(\mathbf f).

Two Pauli errors EE and FF have the same syndrome exactly when

E†F∈N(S)E^\dagger F\in N(S)

up to phase. That fact divides same-syndrome pairs into two very different classes:

  • if E†F∈SE^\dagger F\in S, the errors are degenerate and have the same logical action;
  • if E†F∈N(S)∖SE^\dagger F\in N(S)\setminus S, they differ by a logical Pauli and cannot both be corrected by the same recovery.

A decoder therefore does not merely invert the syndrome map. It estimates an error equivalence class modulo stabilizers and must avoid choosing the wrong logical class. Decoders turns this algebraic statement into a posterior inference problem.

The general exact-correction criterion is developed in Why Quantum Error Correction Is Possible. For a stabilizer code and a Pauli error set E\mathcal E, it becomes especially concrete:

E is correctable⟺Ea†Eb∉N(S)∖S\begin{gathered} \mathcal E \text{ is correctable} \quad\Longleftrightarrow \\ E_a^\dagger E_b \notin N(S)\setminus S \end{gathered}

for every Ea,Eb∈EE_a,E_b\in\mathcal E, up to phase.

To see why, write Q=Ea†EbQ=E_a^\dagger E_b.

If QQ anticommutes with a stabilizer gg, then

PSQPS=PSgQPS=−PSQgPS=−PSQPS,\begin{aligned} P_SQP_S &= P_SgQP_S \\ &= -P_SQgP_S \\ &= -P_SQP_S, \end{aligned}

so

PSQPS=0.P_SQP_S=0.

The two errors occupy orthogonal syndrome sectors.

If QQ is a stabilizer up to phase, then

PSQPS=cabPS.P_SQP_S = c_{ab}P_S.

The errors may share a syndrome, but they have the same action on the code.

Only the third case fails: if Q∈N(S)∖SQ\in N(S)\setminus S, then QQ is a nontrivial logical Pauli, so PSQPSP_SQP_S is not proportional to PSP_S. The same syndrome has hidden a logical ambiguity.

This criterion is also the reason a distance-dd stabilizer code corrects arbitrary errors on

t≤⌊d−12⌋t \leq \left\lfloor \frac{d-1}{2} \right\rfloor

unknown qubits.

The nn-qubit Clifford group is the normalizer of the Pauli group in the unitary group:

Cn={U:UPnU†=Pn}.\mathcal C_n = \left\{ U: U\mathcal P_nU^\dagger = \mathcal P_n \right\}.

Thus a Clifford unitary maps every Pauli string to another Pauli string under conjugation. Standard generators are Hadamard, the phase gate SS, and CNOT.

Gate Image of XjX_j Image of ZjZ_j
HjH_j ZjZ_j XjX_j
SjS_j YjY_j ZjZ_j

For CNOT with control cc and target tt,

Xc↦XcXt,Zc↦Zc,Xt↦Xt,Zt↦ZcZt.\begin{aligned} X_c&\mapsto X_cX_t,&Z_c&\mapsto Z_c,\\ X_t&\mapsto X_t,&Z_t&\mapsto Z_cZ_t. \end{aligned}

Signs must be updated as well. For example,

HYH=−Y,SYS†=−X.HYH=-Y, \qquad SYS^\dagger=-X.

If ∣ψ⟩|\psi\rangle is stabilized by SS, then U∣ψ⟩U|\psi\rangle is stabilized by

USU†={UgU†:g∈S}.USU^\dagger = \left\{ UgU^\dagger: g\in S \right\}.

This is the stabilizer analogue of Heisenberg evolution: update a compact list of observables instead of expanding the state vector.

Ignoring phases, Clifford conjugation induces a linear transformation

v⟼vF\mathbf v \longmapsto \mathbf vF

on binary row vectors. Commutation must be preserved, so

FΛFT=Λ.F\Lambda F^{\mathsf T} = \Lambda.

Such an FF is a binary symplectic matrix. The full Clifford operation requires both FF and phase data; the symplectic matrix alone cannot distinguish Cliffords that have the same action modulo Pauli signs.

Bell-state preparation by generator propagation

Section titled “Bell-state preparation by generator propagation”

Start from ∣00⟩|00\rangle, stabilized by

⟨Z1,Z2⟩.\langle Z_1,Z_2\rangle.

Apply H1H_1:

⟨Z1,Z2⟩⟼⟨X1,Z2⟩.\langle Z_1,Z_2\rangle \longmapsto \langle X_1,Z_2\rangle.

Then apply CNOT⁡1→2\operatorname{CNOT}_{1\to2}:

⟨X1,Z2⟩⟼⟨X1X2,Z1Z2⟩.\langle X_1,Z_2\rangle \longmapsto \langle X_1X_2,Z_1Z_2\rangle.

These are the generators of ∣Φ+⟩|\Phi^+\rangle. The computation never required writing its four amplitudes.

Code-preserving versus code-changing Cliffords

Section titled “Code-preserving versus code-changing Cliffords”

An arbitrary physical Clifford maps one stabilizer code to another code with conjugated stabilizer group. It implements a logical operation on the same code only when it preserves the code space, equivalently when

USU†=S.USU^\dagger=S.

It then maps logical Pauli representatives to logical Pauli representatives and induces a logical Clifford. A Clifford physical circuit is not automatically a valid fault-tolerant logical gate; error propagation and the code architecture still matter.

Let MM be a Hermitian Pauli, measured with projectors Πm=(I+mM)/2\Pi_m=(I+mM)/2 for outcomes m=±1m=\pm1. For a state ρ\rho supported on a stabilizer code, there are three possibilities.

A fixed check. If M∈SM\in S, the result is +1+1; if −M∈S-M\in S, it is −1-1. The encoded state is unchanged.

A logical measurement. If MM commutes with every stabilizer but M∉±SM\notin\pm S, the result depends on the logical state:

pm=1+mTr⁡(Mρ)2.p_m=\frac{1+m\operatorname{Tr}(M\rho)}2.

For a nonzero-probability outcome, append mMmM as a new independent stabilizer. The allowed subspace halves in dimension, and one logical degree of freedom has been measured. The old stabilizers alone do not determine pmp_m. For the maximally mixed code state the outcomes are equal; for a logical eigenstate one is certain.

A measurement anticommuting with a check. If some gjg_j anticommutes with MM, then PSMPS=0P_SMP_S=0. Both outcomes have probability 1/21/2 for every code state. Multiply each other anticommuting generator by gjg_j, then replace gjg_j by mMmM. The number of independent generators remains rr. Moreover,

Vm=2 ΠmPS,Vm†Vm=PS.\begin{gathered} V_m=\sqrt2\,\Pi_mP_S,\\ V_m^\dagger V_m=P_S. \end{gathered}

Each normalized branch is an isometry from the old code to the new one. Conditional on its known outcome, this measurement preserves the logical information, including entanglement with a reference. Ignoring the outcome can discard information needed to undo a branch-dependent change.

Two measurements of the same encoded state

Section titled “Two measurements of the same encoded state”

For ∣ψL⟩=α∣000⟩+β∣111⟩|\psi_L\rangle=\alpha|000\rangle+\beta|111\rangle, the checks are Z1Z2Z_1Z_2 and Z2Z3Z_2Z_3. Measuring X1X_1 anticommutes with the first check. For m=±1m=\pm1, the normalized output is

∣mx⟩1⊗(α∣00⟩+mβ∣11⟩)23,|m_x\rangle_1\otimes (\alpha|00\rangle+m\beta|11\rangle)_{23},

where ∣mx⟩=(∣0⟩+m∣1⟩)/2|m_x\rangle=(|0\rangle+m|1\rangle)/\sqrt2. Both outcomes have probability 1/21/2. Applying Z2Z_2 when m=−1m=-1 restores the same two-qubit encoding on carriers 2 and 3.

Measuring Z1Z_1 instead commutes with both checks and acts as logical ZZ. It returns +1+1 with probability ∣α∣2|\alpha|^2 and −1-1 with probability ∣β∣2|\beta|^2, leaving ∣000⟩|000\rangle or ∣111⟩|111\rangle. Those branches no longer contain the unknown relative amplitude and phase.

Measuring X1 preserves unknown amplitudes in conditional two-qubit output states, while measuring Z1 selects one logical basis state

Ideal measurements on the same repetition encoding have different effects. Measuring X1X_1 changes the stabilizer group while retaining both amplitudes in each branch. Measuring Z1Z_1 measures a logical observable. The first measurement has input-independent probabilities and retains the logical state in each conditional output; the second reveals logical ZZ.

These update rules describe ideal projective instruments. Syndrome measurement develops ancilla circuits, repeated noisy records and fault propagation.

A stabilizer tableau stores generator data as a binary matrix plus phase bits:

[X∣Z∣phase].\left[ X \mid Z \mid \text{phase} \right].

For a pure nn-qubit stabilizer state, one may track nn independent stabilizer rows. Simulation algorithms often add destabilizer rows or another canonical completion so that measurement outcomes and updates can be computed without repeating full Gaussian elimination.

The basic operations are:

  • generator multiplication: binary row addition plus phase update;
  • Clifford gate: local column and phase updates;
  • Pauli measurement: commutation test, deterministic evaluation or random outcome, then row replacement;
  • partial trace or mixed-state extension: reduce or augment the stored stabilizer data according to the chosen algorithm.

Tracking O(n)O(n) rows of 2n2n bits plus signs uses O(n2)O(n^2) bits. For a code, these rows describe the code subspace or its maximally mixed state; tracking an arbitrary encoded state requires additional logical-state information. Exact runtime depends on the tableau representation, operation sequence, sparsity, and requested output.

The Gottesman–Knill theorem states that circuits composed of:

  • stabilizer-state preparations;
  • Clifford gates;
  • Pauli measurements;
  • classical control conditioned on measurement outcomes, with polynomial-time classical processing;

can be simulated efficiently on a classical computer for standard sampling and stabilizer-tracking tasks.

These circuits can generate large entangled states, so entanglement alone does not imply difficult classical simulation. The theorem concerns specified simulation tasks and stabilizer inputs; it does not make every property of every quantum circuit easy, nor make an encoded Clifford gate automatically fault tolerant (Gottesman, 1998; Aaronson and Gottesman, 2004).

The reason for efficient updates is closure: Pauli descriptions remain Pauli descriptions. For example, the TT gate is non-Clifford because

TXT†=X+Y2,TXT^\dagger = \frac{X+Y}{\sqrt2},

which is not proportional to a Pauli operator. Adding nonstabilizer states, non-Clifford gates, or non-Pauli measurements breaks the basic tableau closure, though specialized algorithms can still exploit a small amount of nonstabilizer structure.

For subsystem codes, a gauge group can be noncommuting. Its central commuting constraints, with consistent signs and scalar phases removed, specify the stabilizer; gauge and protected logical degrees of freedom must be distinguished. Prime-dimensional qudits have a related construction over a finite field, while composite dimensions require modular and module methods (Hostens, Dehaene and De Moor, 2005). Bosonic codes require oscillator-specific operators and finite-energy considerations.

A sampled Pauli channel can be incorporated by applying randomly chosen Pauli updates. Generic coherent non-Clifford noise, amplitude damping or leakage does not preserve pure stabilizer states and needs an additional representation or approximation. Stabilizer simulation develops practical algorithms and noise sampling.

Finally, the same abstract stabilizer may be measured by circuits with different connectivity, depth and fault propagation. A decoder uses a noise model and often repeated outcomes to infer an error class. The algebra supplies exact code relations; those circuits and assumptions determine physical performance. Fault-tolerant gates connects the two.

Represent

P=X1Z2Y3,Q=Z1X2P=X_1Z_2Y_3, \qquad Q=Z_1X_2

as binary vectors, determine whether they commute, and calculate the full product PQPQ including its phase.

Solution

For PP,

xP=(1,0,1),zP=(0,1,1).\mathbf x_P=(1,0,1), \qquad \mathbf z_P=(0,1,1).

For QQ,

xQ=(0,1,0),zQ=(1,0,0).\mathbf x_Q=(0,1,0), \qquad \mathbf z_Q=(1,0,0).

The symplectic product is

ω(P,Q)=xP⋅zQ+zP⋅xQ=1+1=0(mod2).\begin{aligned} \omega(P,Q) &= \mathbf x_P\cdot\mathbf z_Q + \mathbf z_P\cdot\mathbf x_Q \\ &= 1+1 \\ &= 0 \pmod2. \end{aligned}

The strings commute. Directly, they anticommute on qubits 1 and 2, giving two minus signs. Their product is

PQ=(−iY1)(iY2)Y3=Y1Y2Y3.PQ=(-iY_1)(iY_2)Y_3=Y_1Y_2Y_3.

The binary phase rule gives q(v)=1q(\mathbf v)=1, q(w)=0q(\mathbf w)=0, z⋅x′=1\mathbf z\cdot\mathbf x'=1 and q(v+w)=3q(\mathbf v+\mathbf w)=3, hence η=1+0+2−3=0\eta=1+0+2-3=0.

Let S=⟨g1,g2,g3⟩S=\langle g_1,g_2,g_3\rangle be generated by three independent commuting nonidentity Paulis on five qubits, with −I∉S-I\notin S. Write the code projector and find the number of encoded qubits.

Solution

The projector is

PS=∏j=13I+gj2=18∑g∈Sg.\begin{aligned} P_S &= \prod_{j=1}^3 \frac{I+g_j}{2} \\ &= \frac18 \sum_{g\in S}g. \end{aligned}

There are r=3r=3 independent checks on n=5n=5 qubits, so

dim⁡C=25−3=4.\dim\mathcal C = 2^{5-3} = 4.

The code encodes

k=5−3=2k=5-3=2

logical qubits.

3. Check the logical Pauli representatives

Section titled “3. Check the logical Pauli representatives”

For the four-qubit [[4,2,2]][[4,2,2]] code with checks gX=XXXXg_X=XXXX and gZ=ZZZZg_Z=ZZZZ, verify that

X‾1=X1X2,Z‾1=Z2Z3,X‾2=X2X3,Z‾2=Z3Z4\begin{aligned} \overline X_1&=X_1X_2, & \overline Z_1&=Z_2Z_3, \\ \overline X_2&=X_2X_3, & \overline Z_2&=Z_3Z_4 \end{aligned}

have the required logical commutation relations.

Solution

Every listed operator has even overlap between its XX support and the support of gZg_Z, or between its ZZ support and gXg_X. Hence all commute with both stabilizers.

X‾1\overline X_1 and Z‾1\overline Z_1 overlap with different nonidentity Pauli factors only on qubit 2, so they anticommute. Likewise, X‾2\overline X_2 and Z‾2\overline Z_2 overlap only on qubit 3 and anticommute.

The cross pair X‾1,Z‾2\overline X_1,\overline Z_2 has no conflicting overlap, so it commutes. The cross pair X‾2,Z‾1\overline X_2,\overline Z_1 has conflicting overlap on qubits 2 and 3, giving two minus signs, so it also commutes. Same-type logical operators commute.

All representatives have weight 22 and none is a stabilizer. Since every weight-11 Pauli is detected, this also confirms d=2d=2.

Start from ∣00⟩|00\rangle with stabilizers ⟨Z1,Z2⟩\langle Z_1,Z_2\rangle and measure M=X1X2M=X_1X_2. Find updated generators for outcomes m=±1m=\pm1 and identify the postmeasurement states.

Solution

MM anticommutes with both Z1Z_1 and Z2Z_2. Choose g1=Z1g_1=Z_1. Replace the other anticommuting generator by

g2′=Z1Z2,g_2' = Z_1Z_2,

which commutes with MM. Replace g1g_1 by mMmM. The updated stabilizer group is

⟨mX1X2,Z1Z2⟩.\langle mX_1X_2, Z_1Z_2 \rangle.

For m=+1m=+1, the state is

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

For m=−1m=-1, the state is

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

Each outcome has probability 1/21/2.

In the [[4,2,2]][[4,2,2]] code, show that X1X_1 and X2X_2 have the same syndrome but cannot both be corrected by one syndrome-conditioned recovery.

Solution

Both errors commute with gXg_X and anticommute with gZg_Z, so each has syndrome

(0,1).(0,1).

Their relative product is

X1†X2=X1X2=X‾1.X_1^\dagger X_2 = X_1X_2 = \overline X_1.

This operator belongs to N(S)∖SN(S)\setminus S and acts as a nontrivial logical Pauli. If one recovery corrects X1X_1, applying that same recovery after X2X_2 leaves a logical X‾1\overline X_1 error, or vice versa. Equal syndromes are safe only when the relative product is a stabilizer, not a logical operator.

Explain why

TXT†=X+Y2TXT^\dagger = \frac{X+Y}{\sqrt2}

proves that TT is not a Clifford gate. Does applying it always turn a stabilizer state into a nonstabilizer state?

Solution

A Clifford unitary must map every Pauli operator to another Pauli operator under conjugation. The operator

X+Y2\frac{X+Y}{\sqrt2}

is a coherent linear combination of two distinct Pauli matrices and is not proportional to II, XX, YY, or ZZ. Therefore TT does not normalize the Pauli group and is non-Clifford. But T∣0⟩=∣0⟩T|0\rangle=|0\rangle remains a stabilizer state. In contrast, T∣+⟩T|+\rangle has Bloch vector (1/2,1/2,0)(1/\sqrt2,1/\sqrt2,0), outside the six single-qubit pure stabilizer directions. Non-Clifford gates do not preserve the entire set; they need not take every member outside it.

  • S. Aaronson and D. Gottesman, “Improved simulation of stabilizer circuits,” Physical Review A 70, 052328 (2004), arXiv:quant-ph/0406196 — tableau simulation and measurement updates.
  • J. Dehaene and B. De Moor, “Clifford group, stabilizer states, and linear and quadratic operations over GF(2),” Physical Review A 68, 042318 (2003), arXiv:quant-ph/0304125 — binary and phase descriptions of Clifford operations.
  • D. Gottesman, Stabilizer Codes and Quantum Error Correction, Ph.D. thesis, California Institute of Technology (1997), arXiv:quant-ph/9705052 — code projectors, logical operators, distance and error correction.
  • D. Gottesman, “The Heisenberg representation of quantum computers,” in Group22: Proceedings of the XXII International Colloquium on Group Theoretical Methods in Physics (1999), arXiv:quant-ph/9807006 — observable propagation and efficient simulation.
  • E. Hostens, J. Dehaene and B. De Moor, “Stabilizer states and Clifford operations for systems of arbitrary dimensions and modular arithmetic,” Physical Review A 71, 042315 (2005), doi:10.1103/PhysRevA.71.042315 — extension beyond qubits.