Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2204.14038

Phase-free ZX diagrams are CSS codes (...or how to graphically grok the surface code)

Aleks Kissinger

Published Apr 29, 2022• 10 citations
arXivHTMLPDF

Abstract

In this paper, we demonstrate a direct correspondence between phase-free ZX diagrams, a graphical notation for representing and manipulating a certain class of linear maps on qubits, and Calderbank-Shor-Steane (CSS) codes, a large family of quantum error correcting codes constructed from classical codes, including for example the Steane code, surface codes, and colour codes. The stabilisers of a CSS code have an especially nice structure arising from a pair of orthogonal $\mathbb F_2$-linear subspaces, or in the case of maximal CSS codes, a single subspace and its orthocomplement. On the other hand, phase-free ZX diagrams can always be efficiently reduced to a normal form given by the basis elements of an $\mathbb F_2$-linear subspace. Here, we will show that these two ways of describing a quantum state by an $\mathbb F_2$-linear subspace $S$ are in fact the same. Namely, the maximal CSS code generated by $S$ fixes the quantum state whose ZX normal form is also given by $S$. This insight gives us an immediate translation from stabilisers of a maximal CSS code into a ZX diagram describing its associated state. We show that we can extend this translation to stabilisers and logical operators of any (possibly non-maximal) CSS code by "bending wires". To demonstrate the utility of this translation, we give a simple picture of the surface code and a fully graphical derivation of the action of physical lattice surgery operations on the space of logical qubits, completing the ZX presentation of lattice surgery initiated by de Beudrap and Horsman.

DOI
10.48550/arxiv.2204.14038

Related papers

Graphical CSS Code Transformation Using ZX Calculus

Jiaxin Huang, Sarah Meng Li, Lia Yeh +3 more

In this work, we present a generic approach to transform CSS codes by building upon their equivalence to phase-free ZX diagrams. Using the ZX calculus, we demonstrate diagrammatic transformations between encoding maps associated with different codes. As a motivating example, we give explicit transformations between the Steane code and the quantum Reed-Muller code, since by switching between these two codes, one can obtain a fault-tolerant universal gate set. To this end, we propose a bidirectional rewrite rule to find a (not necessarily transversal) physical implementation for any logical ZX diagram in any CSS code. Then we focus on two code transformation techniques: code morphing, a procedure that transforms a code while retaining its fault-tolerant gates, and gauge fixing, where complimentary codes can be obtained from a common subsystem code (e.g., the Steane and the quantum Reed-Muller codes from the [[15,1,3,3]] code). We provide explicit graphical derivations for these techniques and show how ZX and graphical encoder maps relate several equivalent perspectives on these code-transforming operations.

arXiv:2307.02437•Electronic Proceedings in Theoretical Computer Science•Aug 23, 2023•7 citations

Calderbank-Shor-Steane codes on group-valued qudits

Ben T. McDonough, Jian-Hao Zhang, Victor V. Albert +1 more

Calderbank-Shor-Steane (CSS) codes are a versatile quantum error-correcting family built out of commuting $X$- and $Z$-type checks. We introduce CSS-like codes on $G$-valued qudits for any finite group $G$ that reduce to qubit CSS codes for $G = \mathbb{Z}_2$ yet generalize the Kitaev quantum double model for general groups. The $X$-checks of our group-CSS codes correspond to left and/or right multiplication by group elements, while $Z$-checks project onto solutions to group word equations. We describe quantum-double models on oriented two-dimensional CW complexes (which need not cellulate a manifold) and prove that, when $G$ is non-Abelian and simple, every $G$-covariant group-CSS code with suitably upper-bounded $Z$-check weight and lower-bounded $Z$-distance reduces to a CW quantum double. We describe the codespace and logical operators of CW quantum doubles via the same intuition used to obtain logical structure of surface codes. We obtain distance bounds for codes on non-Abelian simple groups from the graph underlying the CW complex, and construct intrinsically non-Abelian code families with asymptotically optimal rate and distances. Adding "ghost vertices" to the CW complex generalizes quantum double models with defects and rough boundary conditions whose logical structure can be understood without reference to non-Abelian anyons or defects. Several non-invertible symmetry-protected topological states, both with ordinary and higher-form symmetries, are the unique codewords of simply-connected CW quantum doubles with a single ghost vertex.

quant-pharXiv:2602.19558•Feb 24, 2026•0 citations

Deriving CSS codes from a single zero-sum axiom

guobin ouyang

We show that the algebraic skeleton of **CSS (Calderbank–Shor–Steane) quantum error-correcting codes** follows from a single axiom rather than being postulated. The axiom — *zero-sum*: the weights of a closed sequence of moves sum to zero — is the content of Z0 in the Zero programme, a discrete-physics derivation of spacetime and matter from one primitive. From it (together with local compensating moves) we obtain, in order: 1. a **cycle space** over $\mathbb F_2$, i.e. a classical linear code with parameters $[E,\ \beta_1=E-V+c,\ \mathrm{girth}]$; 2. the **commutation criterion** for vertex/face stabilisers, proved unconditionally when faces are closed words (Theorem A, §4); 3. the **closed form** for the number of logical qubits, $k=E-r_X-r_Z$ (Theorem B, §5); 4. the **distance** as an *essential girth*, and the observation that the naive $d=\mathrm{girth}$ is false (Theorem D, §6); 5. the **binary operator algebra on each edge**, including a *real* anticommutation $F_eZ_e=-Z_eF_e$ with no factor of $i$, and the tensor-product structure $(\mathbb C^2)^{\otimes E}$ as a consequence rather than an assumption (Theorems E and F, §7); 6. the **face-selection rule**: not determined by the four candidate primitives we tested (Theorem G, §8.1), but a necessary relation $\sum_f\partial f=0$ always holds, forcing $k=\beta_1-|F|+\mathrm{rel}$; when $K$ is a closed connected surface this collapses to $k=2g$, depending only on the genus (§8.2). The net result is a **reduction of borrowings**. Standard CSS constructions import three ingredients — a qubit register, Pauli anticommutation, and the tensor product. Here the first is *replaced* by a derived per-edge binary operator space (Theorem F), the second is *derived* (F2, or E1 in matrix form), and the third is *derived* (F4). That leaves exactly **one** genuine input — the choice of faces. We also report a structural negative result: the derived constraint is *weaker* than standard homology, so this route cannot **improve** on CSS codes (§9). ---

•Oct 26, 2026•0 citations

Equivalence Classes of Quantum Error-Correcting Codes

Andrey Boris Khesin, Alexander D. Q. Li

Quantum error-correcting codes (QECC's) are needed to combat the inherent noise affecting quantum processes. Using ZX calculus, we represent QECC's in a form called a ZX diagram, consisting of a tensor network. In this paper, we present canonical forms for CSS codes and CSS states (which are CSS codes with 0 inputs), and we show the resulting canonical forms for the toric code and certain surface codes. Next, we introduce the notion of prime code diagrams, ZX diagrams of codes that have a single connected component with the property that no sequence of rewrite rules can split such a diagram into two connected components. We also show the Fundamental Theorem of Clifford Codes, proving the existence and uniqueness of the prime decomposition of Clifford codes. Next, we tabulate equivalence classes of ZX diagrams under a different definition of equivalence that allows output permutations and any local operations on the outputs. Possible representatives of these equivalence classes are analyzed. This work expands on previous works in exploring the canonical forms of QECC's in their ZX diagram representations.

arXiv:2406.12083•Jun 17, 2024•1 citation

Local Clifford equivalence to CSS codes: Polynomial-time classification and conversion

Mingyuan Wang, Stefan Krastanov

Calderbank--Shor--Steane (CSS) codes support decoding and fault-tolerant logical operations through separate pure $X$ and pure $Z$ stabilizer checks. Generator choices and single-qubit Clifford transformations can obscure this structure. We give a deterministic polynomial-time algorithm that decides whether an arbitrary stabilizer code is locally Clifford-equivalent to a CSS code and constructs the required transformation and CSS checks whenever such a form exists. For $m$ possibly redundant generator rows on $n$ qubits, the algorithm uses $O(mn^2+n^4)$ binary field operations. We reduce the problem to affine linear systems by characterizing local projectors that preserve the span of the binary stabilizer labels. The conversion preserves code parameters and check sparsity for quantum low-density parity-check (qLDPC) codes. We demonstrate CSS recovery and decoder reuse and resolve previously open LC-to-CSS classification questions for published code constructions. For graph states, LC-to-CSS equivalence corresponds to the existence of a bipartite graph in the local-complementation orbit. We derive a necessary-and-sufficient adjacency-matrix criterion for this property and construct such a graph whenever one exists. Our algorithm makes CSS decoding and fault-tolerant constructions accessible throughout the local Clifford equivalence classes of CSS codes.

quant-pharXiv:2610.28737•Oct 22, 2026•0 citations

Semiclassical grounds of the Calderbank-Shor-Steane quantum error correction codes

Manuél Ávila

A valid Calderbank-Shor-Steane (CSS) error correction code requires two classical linear codes for the preparation of the initial state (codewords). This code allow to correct for certain errors caused by an unwanted interaction which produces a degraded quantum state. However, this initial seven qubits encoding can be obtained from a maximally entangled Bell state (0000000>+|1111111)/√ through an operation Hint whose explicit expression is derived in the present work. The price the CSS syndrome has to pay due to its classical grounds is that the operator Hint is not unitary. In other words, Hint is not a valid quantum gate i. e. this does not represent a logical operation. Consequently, the final state is not completely robust for the standard cryptography of Quantum Computation. Besides to be a non unitary operator, Hint, is not reversible introducing with this dissipative effects that destroy the coherence in the quantum computer. Additionally, this operator is not invariant under rotations of the protector qubits inducing then preferred directions of the propagation of the logical information. These are indeed the reasons that prompt us for extending the semi classical CSS quantum error correction codes formalism to a pure quantum Hamming codes.

Journal of Computer Science and Technology•Jan 1, 2009•0 citations
In this paper, we demonstrate a direct correspondence between phase-free ZX diagrams, a graphical notation for representing and manipulating a certain class of linear maps on qubits, and Calderbank-Shor-Steane (CSS) codes, a large family of quantum error correcting codes constructed from classical codes, including for example the Steane code, surface codes, and colour codes. The stabilisers of a CSS code have an especially nice structure arising from a pair of orthogonal F2\mathbb F_2F2​-linear subspaces, or in the case of maximal CSS codes, a single subspace and its orthocomplement. On the other hand, phase-free ZX diagrams can always be efficiently reduced to a normal form given by the basis elements of an F2\mathbb F_2F2​-linear subspace. Here, we will show that these two ways of describing a quantum state by an F2\mathbb F_2F2​-linear subspace SSS are in fact the same. Namely, the maximal CSS code generated by SSS fixes the quantum state whose ZX normal form is also given by SSS. This insight gives us an immediate translation from stabilisers of a maximal CSS code into a ZX diagram describing its associated state. We show that we can extend this translation to stabilisers and logical operators of any (possibly non-maximal) CSS code by "bending wires". To demonstrate the utility of this translation, we give a simple picture of the surface code and a fully graphical derivation of the action of physical lattice surgery operations on the space of logical qubits, completing the ZX presentation of lattice surgery initiated by de Beudrap and Horsman.
In this work, we present a generic approach to transform CSS codes by building upon their equivalence to phase-free ZX diagrams. Using the ZX calculus, we demonstrate diagrammatic transformations between encoding maps associated with different codes. As a motivating example, we give explicit transformations between the Steane code and the quantum Reed-Muller code, since by switching between these two codes, one can obtain a fault-tolerant universal gate set. To this end, we propose a bidirectional rewrite rule to find a (not necessarily transversal) physical implementation for any logical ZX diagram in any CSS code. Then we focus on two code transformation techniques: code morphing, a procedure that transforms a code while retaining its fault-tolerant gates, and gauge fixing, where complimentary codes can be obtained from a common subsystem code (e.g., the Steane and the quantum Reed-Muller codes from the [[15,1,3,3]] code). We provide explicit graphical derivations for these techniques and show how ZX and graphical encoder maps relate several equivalent perspectives on these code-transforming operations.
Calderbank-Shor-Steane (CSS) codes are a versatile quantum error-correcting family built out of commuting XXX- and ZZZ-type checks. We introduce CSS-like codes on GGG-valued qudits for any finite group GGG that reduce to qubit CSS codes for G=Z2G = \mathbb{Z}_2G=Z2​ yet generalize the Kitaev quantum double model for general groups. The XXX-checks of our group-CSS codes correspond to left and/or right multiplication by group elements, while ZZZ-checks project onto solutions to group word equations. We describe quantum-double models on oriented two-dimensional CW complexes (which need not cellulate a manifold) and prove that, when GGG is non-Abelian and simple, every GGG-covariant group-CSS code with suitably upper-bounded ZZZ-check weight and lower-bounded ZZZ-distance reduces to a CW quantum double. We describe the codespace and logical operators of CW quantum doubles via the same intuition used to obtain logical structure of surface codes. We obtain distance bounds for codes on non-Abelian simple groups from the graph underlying the CW complex, and construct intrinsically non-Abelian code families with asymptotically optimal rate and distances. Adding "ghost vertices" to the CW complex generalizes quantum double models with defects and rough boundary conditions whose logical structure can be understood without reference to non-Abelian anyons or defects. Several non-invertible symmetry-protected topological states, both with ordinary and higher-form symmetries, are the unique codewords of simply-connected CW quantum doubles with a single ghost vertex.
We show that the algebraic skeleton of **CSS (Calderbank–Shor–Steane) quantum error-correcting codes** follows from a single axiom rather than being postulated. The axiom — *zero-sum*: the weights of a closed sequence of moves sum to zero — is the content of Z0 in the Zero programme, a discrete-physics derivation of spacetime and matter from one primitive. From it (together with local compensating moves) we obtain, in order: 1. a **cycle space** over F2\mathbb F_2F2​, i.e. a classical linear code with parameters [E, β1=E−V+c, girth][E,\ \beta_1=E-V+c,\ \mathrm{girth}][E, β1​=E−V+c, girth]; 2. the **commutation criterion** for vertex/face stabilisers, proved unconditionally when faces are closed words (Theorem A, §4); 3. the **closed form** for the number of logical qubits, k=E−rX−rZk=E-r_X-r_Zk=E−rX​−rZ​ (Theorem B, §5); 4. the **distance** as an *essential girth*, and the observation that the naive d=girthd=\mathrm{girth}d=girth is false (Theorem D, §6); 5. the **binary operator algebra on each edge**, including a *real* anticommutation FeZe=−ZeFeF_eZ_e=-Z_eF_eFe​Ze​=−Ze​Fe​ with no factor of iii, and the tensor-product structure (C2)⊗E(\mathbb C^2)^{\otimes E}(C2)⊗E as a consequence rather than an assumption (Theorems E and F, §7); 6. the **face-selection rule**: not determined by the four candidate primitives we tested (Theorem G, §8.1), but a necessary relation ∑f∂f=0\sum_f\partial f=0∑f​∂f=0 always holds, forcing k=β1−∣F∣+relk=\beta_1-|F|+\mathrm{rel}k=β1​−∣F∣+rel; when KKK is a closed connected surface this collapses to k=2gk=2gk=2g, depending only on the genus (§8.2). The net result is a **reduction of borrowings**. Standard CSS constructions import three ingredients — a qubit register, Pauli anticommutation, and the tensor product. Here the first is *replaced* by a derived per-edge binary operator space (Theorem F), the second is *derived* (F2, or E1 in matrix form), and the third is *derived* (F4). That leaves exactly **one** genuine input — the choice of faces. We also report a structural negative result: the derived constraint is *weaker* than standard homology, so this route cannot **improve** on CSS codes (§9). ---
Quantum error-correcting codes (QECC's) are needed to combat the inherent noise affecting quantum processes. Using ZX calculus, we represent QECC's in a form called a ZX diagram, consisting of a tensor network. In this paper, we present canonical forms for CSS codes and CSS states (which are CSS codes with 0 inputs), and we show the resulting canonical forms for the toric code and certain surface codes. Next, we introduce the notion of prime code diagrams, ZX diagrams of codes that have a single connected component with the property that no sequence of rewrite rules can split such a diagram into two connected components. We also show the Fundamental Theorem of Clifford Codes, proving the existence and uniqueness of the prime decomposition of Clifford codes. Next, we tabulate equivalence classes of ZX diagrams under a different definition of equivalence that allows output permutations and any local operations on the outputs. Possible representatives of these equivalence classes are analyzed. This work expands on previous works in exploring the canonical forms of QECC's in their ZX diagram representations.
Calderbank--Shor--Steane (CSS) codes support decoding and fault-tolerant logical operations through separate pure XXX and pure ZZZ stabilizer checks. Generator choices and single-qubit Clifford transformations can obscure this structure. We give a deterministic polynomial-time algorithm that decides whether an arbitrary stabilizer code is locally Clifford-equivalent to a CSS code and constructs the required transformation and CSS checks whenever such a form exists. For mmm possibly redundant generator rows on nnn qubits, the algorithm uses O(mn2+n4)O(mn^2+n^4)O(mn2+n4) binary field operations. We reduce the problem to affine linear systems by characterizing local projectors that preserve the span of the binary stabilizer labels. The conversion preserves code parameters and check sparsity for quantum low-density parity-check (qLDPC) codes. We demonstrate CSS recovery and decoder reuse and resolve previously open LC-to-CSS classification questions for published code constructions. For graph states, LC-to-CSS equivalence corresponds to the existence of a bipartite graph in the local-complementation orbit. We derive a necessary-and-sufficient adjacency-matrix criterion for this property and construct such a graph whenever one exists. Our algorithm makes CSS decoding and fault-tolerant constructions accessible throughout the local Clifford equivalence classes of CSS codes.
A valid Calderbank-Shor-Steane (CSS) error correction code requires two classical linear codes for the preparation of the initial state (codewords). This code allow to correct for certain errors caused by an unwanted interaction which produces a degraded quantum state. However, this initial seven qubits encoding can be obtained from a maximally entangled Bell state (0000000>+|1111111)/√ through an operation Hint whose explicit expression is derived in the present work. The price the CSS syndrome has to pay due to its classical grounds is that the operator Hint is not unitary. In other words, Hint is not a valid quantum gate i. e. this does not represent a logical operation. Consequently, the final state is not completely robust for the standard cryptography of Quantum Computation. Besides to be a non unitary operator, Hint, is not reversible introducing with this dissipative effects that destroy the coherence in the quantum computer. Additionally, this operator is not invariant under rotations of the protector qubits inducing then preferred directions of the propagation of the logical information. These are indeed the reasons that prompt us for extending the semi classical CSS quantum error correction codes formalism to a pure quantum Hamming codes.