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:2307.02437 · Electronic Proceedings in Theoretical Computer Science

Graphical CSS Code Transformation Using ZX Calculus

Jiaxin Huang, Sarah Meng Li, Lia Yeh, Aleks Kissinger, Michele Mosca, Michael Vasmer

Published Aug 23, 2023• 7 citations
arXivHTMLPDF

Abstract

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.

DOI
10.4204/eptcs.384.1

Related papers

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

Aleks Kissinger

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.

arXiv:2204.14038•Apr 29, 2022•10 citations

From Fermions to Qubits: A ZX-Calculus Perspective

Haytham McDowall-Rose, Razin Abdulrauf Shaikh, Yeh, Lia

Mapping fermionic systems to qubits on a quantum computer is often the first step for algorithms in quantum chemistry and condensed matter physics. However, it is difficult to reconcile the many different approaches that have been proposed, such as those based on binary matrices, ternary trees, and stabilizer codes. This challenge is further exacerbated by the many ways to describe them -- transformation of Majorana operators, action on Fock states, encoder circuits, and stabilizers of local encodings -- making it challenging to know when the mappings are equivalent. In this work, we present a graphical framework for fermion-to-qubit mappings that streamlines and unifies various representations through the ZX-calculus. To start, we present the correspondence between linear encodings of the Fock basis and phase-free ZX-diagrams. The commutation rules of scalable ZX-calculus allows us to convert the fermionic operators to Pauli operators under any linear encoding. Next, we give a translation from ternary tree mappings to scalable ZX-diagrams, which not only directly represents the encoder map as a CNOT circuit, but also retains the same structure as the tree. Consequently, we graphically prove that ternary tree transformations are equivalent to linear encodings, a recent result by Chiew et al. The scalable ZX representation moreover enables us to construct an algorithm to directly compute the binary matrix for any ternary tree mapping. Lastly, we present the graphical representation of local fermion-to-qubit encodings. Its encoder ZX-diagram has the same connectivity as the interaction graph of the fermionic Hamiltonian and also allows us to easily identify stabilizers of the encoding.

arXiv:2505.06212•May 9, 2025•1 citation

Transversal diagonal logical operators for stabiliser codes

Mark A Webster, Armanda O. Quintavalle, Stephen D. Bartlett

Abstract Storing quantum information in a quantum error correction code can protect it from errors, but the ability to transform the stored quantum information in a fault tolerant way is equally important. Logical Pauli group operators can be implemented on Calderbank-Shor-Steane (CSS) codes, a commonly-studied category of codes, by applying a series of physical Pauli X and Z gates. Logical operators of this form are fault-tolerant because each qubit is acted upon by at most one gate, limiting the spread of errors, and are referred to as transversal logical operators. Identifying transversal logical operators outside the Pauli group is less well understood. Pauli operators are the first level of the Clifford hierarchy which is deeply connected to fault-tolerance and universality. In this work, we study transversal logical operators composed of single- and multi-qubit diagonal Clifford hierarchy gates. We demonstrate algorithms for identifying all transversal diagonal logical operators on a CSS code that are more general or have lower computational complexity than previous methods. We also show a method for constructing CSS codes that have a desired diagonal logical Clifford hierarchy operator implemented using single qubit phase gates. Our methods rely on representing operators composed of diagonal Clifford hierarchy gates as diagonal XP operators and this technique may have broader applications.

New Journal of Physics•Sep 22, 2023•13 citations

SpiderCSS: Scalable Fault-Tolerant CSS State Preparation

Boldizsár Poór, Andrey Boris Khesin, Sarah Meng Li +3 more

Fault-tolerant preparation of logical states is a critical primitive for the realization of large-scale fault-tolerant quantum computing. This paper introduces SpiderCSS, a scalable compilation pipeline that generates highly-optimized, fault-tolerant state preparation circuits for arbitrary Calderbank-Shor-Steane (CSS) codes. Starting from an idealized specification of a CSS state, we use the ZX-calculus and fault-equivalent rewrites to construct a diagram that prepares the given state while preserving the fault tolerance of the initial ideal ZX-diagram. From this diagram, SpiderCSS constructs a fault-tolerant CSS-state preparation circuit using a modular construction that is CNOT-minimal both within each component and also in the way these components are connected together. By only using fault-equivalent rewrites, the final circuit is provably fault-tolerant without needing expensive verification. Monte Carlo simulations across a variety of CSS codes up to distance 15 show that SpiderCSS scales efficiently and constructs circuits with substantially reduced depth and qubit footprint compared to existing scalable and heuristic methods, while simultaneously achieving an average decrease of 33.7% in logical error rate and an increase of 9.5% in acceptance rate.

quant-pharXiv:2610.03714•Oct 5, 2026•0 citations

A New Family of Fault Tolerant Quantum Reed-Muller Codes

Harrison Eggers

Fault tolerant quantum computation is a critical step in the development of practical quantum computers. Unfortunately, not every quantum error correcting code can be used for fault tolerant computation. Rengaswamy et. al. define CSS-T codes, which are CSS codes that admit the transversal application of the T gate, which is a key step in achieving fault tolerant computation. They then present a family of quantum Reed-Muller fault tolerant codes. Their family of codes admits a transversal T gate, but the asymptotic rate of the family is zero. We build on their work by reframing their CSS-T conditions using the concept of self-orthogonality. Using this framework, we define an alternative family of quantum Reed-Muller fault tolerant codes. Like the quantum Reed-Muller family found by Rengaswamy et. al., our family admits a transversal T gate, but also has a nonvanishing asymptotic rate.\nWe prove three key results in our search for a Reed-Muller CSS-T family with a nonvanishing rate. First, we show an equivalence between a code containing a self-dual subcode and the dual of that code being self-orthogonal. This allows us to more easily determine if a pair of codes define a CSS-T code. Next, we show that if C1 and C2 are both Reed-Muller codes that form a CSS-T code, C1 must be self-orthogonal. This limits the rate of any family that is constructed solely from Reed-Muller codes. Lastly, we define a family of CSS-T codes by choosing C1 = RM(r, 2r + 1) and C2 = RM(0, 2r + 1) for some nonnegative integer r. We show that this family has an asymptotic rate of 1/2, and show that it is the only possible CSS-T family constructed only from Reed-Muller codes where C1 is self dual.

•Jan 1, 2020•0 citations

Transversal Diagonal Logical Operators for Stabiliser Codes

Webster, Mark A., Armanda O. Quintavalle, Stephen D. Bartlett

Storing quantum information in a quantum error correction code can protect it from errors, but the ability to transform the stored quantum information in a fault tolerant way is equally important. Logical Pauli group operators can be implemented on Calderbank-Shor-Steane (CSS) codes, a commonly-studied category of codes, by applying a series of physical Pauli X and Z gates. Logical operators of this form are fault-tolerant because each qubit is acted upon by at most one gate, limiting the spread of errors, and are referred to as transversal logical operators. Identifying transversal logical operators outside the Pauli group is less well understood. Pauli operators are the first level of the Clifford hierarchy which is deeply connected to fault-tolerance and universality. In this work, we study transversal logical operators composed of single- and multi-qubit diagonal Clifford hierarchy gates. We demonstrate algorithms for identifying all transversal diagonal logical operators on a CSS code that are more general or have lower computational complexity than previous methods. We also show a method for constructing CSS codes that have a desired diagonal logical Clifford hierarchy operator implemented using single qubit phase gates. Our methods rely on representing operators composed of diagonal Clifford hierarchy gates as diagonal XP operators and this technique may have broader applications.

arXiv:2303.15615•Mar 27, 2023•1 citation
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.
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.
Mapping fermionic systems to qubits on a quantum computer is often the first step for algorithms in quantum chemistry and condensed matter physics. However, it is difficult to reconcile the many different approaches that have been proposed, such as those based on binary matrices, ternary trees, and stabilizer codes. This challenge is further exacerbated by the many ways to describe them -- transformation of Majorana operators, action on Fock states, encoder circuits, and stabilizers of local encodings -- making it challenging to know when the mappings are equivalent. In this work, we present a graphical framework for fermion-to-qubit mappings that streamlines and unifies various representations through the ZX-calculus. To start, we present the correspondence between linear encodings of the Fock basis and phase-free ZX-diagrams. The commutation rules of scalable ZX-calculus allows us to convert the fermionic operators to Pauli operators under any linear encoding. Next, we give a translation from ternary tree mappings to scalable ZX-diagrams, which not only directly represents the encoder map as a CNOT circuit, but also retains the same structure as the tree. Consequently, we graphically prove that ternary tree transformations are equivalent to linear encodings, a recent result by Chiew et al. The scalable ZX representation moreover enables us to construct an algorithm to directly compute the binary matrix for any ternary tree mapping. Lastly, we present the graphical representation of local fermion-to-qubit encodings. Its encoder ZX-diagram has the same connectivity as the interaction graph of the fermionic Hamiltonian and also allows us to easily identify stabilizers of the encoding.
Abstract Storing quantum information in a quantum error correction code can protect it from errors, but the ability to transform the stored quantum information in a fault tolerant way is equally important. Logical Pauli group operators can be implemented on Calderbank-Shor-Steane (CSS) codes, a commonly-studied category of codes, by applying a series of physical Pauli X and Z gates. Logical operators of this form are fault-tolerant because each qubit is acted upon by at most one gate, limiting the spread of errors, and are referred to as transversal logical operators. Identifying transversal logical operators outside the Pauli group is less well understood. Pauli operators are the first level of the Clifford hierarchy which is deeply connected to fault-tolerance and universality. In this work, we study transversal logical operators composed of single- and multi-qubit diagonal Clifford hierarchy gates. We demonstrate algorithms for identifying all transversal diagonal logical operators on a CSS code that are more general or have lower computational complexity than previous methods. We also show a method for constructing CSS codes that have a desired diagonal logical Clifford hierarchy operator implemented using single qubit phase gates. Our methods rely on representing operators composed of diagonal Clifford hierarchy gates as diagonal XP operators and this technique may have broader applications.
Fault-tolerant preparation of logical states is a critical primitive for the realization of large-scale fault-tolerant quantum computing. This paper introduces SpiderCSS, a scalable compilation pipeline that generates highly-optimized, fault-tolerant state preparation circuits for arbitrary Calderbank-Shor-Steane (CSS) codes. Starting from an idealized specification of a CSS state, we use the ZX-calculus and fault-equivalent rewrites to construct a diagram that prepares the given state while preserving the fault tolerance of the initial ideal ZX-diagram. From this diagram, SpiderCSS constructs a fault-tolerant CSS-state preparation circuit using a modular construction that is CNOT-minimal both within each component and also in the way these components are connected together. By only using fault-equivalent rewrites, the final circuit is provably fault-tolerant without needing expensive verification. Monte Carlo simulations across a variety of CSS codes up to distance 15 show that SpiderCSS scales efficiently and constructs circuits with substantially reduced depth and qubit footprint compared to existing scalable and heuristic methods, while simultaneously achieving an average decrease of 33.7% in logical error rate and an increase of 9.5% in acceptance rate.
Fault tolerant quantum computation is a critical step in the development of practical quantum computers. Unfortunately, not every quantum error correcting code can be used for fault tolerant computation. Rengaswamy et. al. define CSS-T codes, which are CSS codes that admit the transversal application of the T gate, which is a key step in achieving fault tolerant computation. They then present a family of quantum Reed-Muller fault tolerant codes. Their family of codes admits a transversal T gate, but the asymptotic rate of the family is zero. We build on their work by reframing their CSS-T conditions using the concept of self-orthogonality. Using this framework, we define an alternative family of quantum Reed-Muller fault tolerant codes. Like the quantum Reed-Muller family found by Rengaswamy et. al., our family admits a transversal T gate, but also has a nonvanishing asymptotic rate.\nWe prove three key results in our search for a Reed-Muller CSS-T family with a nonvanishing rate. First, we show an equivalence between a code containing a self-dual subcode and the dual of that code being self-orthogonal. This allows us to more easily determine if a pair of codes define a CSS-T code. Next, we show that if C1 and C2 are both Reed-Muller codes that form a CSS-T code, C1 must be self-orthogonal. This limits the rate of any family that is constructed solely from Reed-Muller codes. Lastly, we define a family of CSS-T codes by choosing C1 = RM(r, 2r + 1) and C2 = RM(0, 2r + 1) for some nonnegative integer r. We show that this family has an asymptotic rate of 1/2, and show that it is the only possible CSS-T family constructed only from Reed-Muller codes where C1 is self dual.
Storing quantum information in a quantum error correction code can protect it from errors, but the ability to transform the stored quantum information in a fault tolerant way is equally important. Logical Pauli group operators can be implemented on Calderbank-Shor-Steane (CSS) codes, a commonly-studied category of codes, by applying a series of physical Pauli X and Z gates. Logical operators of this form are fault-tolerant because each qubit is acted upon by at most one gate, limiting the spread of errors, and are referred to as transversal logical operators. Identifying transversal logical operators outside the Pauli group is less well understood. Pauli operators are the first level of the Clifford hierarchy which is deeply connected to fault-tolerance and universality. In this work, we study transversal logical operators composed of single- and multi-qubit diagonal Clifford hierarchy gates. We demonstrate algorithms for identifying all transversal diagonal logical operators on a CSS code that are more general or have lower computational complexity than previous methods. We also show a method for constructing CSS codes that have a desired diagonal logical Clifford hierarchy operator implemented using single qubit phase gates. Our methods rely on representing operators composed of diagonal Clifford hierarchy gates as diagonal XP operators and this technique may have broader applications.