qml
qml copied to clipboard
Tutorial: Decoding Quantum Errors on the Steane code with Belief Propagation & Catalyst
Title: Decoding Quantum Errors on the Steane code with Belief Propagation & Catalyst
Summary:
This tutorial walks you through a simplified error correction cycle using the Steane $[[7,1,3]]$
code. You’ll encode a logical qubit, introduce noise, extract syndromes, and apply decoding using
two different strategies: a simple lookup table and a belief propagation (BP) decoder. Both decoders
are implemented in JAX and JIT-compiled by Catalyst, allowing everything to run inside a single
@qml.qjit circuit.
Relevant references:
- Arthur Pesah, “The stabilizer trilogy I — Stabilizer codes,” 31 Jan. 2023, https://arthurpesah.me/blog/2023-01-31-stabilizer-formalism-1/.
- Niclas Wiberg, (2001). Codes and Decoding on General Graphs, https://www.essrl.wustl.edu/~jao/itrg/wiberg.pdf.
- Pavel Panteleev, “Degenerate Quantum LDPC Codes With Good Finite Length Performance,” arXiv.org, 04 Apr. 2019, https://arxiv.org/abs/1904.02703v3.
- Timo Hillmann, “Localized statistics decoding: A parallel decoding algorithm for quantum low-density parity-check codes,” arXiv.org, 26 Jun. 2024, https://arxiv.org/abs/2406.18655v1.
- Stasiu Wolanski, “Ambiguity Clustering: an accurate and efficient decoder for qLDPC codes,” arXiv.org, 20 Jun. 2024, https://arxiv.org/abs/2406.14527v2.
- Hans-Andrea Loeliger, “An introduction to factor graphs” in IEEE Signal Processing Magazine, vol. 21, no. 1, pp. 28-41, Jan. 2004, https://www.isiweb.ee.ethz.ch/papers/arch/aloe-2004-spmagffg.pdf.
- David Barber, Bayesian Reasoning and Machine Learning, Cambridge University Press, USA, 2012, http://web4.cs.ucl.ac.uk/staff/D.Barber/textbook/180325.pdf#page=107.50.
Possible Drawbacks: The tutorial uses a simplified noise model (code capacity) where errors occur only once. Real-world quantum computers have errors at every step (circuit-level noise), which creates a much more complex decoding challenge involving errors in space and time.
Related GitHub Issues: N/A
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
I work on fault tolerant compilation of quantum circuits which involves making classical decoding algorithms run alongside quantum circuit with measurements and feedforward operations. Catalyst is a great new technology to enable these kinds of high performance hybrid quantum-classical workflows essential for quantum error correction.
AUDIENCE — Who is this for?
- Quantum computing researchers interested in QEC.
- Developers working with Pennylane and Catalyst on hybrid workflows for QEC.
- Educators teaching stabilizer codes or decoding techniques.
KEYWORDS — What words should be included in the marketing post?
quantum error correction, css code, hybrid quantum-classical, belief propagation decoding, JAX, Catalyst
- Which of the following types of documentation is most similar to your file? (more details here note this requires a Xanadu email to view)
- [ ] Tutorial
- [x] Demo
- [ ] How-to
Notes:
suggested thumbail is to make a graphic of the Steane code in it's usual triangle layout

The hero image should have some theme of quantum/classical QEC circuits my idea is roughly this where S is the syndrome and R is the recovery operator:
[sc-93094]