Quantum computers are noisy. Every qubit slowly loses its state, and every gate and measurement adds a little error. Quantum error correction (QEC) protects quantum information by spreading one logical qubit over many physical qubits, so that errors can be detected and undone without ever looking at the encoded data. These notes build QEC from the ground up: the stabilizer formalism and how to simulate it fast, the toric and surface codes, how real circuit noise becomes a decoding problem, the decoders that solve it, and the quantum LDPC codes that may cut the qubit overhead.
Who it is for. Graduate students, researchers and engineers who want a working understanding of QEC, from the algebra to running a simulation in Stim.
Prerequisites. Linear algebra (including arithmetic modulo 2), the basics of quantum computing (qubits, Pauli matrices, the circuit model, measurement), and some Python for the coding problems. No prior coding theory is assumed.
Course Notes
- 01 Why Quantum Error Correction Repetition codes, no-cloning, error digitization, Shor's nine-qubit code
- 02 Pauli Group and Stabilizer States Commutation, stabilizer groups, counting codespace dimensions
- 03 Stabilizer Codes Syndromes, logical operators, distance, the five-qubit and Steane codes
- 04 Binary Symplectic Picture and CSS Codes Paulis as bit strings, check matrices, codes from pairs of classical codes
- 05 Clifford Group and Tableaus Conjugation rules, tableau updates, the Gottesman-Knill theorem
- 06 Measurement and Fast Stabilizer Simulation Measurement updates, destabilizers, CHP, and the ideas behind Stim
- 07 The Toric Code Stars and plaquettes, homology, anyons, logicals as loops
- 08 Planar and Rotated Surface Codes Boundaries, the rotated code, syndrome circuits and hook errors
- 09 Circuit Noise, Detectors and Detector Error Models Noise models, detectors, and the space-time decoding graph
- 10 Decoding I: Maximum Likelihood and Matching ML versus minimum weight, matching graphs, MWPM and PyMatching
- 11 Decoding II and Thresholds Union-Find, BP+OSD, the threshold theorem, Lambda and Willow
- 12 Quantum LDPC Codes: The Basics Hypergraph products, bivariate bicycle codes, the gross code
Homework
Each module has one problem set. Problems range from pen-and-paper derivations to short simulations with Stim and PyMatching. Solutions are included and collapsed by default.
- Homework 1: Why Quantum Error Correction
- Homework 2: Pauli Group and Stabilizer States
- Homework 3: Stabilizer Codes
- Homework 4: Binary Symplectic Picture and CSS Codes
- Homework 5: Clifford Group and Tableaus
- Homework 6: Measurement and Fast Stabilizer Simulation
- Homework 7: The Toric Code
- Homework 8: Planar and Rotated Surface Codes
- Homework 9: Circuit Noise, Detectors and Detector Error Models
- Homework 10: Maximum Likelihood and Matching
- Homework 11: Decoding II and Thresholds
- Homework 12: Quantum LDPC Codes
Sources and acknowledgements
The notes draw on the following lecture notes, papers and tools. Each module lists its own references in full.
- J. Preskill, Lecture Notes for Physics 219: Quantum Computation, Chapter 7 (quantum error correction).
- D. Gottesman, Stabilizer Codes and Quantum Error Correction, PhD thesis, Caltech (1997), arXiv:quant-ph/9705052.
- S. Aaronson and D. Gottesman, “Improved simulation of stabilizer circuits”, Phys. Rev. A 70, 052328 (2004), arXiv:quant-ph/0406196.
- C. Gidney, “Stim: a fast stabilizer circuit simulator”, Quantum 5, 497 (2021), arXiv:2103.02202.
- A. Kitaev, “Fault-tolerant quantum computation by anyons”, Ann. Phys. 303, 2 (2003), arXiv:quant-ph/9707021.
- E. Dennis, A. Kitaev, A. Landahl and J. Preskill, “Topological quantum memory”, J. Math. Phys. 43, 4452 (2002), arXiv:quant-ph/0110143.
- A. G. Fowler, M. Mariantoni, J. M. Martinis and A. N. Cleland, “Surface codes: Towards practical large-scale quantum computation”, Phys. Rev. A 86, 032324 (2012), arXiv:1208.0928.
- A. Pesah, “An interactive introduction to the surface code” (2023), and the SciPost Physics Lecture Notes on topological codes.
- Google Quantum AI course materials on quantum error correction and Stim.
- O. Higgott and C. Gidney, “Sparse Blossom: correcting a million errors per core second with minimum-weight matching”, Quantum 9, 1600 (2025).
- N. Delfosse and N. H. Nickerson, “Almost-linear time decoding algorithm for topological codes”, Quantum 5, 595 (2021).
- J. Roffe, D. R. White, S. Burton and E. Campbell, “Decoding across the quantum low-density parity-check code landscape”, Phys. Rev. Research 2, 043423 (2020).
- Google Quantum AI and collaborators, “Quantum error correction below the surface code threshold”, Nature 638, 920 (2025).
- J.-P. Tillich and G. Zemor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength”, IEEE Trans. Inf. Theory 60, 1193 (2014), arXiv:0903.0566.
- S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall and T. J. Yoder, “High-threshold and low-overhead fault-tolerant quantum memory”, Nature 627, 778 (2024), arXiv:2308.07915.
- P. Panteleev and G. Kalachev, “Asymptotically good quantum and locally testable classical LDPC codes”, STOC 2022, arXiv:2111.03654.
The site is built with Quartz from a lecture-note template; see the attribution file in the repository for the template’s own credits.