Skip to content

Why Quantum Error Correction Is Possible

Quantum error correction is possible because it does not copy an unknown quantum state and does not measure its logical amplitudes. It instead:

  1. embeds the logical state isometrically into a larger physical Hilbert space;
  2. stores redundancy in correlations among physical degrees of freedom;
  3. arranges correctable errors so that they alter an error label, or syndrome, without revealing the logical state;
  4. uses that syndrome to reverse the error or update a tracked correction.

The exact mathematical test is the Knill–Laflamme condition. If PP projects onto a code subspace and {Ea}\{E_a\} is a set of errors, then the set is exactly correctable if and only if

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

for a matrix C=(cab)C=(c_{ab}) independent of the encoded state. This says that the environment and syndrome degrees of freedom may learn which correctable error sector occurred, but they cannot learn which logical state was encoded.

The result resolves three apparent obstacles at once:

Apparent obstacleResolution
Unknown states cannot be clonedEncoding creates one distributed logical state, not independent copies
Measurement generally disturbs a stateSyndrome measurements distinguish error sectors, not logical alternatives
Physical errors vary continuouslyLinearity reduces an operator-valued continuum to a correctable operator span

These are statements about an ideal code and a declared error set. They do not by themselves show that noisy correction circuitry is fault tolerant, that a device is below threshold, or that the logical error rate is useful.

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. Bits, Qubits, Qudits, and Modes gives the worked bit-flip-code example; the later code pages own its complete stabilizer and recovery analysis.

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 the Error Sector, Not the Logical State

Section titled “Measure the Error Sector, Not the Logical State”

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.

Quantum error correction separates a correctable error label from the protected logical amplitudes

Information separation in exact quantum error correction. After diagonalizing the Knill–Laflamme matrix, correctable errors occupy orthogonal sectors labeled by rr. Recovery returns every sector to the same logical state while a syndrome record retains rr but no information about the amplitudes αi\alpha_i.

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 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. It need not be diagonal, and the errors EaE_a need not create distinct syndrome outcomes. The condition is also independent of the chosen Kraus representation because changing Kraus operators only changes the spanning set by a linear isometry.

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. A recovery acting only on the physical output cannot in general reconstruct arbitrary entanglement with a reference while also erasing that leaked distinguishability.

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. map any unmodeled orthogonal remainder to a declared fallback state.

Every correctable branch is returned to the code 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.

Linearity Makes Continuous Errors Correctable

Section titled “Linearity Makes Continuous Errors Correctable”

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\}, it corrects every error 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 the code corrects both II and XjX_j. An ideal coherent recovery can act as

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

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. Device-level relaxation, leakage, simultaneous faults, and imperfect recovery still require a larger model.

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.

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 erasure of up to d−1d-1 known locations, subject to the code and erasure model.

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.

Classical intuition suggests that every correctable error should have a unique syndrome. Quantum codes need not obey that rule. A code is degenerate when distinct physical errors have the same action on the code.

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.

This is why C=(cab)C=(c_{ab}) in the Knill–Laflamme condition may have off-diagonal entries or reduced rank. Diagonalizing CC identifies independent error actions on the code, not necessarily 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, Approximate Correction, and Fault Tolerance

Section titled “Exact Correction, Approximate Correction, and Fault Tolerance”

The exact Knill–Laflamme condition is a structural theorem. Real devices usually operate in an approximate, repeated, and noisy regime.

LayerWhat it doesWhat it does not establish by itself
Error detectionFlags departure from a chosen sector or violated checksA recovery exists or accepted states are unbiased
Error mitigationReduces estimator bias or suppresses selected effects without a protected logical memoryArbitrarily long reliable computation
Exact QECRestores every code state for a declared channel or error spanThe recovery circuit tolerates its own faults
Approximate QECOptimizes a fidelity or distance when exact correction is impossible or inefficientA universal hardware-independent performance level
Fault toleranceLimits how component faults propagate through logical preparation, gates, measurement, and recoveryA particular device is below threshold

Approximate correction replaces exact equality by an operational error criterion, often worst-case entanglement fidelity or a channel distance after optimized recovery. Small violations of Knill–Laflamme can be tolerable, but matrix-element closeness must be connected to a declared metric and input set.

Decoherence-Free Subspaces provide a related passive mechanism. There the relevant noise acts trivially on the protected subsystem, so active syndrome extraction may be unnecessary while the symmetry holds. Active QEC is broader because it can reverse errors that move states into distinct sectors.

Fault tolerance adds the crucial fact that correction components are noisy. A useful architecture must control:

  • faults that spread through multi-qubit gates;
  • wrong or missing syndrome bits;
  • measurement and reset latency;
  • leakage and seepage outside the modeled code space;
  • spatial, temporal, and common-mode correlations;
  • decoder approximation and backlog;
  • logical state preparation and destructive measurement;
  • implementation of logical gates without defeating the code;
  • entropy removal when ancillas are reset.

The Noise in Quantum Information taxonomy and Common Noise Models model cards should be read before turning a code-distance statement into a hardware claim.

Noise, Channels, and Error Mitigation supplies the broader model-to-decision record. Error Mitigation Overview owns the estimator-level boundary among suppression, filtering, mitigation, encoded correction, and fault tolerance, including total-resource and validation tests; this page retains the error-subspace logic, Knill–Laflamme criterion, correctability proofs, distance, degeneracy, and approximate-correction boundary.

Limits of Error Mitigation owns when loss of distinguishability, sampling cost, model error, or matched-budget evidence requires a finite mitigation claim to narrow, stop, or escalate; this page retains encoded correctability, recovery, and fault-tolerant protection.

Quantum Error Correction and Fault Tolerance places this page’s correctability certificate inside the broader extraction, decoding, logical-operation, evidence, threshold, and resource record; this page retains the no-cloning resolution, Knill–Laflamme criterion, distance, degeneracy, and exact-to-approximate correction boundary.

Pauli Group and Stabilizers turns a small signed Pauli list into a phase-safe compatibility, independence, dimension, and commutation-signature audit; this page retains the Knill–Laflamme correctability theorem, distance, degeneracy, and exact-to-approximate correction boundary.

Three-Qubit Codes realizes the bit- and phase-flip repetition examples as explicit codewords, checks, syndrome cosets, and ideal recoveries; this page retains their general Knill–Laflamme justification and operator-span boundary.

Five-Qubit Code owns the code-specific sixteen-error Knill–Laflamme matrix, Hamming-bound packing equality, and Singleton-bound application; this page retains the general correctability theorem and its assumptions.

Shor Code owns the degenerate code-specific matrix I19⊕J3⊕3I_{19}\oplus J_3^{\oplus3}, its rank, and the operator-span application for the nine-qubit construction; this page retains the general theorem and its assumptions.

Steane Code owns the nondegenerate code-specific matrix I22I_{22} and its operator-span application for the seven-qubit construction; this page retains the general theorem and its assumptions.

For a proposed code and noise model, ask:

  1. What is encoded? State the logical Hilbert space, encoding isometry, code projector, and physical Hilbert space.
  2. What is the error set? Give Kraus operators, an operator span, a locality class, or a controlled approximation with parameter range.
  3. Does the Knill–Laflamme test hold? Evaluate PEa†EbPP E_a^\dagger E_bP for every required pair.
  4. What information reaches the environment? Check whether the complementary output depends on the logical input.
  5. How is the syndrome obtained? Specify ancillas, interactions, measurement schedule, repeated rounds, and classical record.
  6. What is the recovery? State the correction map or decoder-to-frame-update rule.
  7. Which faults occur during recovery? Include propagation, leakage, crosstalk, reset, measurement, and latency.
  8. What is the metric? Use logical channel error, entanglement fidelity, memory lifetime, or another task-matched quantity.
  9. What is the scaling evidence? Compare code sizes or distances at fixed physical conditions and report uncertainty.

Passing the algebraic test establishes ideal correctability for the declared errors. Passing the full audit is what begins to support an engineering claim.

  • Saying QEC “copies the state many times.” It creates one encoded state with structured correlations.
  • Saying syndrome measurement avoids disturbance because it is weak. Ideal syndrome measurement can be projective; what matters is that it reveals no logical information.
  • Treating every distinct physical error as requiring a distinct syndrome. Degenerate errors can share a correction.
  • Claiming that continuous errors invalidate discrete-error codes. Correctability applies to an operator span.
  • Assuming a Pauli expansion turns coherent noise into a stochastic Pauli channel.
  • Saying distance dd corrects d−1d-1 arbitrary unknown-location errors. It corrects at most ⌊(d−1)/2⌋\lfloor(d-1)/2\rfloor such errors.
  • Equating successful postselection with deterministic correction.
  • Ignoring entanglement with a reference when defining recovery fidelity.
  • Inferring a threshold from the Knill–Laflamme condition alone.
  • Quoting a physical error rate without specifying locations, correlations, cycle time, leakage, and the decoder.

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| \\ &\quad+ \alpha\beta^* \langle11|00\rangle |0\rangle\langle1| \\ &\quad+ \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.

Assume

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

Show directly that every pair of operators Fμ=∑afμaEaF_\mu=\sum_a f_{\mu a}E_a is also Knill–Laflamme correctable.

Solution

For two linear combinations,

PFμ†FνP=∑a,bfμa∗fνbPEa†EbP=∑a,bfμa∗fνbcabP=dμνP,\begin{aligned} P F_\mu^\dagger F_\nu P &= \sum_{a,b} f_{\mu a}^*f_{\nu b} P E_a^\dagger E_bP \\ &= \sum_{a,b} f_{\mu a}^*f_{\nu b} c_{ab}P \\ &= d_{\mu\nu}P, \end{aligned}

where

dμν=∑a,bfμa∗fνbcab.d_{\mu\nu} = \sum_{a,b} f_{\mu a}^*f_{\nu b}c_{ab}.

The coefficient is independent of the logical state, so the span satisfies the same criterion.

Suppose II and XjX_j produce orthogonal correctable sectors. For

Uϵ=e−iϵXj/2,U_\epsilon=e^{-i\epsilon X_j/2},

find the two ideal syndrome probabilities and show that neither depends on the encoded state.

Solution

Expanding the rotation,

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

Orthogonal syndrome extraction sends the two branches to orthogonal ancilla states. The Born probabilities are therefore

p0=∣cos⁡ϵ2∣2,pxj=∣sin⁡ϵ2∣2.p_0 = \left| \cos\frac{\epsilon}{2} \right|^2, \qquad p_{x_j} = \left| \sin\frac{\epsilon}{2} \right|^2.

No overlap involving ∣ψL⟩|\psi_L\rangle remains because each branch acts isometrically on the whole code. The angle controls the error-sector probabilities, while the logical amplitudes factor out.

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.

5. Why the repetition code misses phase flips

Section titled “5. 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.

Starting from

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

derive the environment density operator and prove that it is independent of ∣ψL⟩|\psi_L\rangle when the Knill–Laflamme condition holds.

Solution

The joint state projector is

∑a,bEa∣ψL⟩⟨ψL∣Eb†⊗∣a⟩⟨b∣E.\sum_{a,b} E_a|\psi_L\rangle\langle\psi_L|E_b^\dagger \otimes |a\rangle\langle b|_E.

Tracing over the physical system gives

ρ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.

Because P∣ψL⟩=∣ψL⟩P|\psi_L\rangle=|\psi_L\rangle and

PEb†EaP=cbaP,P E_b^\dagger E_aP=c_{ba}P,

normalization implies

⟨ψL∣Eb†Ea∣ψL⟩=cba.\langle\psi_L|E_b^\dagger E_a|\psi_L\rangle = c_{ba}.

Therefore

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

with no dependence on the logical state. The environment stores only correctable error information.

  • P. W. Shor, “Scheme for reducing decoherence in quantum computer memory,” Physical Review A 52, R2493–R2496, 1995, doi:10.1103/PhysRevA.52.R2493.
  • A. M. Steane, “Error correcting codes in quantum theory,” Physical Review Letters 77, 793–797, 1996, doi:10.1103/PhysRevLett.77.793.
  • C. H. Bennett, D. P. DiVincenzo, J. A. Smolin, and W. K. Wootters, “Mixed-state entanglement and quantum error correction,” Physical Review A 54, 3824–3851, 1996, doi:10.1103/PhysRevA.54.3824.
  • E. Knill and R. Laflamme, “Theory of quantum error-correcting codes,” Physical Review A 55, 900–911, 1997, doi:10.1103/PhysRevA.55.900.
  • R. Laflamme, C. Miquel, J. P. Paz, and W. H. Zurek, “Perfect quantum error correcting code,” Physical Review Letters 77, 198–201, 1996, doi:10.1103/PhysRevLett.77.198.
  • E. Knill, R. Laflamme, and L. Viola, “Theory of quantum error correction for general noise,” Physical Review Letters 84, 2525–2528, 2000, doi:10.1103/PhysRevLett.84.2525.
  • D. Gottesman, “An introduction to quantum error correction and fault-tolerant quantum computation,” in Quantum Information Science and Its Contributions to Mathematics, Proceedings of Symposia in Applied Mathematics 68, 13–58, 2010, arXiv:0904.2557.
  • B. M. Terhal, “Quantum error correction for quantum memories,” Reviews of Modern Physics 87, 307–346, 2015, doi:10.1103/RevModPhys.87.307.
  • 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.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press, 2010, doi:10.1017/CBO9780511976667.
  • J. Preskill, Quantum Error Correction, Chapter 7 of the Caltech quantum computation lecture notes, updated 2026, course materials.

Quantum error correction does not evade quantum mechanics. It exploits its linear and tensor-product structure. An encoding is one distributed logical state, not a collection of clones. Correctable errors alter a syndrome sector while leaving the logical amplitudes inaccessible to both syndrome and environment. The Knill–Laflamme condition,

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

is the exact statement of that separation.

Linearity then explains why a finite operator basis can cover continuous coherent errors and non-Pauli channels. Code distance turns detectability into a locality guarantee, while degeneracy allows distinct physical faults to share one logical action. These ideal facts make QEC possible; fault-tolerant circuits, realistic decoders, repeated noisy measurements, and demonstrated logical scaling determine whether it works in hardware.