Skip to content

Why Quantum Error Correction Is Possible

Quantum error correction protects an unknown state by encoding it into a larger system. Correctable errors change the physical state in ways that can be reversed without learning the logical amplitudes. The central test is the Knill–Laflamme condition: every pair of errors must act on the code with an overlap that is independent of the logical input. This page develops that exact, finite-dimensional result; noisy recovery circuits require the additional ideas of fault tolerance.

Helpful background. Quantum information carriers introduces logical encodings, no-cloning explains why independent copies are impossible, and noise channels introduces Kraus operators.

Encoding preserves one distributed quantum state

Section titled “Encoding preserves one distributed quantum state”

Let HL\mathcal H_L be a logical Hilbert space and HP\mathcal H_P a larger physical Hilbert space. An encoding is an isometry

V:HL⟶HP,V†V=IL.V:\mathcal H_L\longrightarrow\mathcal H_P, \qquad V^\dagger V=I_L.

Its image

C=VHL\mathcal C=V\mathcal H_L

is the code subspace, with projector

P=VV†.P=VV^\dagger.

For a logical qubit,

∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha|0\rangle+\beta|1\rangle

is encoded as

∣ψL⟩=V∣ψ⟩=α∣0L⟩+β∣1L⟩.|\psi_L\rangle = V|\psi\rangle = \alpha|0_L\rangle+\beta|1_L\rangle.

The amplitudes α\alpha and β\beta still describe one quantum state. They have not been placed into several independent systems, each in state ∣ψ⟩|\psi\rangle. Physical subsystems can be entangled, and their reduced states generally do not equal the original logical state.

For example, the bit-flip repetition encoding gives

α∣0⟩+β∣1⟩⟼α∣000⟩+β∣111⟩.\alpha|0\rangle+\beta|1\rangle \longmapsto \alpha|000\rangle+\beta|111\rangle.

Tracing out any two carriers removes the phase coherence from the remaining carrier:

ρ1=∣α∣2∣0⟩⟨0∣+∣β∣2∣1⟩⟨1∣.\rho_1 = |\alpha|^2|0\rangle\langle0| + |\beta|^2|1\rangle\langle1|.

Thus no physical qubit is an independent copy of the unknown input. The encoded correlations carry information that no one carrier carries alone. The three-qubit codes develop the corresponding parity measurements and recovery circuits.

This distinction is exactly compatible with No-Cloning and No-Signaling. No-cloning forbids a universal map

∣ψ⟩∣0⟩⟼∣ψ⟩∣ψ⟩,|\psi\rangle|0\rangle \longmapsto |\psi\rangle|\psi\rangle,

not an isometric change of representation

∣ψ⟩⟼V∣ψ⟩.|\psi\rangle \longmapsto V|\psi\rangle.

An encoding can also preserve entanglement with an external reference RR:

∣Ψ⟩RL⟼(IR⊗V)∣Ψ⟩RL.|\Psi\rangle_{RL} \longmapsto (I_R\otimes V)|\Psi\rangle_{RL}.

Preserving this reference entanglement is essential. A memory that reproduces isolated basis states but destroys their coherence is not a quantum error-correcting memory.

Measure an error sector while preserving amplitudes

Section titled “Measure an error sector while preserving amplitudes”

Suppose a collection of errors moves the code into mutually orthogonal sectors while acting identically on the logical information. In an ideal nondegenerate form, normalized error operators FrF_r obey

PFr†FsP=δrsP.P F_r^\dagger F_s P = \delta_{rs}P.

Then each FrF_r maps the code isometrically into an orthogonal subspace. A coherent syndrome-extraction operation can implement

Fr∣ψL⟩∣0⟩S⟼Fr∣ψL⟩∣r⟩S,F_r|\psi_L\rangle|0\rangle_S \longmapsto F_r|\psi_L\rangle|r\rangle_S,

where the ancilla label rr identifies the error sector. Crucially, the same label is produced for every ∣ψL⟩|\psi_L\rangle in the code. A conditional inverse can then restore the data:

Fr∣ψL⟩∣r⟩S⟼∣ψL⟩∣r⟩S.F_r|\psi_L\rangle|r\rangle_S \longmapsto |\psi_L\rangle|r\rangle_S.

The syndrome register may be measured to obtain classical data, or retained coherently in a larger recovery circuit. Either way, the logical amplitudes do not appear in the syndrome distribution.

A physical syndrome circuit is itself imperfect. Ancilla faults can propagate to the data, measurements can be wrong, and repeated rounds can be correlated. Designing the extraction so that a small number of component faults cannot become an uncorrectable data error is a problem of fault tolerance, not a consequence of ideal syndrome measurability.

Let the physical noise channel have a Kraus representation

N(ρ)=∑aEaρEa†,∑aEa†Ea=I.\mathcal N(\rho) = \sum_a E_a\rho E_a^\dagger, \qquad \sum_a E_a^\dagger E_a=I.

The code C\mathcal C is exactly correctable for N\mathcal N when there is a completely positive trace-preserving recovery channel R\mathcal R such that

(R∘N)(ρ)=ρ(\mathcal R\circ\mathcal N)(\rho) = \rho

for every density operator ρ\rho supported on C\mathcal C. The Knill–Laflamme theorem (Knill and Laflamme, 1997) states that such a recovery exists if and only if

PEa†EbP=cabPP E_a^\dagger E_b P = c_{ab}P

for every pair a,ba,b.

In an orthonormal logical basis {∣iL⟩}\{|i_L\rangle\}, the same condition is

⟨iL∣Ea†Eb∣jL⟩=cabδij.\langle i_L|E_a^\dagger E_b|j_L\rangle = c_{ab}\delta_{ij}.

This has two complementary meanings:

  • the factor δij\delta_{ij} prevents correctable errors from confusing distinct logical basis states;
  • the coefficient cabc_{ab} is independent of ii, so error records cannot reveal the logical basis label.

The matrix CC is positive semidefinite. For the Kraus operators of a trace-preserving channel, ∑acaa=1\sum_a c_{aa}=1. An unweighted error basis need not have this normalization. The errors need not create distinct syndrome outcomes, and the criterion is unchanged by choosing another Kraus representation of the same channel.

Why the environment must learn nothing logical

Section titled “Why the environment must learn nothing logical”

A Stinespring representation of the noise can be written as

W∣ψL⟩=∑aEa∣ψL⟩∣a⟩E.W|\psi_L\rangle = \sum_a E_a|\psi_L\rangle|a\rangle_E.

After tracing out the physical system, the environment state is

ρE(ψ)=∑a,b⟨ψL∣Eb†Ea∣ψL⟩∣a⟩⟨b∣E.\rho_E(\psi) = \sum_{a,b} \langle\psi_L|E_b^\dagger E_a|\psi_L\rangle |a\rangle\langle b|_E.

If the Knill–Laflamme condition holds, then

ρE(ψ)=∑a,bcba∣a⟩⟨b∣E,\rho_E(\psi) = \sum_{a,b} c_{ba}|a\rangle\langle b|_E,

which is independent of ∣ψL⟩|\psi_L\rangle. The environment may contain error information, but it contains no logical information. This is the information-theoretic heart of exact correction.

Conversely, if the environment can distinguish two logical inputs, some logical information has leaked out. No recovery acting only on the physical output can then restore every logical input exactly, including its entanglement with a reference.

Consider the repetition code above and two channels with equal branch weights:

NQ(ρ)=12ρ+12QρQ,Q=X1 or Z1.\mathcal N_Q(\rho)=\tfrac12\rho+\tfrac12 Q\rho Q, \qquad Q=X_1\text{ or }Z_1.

In a dilation with Kraus operators I/2I/\sqrt2 and Q/2Q/\sqrt2, the environment state is

ρE=12(1⟨Q⟩⟨Q⟩1).\rho_E=\frac12 \begin{pmatrix} 1&\langle Q\rangle\\ \langle Q\rangle&1 \end{pmatrix}.

Measuring the environment in its ∣0⟩,∣1⟩|0\rangle,|1\rangle basis always gives equal probabilities. But the off-diagonal entries can still carry information. For Q=X1Q=X_1, every code state has ⟨X1⟩=0\langle X_1\rangle=0, so ρE=I/2\rho_E=I/2 for every logical input. For Q=Z1Q=Z_1, the inputs ∣0L⟩|0_L\rangle and ∣1L⟩|1_L\rangle produce orthogonal environment states ∣+⟩E|+\rangle_E and ∣−⟩E|-\rangle_E. An environment measurement in that basis perfectly distinguishes them. Correctability requires the whole environment state to be independent of the logical input, not merely the probabilities of one chosen measurement.

Environment plus-outcome probabilities are equal for both logical basis states under correctable bit flips, but are one and zero under phase flips

The same repetition encoding responds differently to equally weighted I/X1I/X_1 and I/Z1I/Z_1 noise. The plotted measurement projects the environment onto ∣+⟩E=(∣0⟩E+∣1⟩E)/2|+\rangle_E=(|0\rangle_E+|1\rangle_E)/\sqrt2. Bit-flip noise leaves the environment maximally mixed for every code state. Phase-flip noise lets this measurement distinguish the logical basis states, so the unknown logical qubit cannot be recovered exactly.

The recovery can be constructed conceptually from the Knill–Laflamme matrix. Diagonalize CC by a unitary change of error basis:

Fr=∑auraEa,F_r = \sum_a u_{ra}E_a,

so that

PFr†FsP=λrδrsP,λr≥0.P F_r^\dagger F_s P = \lambda_r\delta_{rs}P, \qquad \lambda_r\geq0.

For every λr>0\lambda_r>0, define the partial isometry on the code by

VrP=FrPλr.V_rP = \frac{F_rP}{\sqrt{\lambda_r}}.

Then

PVr†VsP=δrsP.P V_r^\dagger V_s P = \delta_{rs}P.

The ranges of the VrPV_rP are therefore orthogonal error sectors, and each sector is an isometric image of the entire code. A recovery can:

  1. project onto those sectors;
  2. record the sector label rr;
  3. apply Vr†V_r^\dagger on sector rr;
  4. send any orthogonal remainder to a fixed normalized code state, completing a trace-preserving map.

On a state supported on the code, the recovered contributions sum to ∑rλrρ=ρ\sum_r\lambda_r\rho=\rho. Every correctable branch returns with its logical amplitudes intact. Directions with λr=0\lambda_r=0 have no action on the code and require no correction.

This construction is a proof of existence, not automatically a practical circuit. Efficient syndrome extraction, decoding, locality, ancilla preparation, and fault propagation depend on the code and hardware.

A finite operator span covers continuous errors

Section titled “A finite operator span covers continuous errors”

The phrase “quantum errors are continuous” sounds fatal only if every possible operator must be corrected separately. Operators form a vector space. For one qubit, any linear operator can be expanded as

A=aI+bX+cY+dZ.A = aI+bX+cY+dZ.

If a code corrects a basis of errors {Ea}\{E_a\} with one recovery, the same recovery corrects every trace-preserving noise channel whose Kraus operators lie in their linear span. Indeed, for

Fμ=∑afμaEa,Gν=∑bgνbEb,F_\mu = \sum_a f_{\mu a}E_a, \qquad G_\nu = \sum_b g_{\nu b}E_b,

the Knill–Laflamme condition gives

PFμ†GνP=∑a,bfμa∗gνbPEa†EbP=(∑a,bfμa∗gνbcab)P.\begin{aligned} P F_\mu^\dagger G_\nu P &= \sum_{a,b} f_{\mu a}^*g_{\nu b} P E_a^\dagger E_bP \\ &= \left( \sum_{a,b} f_{\mu a}^*g_{\nu b}c_{ab} \right)P. \end{aligned}

The new coefficient is still independent of the logical state.

Consider a small unwanted rotation on physical carrier jj:

Uϵ=e−iϵXj/2=cos⁡ϵ2 I−isin⁡ϵ2 Xj.U_\epsilon = e^{-i\epsilon X_j/2} = \cos\frac{\epsilon}{2}\,I - i\sin\frac{\epsilon}{2}\,X_j.

Suppose II and XjX_j map the code to orthogonal correctable sectors, as they do for the repetition code. This orthogonality is an additional assumption; correctability alone also permits degenerate errors. An ideal coherent recovery can act as

UrecUϵ∣ψL⟩∣0⟩S=∣ψL⟩(cos⁡ϵ2∣0⟩S−isin⁡ϵ2∣xj⟩S).U_{\mathrm{rec}} U_\epsilon|\psi_L\rangle|0\rangle_S = |\psi_L\rangle \bigg( \cos\frac{\epsilon}{2}|0\rangle_S - i\sin\frac{\epsilon}{2}|x_j\rangle_S \bigg).

The logical state factors from the syndrome. If the syndrome is measured, the two outcomes occur with probabilities

p0=cos⁡2ϵ2,pxj=sin⁡2ϵ2,p_0 = \cos^2\frac{\epsilon}{2}, \qquad p_{x_j} = \sin^2\frac{\epsilon}{2},

independent of α\alpha, β\beta, or any reference entanglement. The continuous angle changes the branch amplitudes, not the requirement to enumerate infinitely many separate corrections.

This reasoning does not mean that the physical noise secretly was a classical Pauli fault. Before syndrome extraction, the II and XjX_j branches can be coherent. Exact recovery works on their linear span; replacing the process by a stochastic Pauli channel is a separate modeling approximation.

For amplitude damping on one qubit,

E0=∣0⟩⟨0∣+1−γ ∣1⟩⟨1∣,E1=γ ∣0⟩⟨1∣.\begin{aligned} E_0 &= |0\rangle\langle0| + \sqrt{1-\gamma}\, |1\rangle\langle1|, \\ E_1 &= \sqrt{\gamma}\, |0\rangle\langle1|. \end{aligned}

These operators lie in the Pauli span:

E0=1+1−γ2I+1−1−γ2Z,E1=γ2(X+iY).\begin{aligned} E_0 &= \frac{1+\sqrt{1-\gamma}}{2}I + \frac{1-\sqrt{1-\gamma}}{2}Z, \\ E_1 &= \frac{\sqrt{\gamma}}{2}(X+iY). \end{aligned}

Therefore a code that exactly corrects every one-qubit Pauli operator on carrier jj also corrects the full one-qubit amplitude-damping channel there under the ideal channel model. To protect against one unknown affected carrier, the code must correct the union of these Pauli errors over all carriers. Independent damping on every carrier also produces terms affecting several carriers; exact correction of the single-carrier channel does not cover that entire process.

Distance distinguishes unknown errors from erasures

Section titled “Distance distinguishes unknown errors from erasures”

An nn-qubit code encoding kk logical qubits is commonly labeled [[n,k,d]][[n,k,d]]. Its distance can be defined as the minimum weight of a Pauli operator QQ that is not detectable:

d=min⁡Q{wt⁡(Q):PQP≠cQP}.d = \min_Q \left\{ \operatorname{wt}(Q): PQP\neq c_QP \right\}.

Here wt⁡(Q)\operatorname{wt}(Q) is the number of physical qubits on which QQ acts nontrivially. Thus every Pauli error of weight less than dd is detectable in the quantum-code sense: its projection back into the code acts as a scalar. A scalar action can be harmless and need not produce a flag announcing that a physical event occurred.

To correct arbitrary errors on at most tt unknown qubits, the Knill–Laflamme condition must hold for every product Ea†EbE_a^\dagger E_b of two such errors. That product can have weight as large as 2t2t. Hence

2t<d2t<d

is sufficient, or equivalently

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

A distance-dd code therefore:

  • detects arbitrary errors on up to d−1d-1 qubits;
  • corrects arbitrary errors on up to ⌊(d−1)/2⌋\lfloor(d-1)/2\rfloor unknown locations;
  • corrects loss or arbitrary corruption of up to d−1d-1 known carriers, when the location flags are reliable and the remaining carriers are available for recovery.

The distinction between known and unknown locations matters. An erasure flag supplies location information, so the recovery does not have to distinguish all pairs of possible damaged supports.

Distance is not a complete performance prediction. Equal-distance codes can have very different syndrome circuits, degeneracy, decoder behavior, thresholds, logical biases, connectivity requirements, and finite-size error rates.

Different errors can have the same correctable action

Section titled “Different errors can have the same correctable action”

Classical intuition suggests that every correctable error should have a unique syndrome. Quantum codes need not obey that rule. Relative to a linearly independent error family, a code is degenerate when the restricted actions EaPE_aP are linearly dependent. Distinct errors acting identically on the code are an important example.

If

EaP=EbP,E_aP = E_bP,

then no measurement can distinguish EaE_a from EbE_b on encoded states, but none is needed. The same recovery corrects both. In a stabilizer code, errors that differ by a stabilizer act identically on code states, up to an irrelevant phase.

For a linearly independent error family, degeneracy makes CC rank deficient. Off-diagonal entries alone do not establish degeneracy: an invertible change of error basis can produce them even when the restricted actions remain independent. Diagonalizing CC identifies orthogonal error actions, which need not match the original laboratory labels.

Degeneracy can be useful, but it does not make all correlated or high-weight errors harmless. A decoder must reason over equivalence classes and choose a correction whose product with the actual error is logically trivial.

Exact correction is a statement about a code and a specified channel. It does not assert that every laboratory error is correctable. Nor does it show that the recovery circuit tolerates faults in its own gates, ancillas and measurements. Fault-tolerant gates and the threshold theorem address those additional requirements.

Approximate correction instead asks how close the recovered channel is to the identity. Worst-case entanglement fidelity includes inputs entangled with a reference; a channel-distance criterion is another choice. Small matrix-element deviations from Knill–Laflamme must be related to the chosen operational measure, rather than interpreted as an error probability by themselves (Bény and Oreshkov, 2010).

The same information-separation idea also explains decoherence-free subspaces: if the noise already acts trivially on the protected information, active correction may be unnecessary. Error mitigation addresses a different task, improving estimated observables without necessarily restoring an unknown quantum state.

For concrete applications, begin with the three-qubit codes. The five-qubit, Shor and Steane codes then protect against general single-qubit errors, with different uses of degeneracy. Gottesman’s introduction gives a detailed route from these algebraic ideas to fault tolerance.

For

∣ψL⟩=α∣000⟩+β∣111⟩,|\psi_L\rangle = \alpha|000\rangle+\beta|111\rangle,

compute the reduced state of the first qubit. Compare it with ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle=\alpha|0\rangle+\beta|1\rangle and explain why the encoding is not a cloning operation.

Solution

The encoded density operator contains diagonal terms and two cross terms. Tracing over qubits 2 and 3 gives

ρ1=∣α∣2∣0⟩⟨0∣+∣β∣2∣1⟩⟨1∣+αβ∗⟨11∣00⟩∣0⟩⟨1∣+α∗β⟨00∣11⟩∣1⟩⟨0∣=∣α∣2∣0⟩⟨0∣+∣β∣2∣1⟩⟨1∣.\begin{aligned} \rho_1 &= |\alpha|^2|0\rangle\langle0| + |\beta|^2|1\rangle\langle1| + \alpha\beta^* \langle11|00\rangle |0\rangle\langle1| + \alpha^*\beta \langle00|11\rangle |1\rangle\langle0|\\ &= |\alpha|^2|0\rangle\langle0| + |\beta|^2|1\rangle\langle1|. \end{aligned}

The original state has off-diagonal terms αβ∗∣0⟩⟨1∣\alpha\beta^*|0\rangle\langle1| and its adjoint. Except in special cases, ρ1≠∣ψ⟩⟨ψ∣\rho_1\neq|\psi\rangle\langle\psi|. For ∣ψ⟩=∣+⟩|\psi\rangle=|+\rangle, each physical qubit is maximally mixed even though the three-qubit state is pure. The phase information resides in correlations.

Let

C=span⁡{∣000⟩,∣111⟩}\mathcal C = \operatorname{span} \{ |000\rangle, |111\rangle \}

and consider {I,X1,X2,X3}\{I,X_1,X_2,X_3\}. Show that cab=δabc_{ab}=\delta_{ab} for this error set.

Solution

For a=ba=b, Ea†Ea=IE_a^\dagger E_a=I, so

PEa†EaP=P.P E_a^\dagger E_aP=P.

For a≠ba\neq b, the product is either one bit flip XiX_i or two bit flips XiXjX_iX_j. Every such operator maps both ∣000⟩|000\rangle and ∣111⟩|111\rangle to computational-basis states orthogonal to the code. Hence

PEa†EbP=0P E_a^\dagger E_bP=0

when a≠ba\neq b. Therefore cab=δabc_{ab}=\delta_{ab}, and the set, together with its linear span, is exactly correctable.

3. Why the repetition code misses phase flips

Section titled “3. Why the repetition code misses phase flips”

Use the Knill–Laflamme condition to show that the same code does not correct the set {I,Z1}\{I,Z_1\}.

Solution

The cross term is

PZ1P.PZ_1P.

On the logical basis,

Z1∣000⟩=∣000⟩,Z1∣111⟩=−∣111⟩.\begin{aligned} Z_1|000\rangle &= |000\rangle, \\ Z_1|111\rangle &= -|111\rangle. \end{aligned}

Thus

PZ1P=∣0L⟩⟨0L∣−∣1L⟩⟨1L∣,PZ_1P = |0_L\rangle\langle0_L| - |1_L\rangle\langle1_L|,

which is a logical ZZ operator and is not proportional to PP. The environment could distinguish logical basis states through this error action, so the set fails the criterion.

Assume a code detects every Pauli operator of weight less than dd. Show that it corrects every error supported on at most tt unknown qubits when 2t<d2t<d.

Solution

Expand each error on at most tt carriers in the Pauli basis. It is enough to test Pauli errors EaE_a and EbE_b of weight at most tt. Their product satisfies

wt⁡(Ea†Eb)≤wt⁡(Ea)+wt⁡(Eb)≤2t.\operatorname{wt}(E_a^\dagger E_b) \leq \operatorname{wt}(E_a) + \operatorname{wt}(E_b) \leq 2t.

If 2t<d2t<d, every product is detectable, so

PEa†EbP=cabP.P E_a^\dagger E_bP = c_{ab}P.

The Knill–Laflamme condition then holds for the entire operator span. Solving 2t<d2t<d for integer tt gives

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

Let SS satisfy SP=PSP=P, and let Eb=EaSE_b=E_aS. Show that EaE_a and EbE_b have identical action on the code. Why should a decoder not try to distinguish them?

Solution

Using SP=PSP=P,

EbP=EaSP=EaP.E_bP = E_aSP = E_aP.

The two physical operators therefore produce exactly the same corrupted code state for every logical input. Any recovery that corrects one corrects the other. Attempting to distinguish them cannot improve the logical action and may be impossible. A decoder should identify the relevant equivalence class and choose a correction whose product with the actual error acts trivially on the code.

Why can a known application of Z1Z_1 be reversed on the repetition code even though the set {I,Z1}\{I,Z_1\} is not correctable? For the equally weighted channel in the figure, compute the overlap of the environment states produced by ∣0L⟩|0_L\rangle and ∣1L⟩|1_L\rangle.

Solution

For the single known error E1=Z1E_1=Z_1, the only Knill–Laflamme product is E1†E1=IE_1^\dagger E_1=I; applying Z1Z_1 reverses it. For the uncertain family {I,Z1}\{I,Z_1\}, one common recovery must handle both possibilities without being told which occurred. The cross product Z1Z_1 acts as logical ZZ, so that family fails the criterion.

In the equally weighted channel, the two environment states are ∣+⟩E|+\rangle_E and ∣−⟩E|-\rangle_E, with overlap zero. Access to the physical output alone cannot remove this leaked logical information. If an external classical flag specifies which error occurred, the accessible channel is different and conditional reversal becomes possible.

  • C. Bény and O. Oreshkov, “General conditions for approximate quantum error correction and near-optimal recovery channels,” Physical Review Letters 104, 120501 (2010), doi:10.1103/PhysRevLett.104.120501 — operational criteria for approximate recovery.
  • 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 — error spans, distance, stabilizer codes and fault tolerance.
  • E. Knill and R. Laflamme, “Theory of quantum error-correcting codes,” Physical Review A 55, 900–911 (1997), doi:10.1103/PhysRevA.55.900 — the exact correctability theorem and reference-entanglement interpretation.
  • 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 derivations and examples.