- Open Access
Universal Graph Representation of Stabilizer Codes
PRX Quantum 6, 040325 – Published 5 November, 2025
DOI: https://doi.org/10.1103/1gjs-2rhx
Abstract
While stabilizer tableaus have proven useful as a descriptive tool for additive quantum codes, they otherwise offer little guidance for concrete constructions or algorithm analysis. We introduce a representation of stabilizer codes as graphs with certain structures, and prove via the ZX calculus that this representation is related to stabilizer tableaus by an efficiently computable bijection. This gives a new universal recipe for code construction by way of finding graphs with nice properties. The graph representation gives insight into both code construction and algorithms. We construct as examples families of and codes. We use graphs in a probabilistic analysis to extend the quantum Gilbert-Varshamov bound into a three-way distance-rate-weight trade-off. Moreover, code properties such as distance and encoding circuit depth are bounded by simple functions of the graph degree. We prove that key coding algorithms—distance approximation, minimum-weight generator selection, and decoding—are unified as instances of one optimization game on a graph. By studying this game, we construct an efficient greedy decoder and prove that it corrects all recoverable errors for all graphs with cycle lengths no shorter than 13 (reducible to 5 with mild extra constraints); these include the above two families. Our results suggest that graphs are generically useful for the study of stabilizer codes.
Physics Subject Headings (PhySH)
Popular Summary
To build quantum computers which can reliably execute algorithms, we must first design good quantum error-correcting codes. Stabilizer codes are a popular class of quantum codes, being the quantum analog to classical linear codes. Yet compared to the classical setting, we understand little about stabilizer codes in general—how to construct them, how to control their check weight, and how to decode them. This work uses graphs to begin answering such questions. We transform every stabilizer code into a graph. Then, we show how graph properties correspond to code properties and use this correspondence to design interesting codes as well as a decoding algorithm which provably succeeds if the graph satisfies simple properties.
Our approach is well motivated from a classical standpoint: much of our understanding of classical codes comes from representing them with an object known as Tanner graphs. However, Tanner graphs do not naturally generalize to represent all stabilizer codes. Instead, we constructed a completely new graph representation. We then use graphs to construct codes and design algorithms. Notably, we show that finding the code distance, selecting low-weight parity checks, and decoding are all strategies for a single unified game. We study this game to build an efficient decoder and prove that if the graph lacks short cycles, the decoder succeeds.
This work shows that graphs give much insight into stabilizer code construction and algorithms. Future directions include graph algorithms to find low-weight checks, improved constructions, and new graph representations which are codesigned for more specific code problems.
Article Text
References (76)
- L. K. Grover, in Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing (ACM, Philadelphia, PA, 1996), p. 212.
- P. W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAM Rev. 41, 303 (1999).
- Z. Brakerski, P. Christiano, U. Mahadev, U. Vazirani, and T. Vidick, A cryptographic test of quantumness and certifiable randomness from a single quantum device, J. ACM (JACM) 68, 1 (2021).
- E. Farhi, D. Gosset, A. Hassidim, A. Lutomirski, and P. Shor, in Proceedings of the 3rd Innovations in Theoretical Computer Science Conference (ACM, Cambridge, MA, 2012), p. 276.
- I. M. Georgescu, S. Ashhab, and F. Nori, Quantum simulation, Rev. Mod. Phys. 86, 153 (2014).
- H.-Y. Huang, R. Kueng, and J. Preskill, Predicting many properties of a quantum system from very few measurements, Nat. Phys. 16, 1050 (2020).
- A. Harrow, P. Hayden, and D. Leung, Superdense coding of quantum states, Phys. Rev. Lett. 92, 187901 (2004).
- M. A. Nielsen, and I. Chuang, Quantum computation and quantum information (2002).
- A. Kandala, K. Temme, A. D. Córcoles, A. Mezzacapo, J. M. Chow, and J. M. Gambetta, Error mitigation extends the computational reach of a noisy quantum processor, Nature 567, 491 (2019).
- M. V. Larsen, X. Guo, C. R. Breum, J. S. Neergaard-Nielsen, and U. L. Andersen, Deterministic generation of a two-dimensional cluster state, Science 366, 369 (2019).
- F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell et al., Quantum supremacy using a programmable superconducting processor, Nature 574, 505 (2019).
- H. Wang, J. Qin, X. Ding, M.-C. Chen, S. Chen, X. You, Y.-M. He, X. Jiang, L. You, Z. Wang et al., Boson sampling with 20 input photons and a 60-mode interferometer in a -dimensional Hilbert space, Phys. Rev. Lett. 123, 250503 (2019).
- C. K. Andersen, A. Remm, S. Lazar, S. Krinner, N. Lacroix, G. J. Norris, M. Gabureac, C. Eichler, and A. Wallraff, Repeated quantum error detection in a surface code, Nat. Phys. 16, 875 (2020).
- A. Y. Kitaev, in Quantum Communication, Computing, and Measurement (Springer, Shizuoka, Japan, 1997), p. 181.
- S. B. Bravyi, and A. Y. Kitaev, Quantum codes on a lattice with boundary, arXiv:quant-ph/9811052.
- 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).
- P. W. Shor, Scheme for reducing decoherence in quantum computer memory, Phys. Rev. A 52, R2493 (1995).
- D. Gottesman, An introduction to quantum error correction and fault-tolerant quantum computation, ArXiv:0904.2557.
- D. Gottesman, Stabilizer Codes and Quantum Error Correction. Thesis, California Institute of Technology, Pasadena, California, 1997. ArXiv:quant-ph/9705052
- A. Steane, Multiple-particle interference and quantum error correction, Proc. R. Soc. London. Series A: Math., Phys. Eng. Sci. 452, 2551 (1996).
- A. R. Calderbank, and P. W. Shor, Good quantum error-correcting codes exist, Phys. Rev. A 54, 1098 (1996).
- S. Aaronson, and D. Gottesman, Improved simulation of stabilizer circuits, Phys. Rev. A 70, 052328 (2004).
- J.-P. Tillich, and G. Zémor, Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength, IEEE Trans. Inf. Theory 60, 1193 (2013).
- P. Panteleev, and G. Kalachev, Quantum LDPC codes with almost linear minimum distance, IEEE Trans. Inf. Theory 68, 213 (2021).
- N. P. Breuckmann, and J. N. Eberhardt, Balanced product quantum codes, IEEE Trans. Inf. Theory 67, 6653 (2021).
- P. Panteleev, and G. Kalachev, Degenerate quantum LDPC codes with good finite length performance, Quantum 5, 585 (2021).
- M. Sipser, and D. A. Spielman, Expander codes, IEEE Trans. Inf. Theory 42, 1710 (1996).
- A. Y. Kitaev, Fault-tolerant quantum computation by anyons, Ann. Phys. 303, 2 (2003).
- 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).
- J. Edmonds, Maximum matching and a polyhedron with 0,1-vertices, J. Res. Natl. Bur. Stand. B 69, 55 (1965).
- J. Edmonds, Paths, trees, and flowers, Can. J. Math. 17, 449 (1965).
- C. T. Benson, Minimal regular graphs of girths eight and twelve, Can. J. Math. 18, 1091 (1966).
- T. Bergamaschi, L. Golowich, and S. Gunn, in Proceedings of the 56th Annual ACM Symposium on Theory of Computing (2024), p. 1507.
- T. Rakovszky, and V. Khemani, The physics of (good) LDPC codes II. Product constructions, ArXiv:2402.16831.
- A. Ashikhmin, S. Litsyn, and M. A. Tsfasman, Asymptotically good quantum codes, Phys. Rev. A 63, 032311 (2001).
- P. Panteleev, and G. Kalachev, in Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing (ACM, Rome, Italy, 2022), p. 375.
- A. T. Hu, and A. B. Khesin, Improved graph formalism for quantum circuit simulation, Phys. Rev. A 105, 022432 (2022).
- T. McElvanney, and M. Backens, Complete flow-preserving rewrite rules for MBQC patterns with Pauli measurements, Electron. Proc. Theor. Comput. Sci. 394, 66 (2023).
- S. Yu, Q. Chen, and C. H. Oh, Graphical quantum error-correcting codes, arXiv:0709.1780.
- G. A. Munné, V. Kasper, and F. Huber, Engineering holography with stabilizer graph codes, npj Quantum Inf. 10, 48 (2024).
- S. Beigi, M. Grassl, P. Shor, and B. Zeng, Graph concatenation for quantum codes, J. Math. Phys. 52, 022201 (2009).
- M. Grassl, A. Klappenecker, and M. Rotteler, in Proceedings, IEEE International Symposium on Information Theory (IEEE, Lausanne, Switzerland, 2002), p. 45.
- D. Schlingemann, Stabilizer codes can be realized as graph codes, Quantum Inf. Comput. 2, 307 (2002).
- D. Schlingemann, and R. F. Werner, Quantum error-correcting codes associated with graphs, Phys. Rev. A 65, 012308 (2001).
- A. Kissinger, Phase-free ZX diagrams are CSS codes ( or how to graphically grok the surface code), ArXiv:2204.14038.
- Z. Wu, S. Cheng, and B. Zeng, A ZX-calculus approach to concatenated graph codes, ArXiv:2304.08363.
- N. Chancellor, A. Kissinger, S. Zohren, J. Roffe, and D. Horsman, Graphical structures for design and verification of quantum error correction, Quantum Sci. Technol. 8, 045028 (2016).
- A. B. Khesin, and A. Li, Equivalence classes of quantum error-correcting codes, ArXiv:2406.12083.
- B. Coecke, and R. Duncan, in International Colloquium on Automata, Languages, and Programming (Springer, Reykjavik, Iceland, 2008), p. 298.
- T. Peham, L. Burgholzer, and R. Wille, Equivalence checking of quantum circuits with the ZX-calculus, IEEE J. Emerg. Sel. Top. Circuits Syst. 12, 662 (2022).
- A. Cowtan, and S. Majid, Quantum double aspects of surface code models, J. Math. Phys. 63, 042202 (2022).
- J. van de Wetering, Constructing quantum circuits with global gates, New J. Phys. 23, 043015 (2021).
- R. D. P. East, J. van de Wetering, N. Chancellor, and A. G. Grushin, AKLT-states as ZX-diagrams: Diagrammatic reasoning for quantum states, PRX Quantum 3, 010302 (2022).
- N. de Beaudrap, and D. Horsman, The ZX calculus is a language for surface code lattice surgery, Quantum 4, 218 (2020).
- A. Kissinger, and J. van de Wetering, Reducing the number of non-Clifford gates in quantum circuits, Phys. Rev. A 102, 022406 (2020).
- M. Backens, The ZX-calculus is complete for stabilizer quantum mechanics, New J. Phys. 16, 093021 (2014).
- R. Duncan, A. Kissinger, S. Perdrix, and J. Van De Wetering, Graph-theoretic simplification of quantum circuits with the ZX-calculus, Quantum 4, 279 (2020).
- J. van de Wetering, ZX-calculus for the working quantum computer scientist, ArXiv:2012.13966.
- D. Gottesman, Surviving as a quantum computer in a classical world, Textbook manuscript preprint (2016).
- R. Duncan, and M. Lucas, Proceedings of Quantum Physics and Logic (QPL) (Barcelona, Spain, 2013).
- E. Knill, R. Laflamme, R. Martinez, and C. Negrevergne, Benchmarking quantum computers: The five-qubit error correcting code, Phys. Rev. Lett. 86, 5811 (2001).
- A related discussion of such a transformation is given in a simultaneous work by one of the authors in Khesin and Li [48].
- V. G. Vizing, On an estimate of the chromatic class of a p-graph, Diskret. Analiz. 3, 25 (1964).
- J. Misra, and D. Gries, A constructive proof of Vizing’s theorem, Inf. Process. Lett. 41, 131 (1992).
- We adopt the name quantum lights out because the game appears to be a generalization of a classical game known as lights out, in which a player aims to turn all lights off on a grid with some lights initially on, using moves such that flipping a switch at a given cell toggles all the lights of the adjacent cell but not their own. QLO generalizes this notion onto a general graph, and adds more flexibility on how lights may be toggled.
- U. Kapshikar, and S. Kundu, On the hardness of the minimum distance problem of quantum codes, IEEE Trans. Inf. Theory 69, 6293 (2023).
- P. Iyer, and D. Poulin, Hardness of decoding quantum stabilizer codes, IEEE Trans. Inf. Theory 61, 5209 (2015).
- R. Tanner, A recursive approach to low complexity codes, IEEE Trans. Inf. Theory 27, 533 (1981).
- J. Z. Lu, and A. B. Khesin, graphcodes (GitHub Repository), 2024, https://github.com/jz-lu/graphcodes
- R. Chao, and B. W. Reichardt, Fault-tolerant quantum computation with few qubits, npj Quantum Inf. 4, 42 (2018).
- A. Couvreur, N. Delfosse, and G. Zémor, A construction of quantum LDPC codes from Cayley graphs, IEEE Trans. Inf. Theory 59, 6087 (2013).
- F. Pastawski, B. Yoshida, D. Harlow, and J. Preskill, Holographic quantum error-correcting codes: Toy models for the bulk/boundary correspondence, J. High Energy Phys. 2015, 1 (2015).
- O. Higgott, and N. P. Breuckmann, Constructions and performance of hyperbolic and semi-hyperbolic Floquet codes, PRX Quantum 5, 040327 (2024).
- N. P. Breuckmann, and J. N. Eberhardt, Quantum low-density parity-check codes, PRX Quantum 2, 040101 (2021).
- R. W. Hamming, Error detecting and error correcting codes, Bell Syst. Tech. J. 29, 147 (1950).
- R. Singleton, On minimal graphs of maximum even girth, J. Comb. Theory 1, 306 (1966).
