This primer is for physicists who know some quantum mechanics and want to do quantum error correction: build a code, put realistic noise on its circuit, decode it, and read off a logical error rate you can defend. It rests on one idea. An error-correction experiment is a pipeline:

  • a code becomes a circuit;
  • the circuit gets noise;
  • detectors turn measurements into symptoms;
  • a decoder guesses the error;
  • counting its failures gives the logical error rate and .

Every lecture explains one or two arrows of that pipeline. It then runs them with Deltakit, Riverlane’s open-source QEC toolkit.

Theory moves fast; the code is covered in detail. Every number on these pages was produced by the pinned Deltakit 0.10.2 when the site was built, with fixed seeds, so you can reproduce it exactly.

Start here

Read Lecture 0, which runs a complete memory experiment in 14 lines of Python. Then open Notebook 0, which takes the same experiment to distances 5 and 7. Keep the field map open in another tab: every lecture links to its cards, and every card links back.

Part I: Codes and circuits

  1. 00 Orientation the QEC stack, the Deltakit map, a first run
  2. 01 Stabilizer codes in one sitting Paulis, syndromes, logicals, distance, CSS
  3. 02 Clifford simulation and Stim tableaux, frames, the deltakit-stim fork
  4. 03 Surface codes and syndrome extraction boundaries, schedules, hook errors, memory circuits

Part II: From noise to numbers

  1. 04 Noise, detectors and detector error models SI1000 and SD6, leakage, DEMs, decoding graphs
  2. 05 Decoding matching, Union–Find, BP-OSD, windows and real time
  3. 06 Measuring performance LEP and its intervals, thresholds, Λ, error budgets

Part III: Beyond the memory experiment

  1. 07 qLDPC and bivariate bicycle codes hypergraph products, the gross code, why matching fails
  2. 08 Fault-tolerant compilation logical assembly, lattice surgery, deltakit-compile
  3. 09 The Deltakit ecosystem and open problems architecture, contributing, what is still unsolved

The field map

The field map is an interactive cheatsheet: one card per concept, grouped into five territories.

TerritoryWhat lives there
FoundationsPauli and stabilizer groups, distance, the codes themselves
Simulationnoise models, leakage, detectors, DEMs, Stim
Decodingmaximum likelihood, matching, Union–Find, BP-OSD, windows
PerformanceLEP and intervals, thresholds, , error budgets, QuOps
Toolchainthe package map, the pipeline, compilation, contributing

A card’s face is the rule in its sharpest form. Click it and the card opens into a short chapter with:

  • a step-through figure;
  • the derivation and a worked example;
  • the traps;
  • an In Deltakit section with code that was run when the site was built.

Self-test mode turns every face into a question. Search and the tag filter work offline.

Notebooks and homework

  • Notebooks: Jupyter notebooks that run the pipeline end to end, from a first memory experiment to threshold plots and fits. Each page shows exactly what the notebook printed when the site was built, and links the .ipynb to download.
  • Homework: four problem sets with solutions folded on the page. Every numerical answer is checked by a script or a notebook.

Running the notebooks

You need uv, which also fetches Python 3.12. The environment takes about 700 MB of disk. From the course folder:

make lab   # uv sync, build the notebooks, install the kernel, open JupyterLab

Pick the Python (qecdk) kernel. It sets PYTHONHASHSEED=0, which makes Deltakit’s circuits come out in the same order on every run, so your counts match the pages exactly. With any other kernel the numbers differ slightly but are statistically the same. The first import deltakit in a fresh environment builds caches and takes about half a minute; after that it takes about two seconds.

Nothing here touches the network or needs a Deltakit cloud token. The cloud-only decoders are described in the lectures but never run. The build runs each notebook under an 8 GiB memory guard; a laptop is enough for every example.