Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

QCQI – Chapter 9 Detailed Summary: Quantum Error Correction, Stabilizers, and Noise

Course Notes (MSU)

Learning Targets

  • Model noise with Pauli channels and Kraus operators; use the Pauli transfer picture.

  • State and apply Knill–Laflamme (K–L) error-correction conditions.

  • Build and analyze stabilizer codes: generators, syndromes, degeneracy, and decoding.

  • Implement 3-qubit, phase-flip, and Shor 9-qubit ideas; understand CSS/Steane intuition.

  • Glimpse fault tolerance: transversal gates, cat-state extraction, and the threshold idea.

Noise Models & Error Bases

A single-qubit CPTP map can be expanded in the Pauli basis: E(ρ)=P{I,X,Y,Z}pPPρP\mathcal{E}(\rho)=\sum_{P\in\{I,X,Y,Z\}} p_P\,P\rho P for a Pauli channel, or via Kraus operators {K}\{K_\ell\} as E(ρ)=KρK\mathcal{E}(\rho)=\sum_\ell K_\ell \rho K_\ell^\dagger.

Eureka! Because {I,X,Y,Z}\{I,X,Y,Z\} form an operator basis, correcting all single-qubit Paulis implies correction of arbitrary small errors (by linearity).

Examples

Depolarizing: (1p)ρ+p3(XρX+YρY+ZρZ)(1-p)\rho + \tfrac{p}{3}(X\rho X + Y\rho Y + Z\rho Z). Phase Damping: dephases off-diagonals in ZZ-basis. Amplitude Damping: E0=(1001γ)E_0=\begin{pmatrix}1&0\\0&\sqrt{1-\gamma}\end{pmatrix}, E1=(0γ00)E_1=\begin{pmatrix}0&\sqrt{\gamma}\\0&0\end{pmatrix}.

Knill–Laflamme Conditions

A code subspace C=span{iˉ}\mathcal{C}=\mathrm{span}\{|\bar{i}\rangle\} corrects {Ea}\{E_a\} iff

iˉEaEbjˉ=Cabδiji,j,a,b.\begin{align} \langle \bar{i}|E_a^\dagger E_b|\bar{j}\rangle = C_{ab}\,\delta_{ij}\quad \forall\,i,j,a,b. \end{align}

Intuition: error pairs act like a scalar on the code space—no leakage about the logical basis labels.

Eureka! “All damage \to syndrome”: the environment learns the error type but not the logical state.

Distance, Detection, and Degeneracy

The distance dd is the minimum weight of a Pauli that maps one codeword to another (up to stabilizers). A code detects up to d1d-1 errors and corrects up to t=(d1)/2t=\lfloor(d-1)/2\rfloor errors. A degenerate code has distinct errors sharing the same syndrome (coset leaders differ by stabilizers).

Stabilizer Formalism

Let SPnS\subset\mathcal{P}_n be an abelian subgroup with IS-I\notin S. The code space is the +1 eigenspace of SS. If S=2nk|S|=2^{n-k} then we have an [[n,k]][[n,k]] code; measuring the r=nkr=n-k generators gives a syndrome s{0,1}rs\in\{0,1\}^r.

Eureka! Commutation \Rightarrow simultaneous measurability: we can extract rr classical bits without collapsing the logical superposition.

Syndrome Extraction (Concept)

Canonical Small Codes

Repetition (bit-flip) [[3,1,1]][[3,1,1]]

0ˉ=000|\bar{0}\rangle=|000\rangle, 1ˉ=111|\bar{1}\rangle=|111\rangle, stabilizers Z1Z2Z_1Z_2, Z2Z3Z_2Z_3. A single XX error flips one parity; majority vote recovers the bit.

Phase-Flip via Hadamards

Wrap the above with H3H^{\otimes 3} to protect against ZZ errors.

Shor 9-Qubit [[9,1,3]][[9,1,3]] (Idea)

Concatenate phase-protection within triples and bit-flip protection across triples to correct any single-qubit X,Y,ZX,Y,Z error.

Eureka! Protect ZZ and XX errors separately in complementary bases; YY follows since Y=iXZY=iXZ.

CSS and Steane Intuition

Given C2C1C_2\subset C_1 classical linear codes, CSS builds an [[n,k]][[n,k]] code with XX-checks from C2C_2^\perp and ZZ-checks from C1C_1. The Steane [[7,1,3]][[7,1,3]] uses Hamming (7,4,3)(7,4,3) for both parts.

Fault-Tolerance (Glimpse)

Transversal gates prevent a single fault from fanning out. Cat-state ancillas limit hook errors during extraction. Threshold theorem: below a hardware-dependent error rate, scalable computation is possible with polylog overhead.

Pseudo-code Aids

Pseudo-code: 3-qubit bit-flip: encode \to syndrome \to correct

Encode: CNOT(q0q1q_0\to q_1); CNOT(q0q2q_0\to q_2) Syndrome: measure Z1Z2Z_1Z_2 and Z2Z3Z_2Z_3 via ancillas Decode: map syndrome (s12,s23){10,01,11}(s_{12},s_{23})\in\{10,01,11\} to XX on {q3,q1,q2}\{q_3,q_1,q_2\} respectively Recover: majority vote or inverse of encode

Pseudo-code: General stabilizer check measurement

Prepare ancilla in 0|0\rangle (for ZZ-type) or +|+\rangle (for XX-type) For each ZZ on data: CNOT(data\toanc) For each XX on data: CNOT(anc\todata) or basis-change HH tricks Measure ancilla in ZZ; the bit is the generator eigenvalue

Pseudo-code: Knill–Laflamme numeric test

Compute projector PP onto code space; for errors {Ea}\{E_a\} compute Gab=PEaEbPG_{ab}=P E_a^\dagger E_b P Verify GabIG_{ab}\propto I in the code basis

Hands-on Notebook (Multi-Backend)

Run: L13_QCQI_Ch09_Quantum_Error_Correction_and_Noise

Set backend in the first cell to cirq, pennylane, braket, pyquil, or qiskit.

Mini-Labs

  1. Monte Carlo logical error vs. physical error pp for the 3-qubit code; compare to 3p22p33p^2-2p^3.

  2. Convert to phase-flip protection and test against ZZ-noise.

  3. (Stretch) Sketch a Shor encoder/decoder; correct a single arbitrary Pauli on one qubit using an ideal simulator.