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:2003.09999

Entanglement and Quaternions: The graphical calculus ZQ

Hector Miller-Bakewell

Published Mar 22, 2020• 3 citations
arXivHTMLPDF

Abstract

Graphical calculi are vital tools for representing and reasoning about quantum circuits and processes. Some are not only graphically intuitive but also logically complete. The best known of these is the ZX-calculus, which is an industry candidate for an Intermediate Representation; a language that sits between the algorithm designer's intent and the quantum hardware's gate instructions. The ZX calculus, built from generalised Z and X rotations, has difficulty reasoning about arbitrary rotations. This contrasts with the cross-hardware compiler TriQ which uses these arbitrary rotations to exploit hardware efficiencies. In this paper we introduce the graphical calculus ZQ, which uses quaternions to represent these arbitrary rotations, similar to TriQ, and the phase-free Z spider to represent entanglement, similar to ZX. We show that this calculus is sound and complete for qubit quantum computing, while also showing that a fully spider-based representation would have been impossible. This new calculus extends the zoo of qubit graphical calculi, each with different strengths, and we hope it will provide a common language for the optimisation procedures of both ZX and TriQ.

DOI
10.48550/arxiv.2003.09999

Related papers

Graphical Calculi and their Conjecture Synthesis

Hector Miller-Bakewell

Categorical Quantum Mechanics, and graphical calculi in particular, has proven to be an intuitive and powerful way to reason about quantum computing. This work continues the exploration of graphical calculi, inside and outside of the quantum computing setting, by investigating the algebraic structures with which we label diagrams. The initial aim for this was Conjecture Synthesis; the algorithmic process of creating theorems. To this process we introduce a generalisation step, which itself requires the ability to infer and then verify parameterised families of theorems. This thesis introduces such inference and verification frameworks, in doing so forging novel links between graphical calculi and fields such as Algebraic Geometry and Galois Theory. These frameworks inspired further research into the design of graphical calculi, and we introduce two important new calculi here. First is the calculus RING, which is initial among ring-based qubit graphical calculi, and in turn inspired the introduction and classification of phase homomorphism pairs also presented here. The second is the calculus ZQ, an edge-decorated calculus which naturally expresses arbitrary qubit rotations, eliminating the need for non-linear rules such as (EU) of ZX. It is expected that these results will be of use to those creating optimisation schemes and intermediate representations for quantum computing, to those creating new graphical calculi, and for those performing conjecture synthesis.

arXiv:2010.03914•Jan 1, 2020•1 citation

Introduction to ZX Calculus

Subhojit Halder

While the quantum circuit model remains the dominant framework for representing and executing quantum algorithms, it is not always the most optimal framework for representing the quantum circuit’s deeper structure. In a standard circuit diagram, computation is shown mainly as a time ordered sequence of gates acting on qubit wires. ZX calculus, by contrast, represents the same process using two families of generators, the Z spiders and the X spiders, together with wires and Hadamard structure, so that algebraic identities, entanglement structure, and rewrite based simplifications become visible directly in the diagram itself. ZX calculus is not another visual representation for the same quantum circuit we have been using, but a graphical calculus in which diagrams carry both computational meaning and transformation rules. This is also the reason for the name ZX ; the formalism is built around the interaction between Z -type and X -type observables, phases, and basis changes. By turning matrix manipulations into diagrammatic rewrites, ZX calculus reduces much of the redundancies and abstract nature usually associated with quantum computation and provides a more structural language for understanding, optimizing, and verifying quantum processes.

Apress eBooks•Jan 1, 2026•0 citations

Completeness for arbitrary finite dimensions of ZXW-calculus, a unifying calculus

Boldizsár Poór, Quanlong Wang, Razin Abdulrauf Shaikh +3 more

The ZX-calculus is a universal graphical language for qubit quantum computation, meaning that every linear map between qubits can be expressed in the ZX-calculus. Furthermore, it is a complete graphical rewrite system: any equation involving linear maps that is derivable in the Hilbert space formalism for quantum theory can also be derived in the calculus by rewriting. It has widespread usage within quantum industry and academia for a variety of tasks such as quantum circuit optimisation, error-correction, and education.The ZW-calculus is an alternative universal graphical language that is also complete for qubit quantum computing. In fact, its completeness was used to prove that the ZX-calculus is universally complete. This calculus has advanced how quantum circuits are compiled into photonic hardware architectures in the industry.Recently, by combining these two calculi, a new calculus has emerged for qubit quantum computation, the ZXW-calculus. Using this calculus, graphical-differentiation, -integration, and -exponentiation were made possible, thus enabling the development of novel techniques in the domains of quantum machine learning and quantum chemistry.Here, we generalise the ZXW-calculus to arbitrary finite dimensions, that is, to qudits. Moreover, we prove that this graphical rewrite system is complete for any finite dimension. This is the first completeness result for any universal graphical language beyond qubits.

arXiv:2302.12135•ACM/IEEE Symposium on Logic in Computer Science (LICS)•Jun 26, 2023•13 citations

The Focked-up ZX Calculus: Picturing Continuous-Variable Quantum Computation

Razin Abdulrauf Shaikh, Lia Yeh, Stefano Gogioso

While the ZX and ZW calculi have been effective as graphical reasoning tools for finite-dimensional quantum computation, the possibilities for continuous-variable quantum computation (CVQC) in infinite-dimensional Hilbert space are only beginning to be explored. In this work, we formulate a graphical language for CVQC. Each diagram is an undirected graph made of two types of spiders: the Z spider from the ZX calculus defined on the reals, and the newly introduced Fock spider defined on the natural numbers. The Z and X spiders represent functions in position and momentum space respectively, while the Fock spider represents functions in the discrete Fock basis. In addition to the Fourier transform between Z and X, and the Hermite transform between Z and Fock, we present exciting new graphical rules capturing heftier CVQC interactions. We ensure this calculus is complete for all of Gaussian CVQC interpreted in infinite-dimensional Hilbert space, by translating the completeness in affine Lagrangian relations by Booth, Carette, and Comfort. Applying our calculus for quantum error correction, we derive graphical representations of the Gottesman-Kitaev-Preskill (GKP) code encoder, syndrome measurement, and magic state distillation of Hadamard eigenstates. Finally, we elucidate Gaussian boson sampling by providing a fully graphical proof that its circuit samples submatrix hafnians.

arXiv:2406.02905•Jun 5, 2024•0 citations

ZX-calculus is Complete for Finite-Dimensional Hilbert Spaces

Boldizsár Poór, Razin Abdulrauf Shaikh, Quanlong Wang

The ZX-calculus is a graphical language for reasoning about quantum computing and quantum information theory.As a complete graphical language, it incorporates a set of axioms rich enough to derive any equation of the underlying formalism.While completeness of the ZX-calculus has been established for qubits and the Clifford fragment of prime-dimensional qudits, universal completeness beyond two-level systems has remained unproven until now.In this paper, we present a proof establishing the completeness of finite-dimensional ZX-calculus, incorporating only the mixeddimensional Z-spider and the qudit X-spider as generators.Our approach builds on the completeness of another graphical language, the finite-dimensional ZW-calculus, with direct translations between these two calculi.By proving its completeness, we lay a solid foundation for the ZX-calculus as a versatile tool not only for quantum computation but also for various fields within finite-dimensional quantum theory.

arXiv:2405.10896•Electronic Proceedings in Theoretical Computer Science•Aug 19, 2025•2 citations

ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity

Miriam Backens, Aleks Kissinger

We present a new graphical calculus that is sound and complete for a universal family of quantum circuits, which can be seen as the natural string-diagrammatic extension of the approximately (real-valued) universal family of Hadamard+CCZ circuits. The diagrammatic language is generated by two kinds of nodes: the so-called 'spider' associated with the computational basis, as well as a new arity-N generalisation of the Hadamard gate, which satisfies a variation of the spider fusion law. Unlike previous graphical calculi, this admits compact encodings of non-linear classical functions. For example, the AND gate can be depicted as a diagram of just 2 generators, compared to ~25 in the ZX-calculus. Consequently, N-controlled gates, hypergraph states, Hadamard+Toffoli circuits, and diagonal circuits at arbitrary levels of the Clifford hierarchy also enjoy encodings with low constant overhead. This suggests that this calculus will be significantly more convenient for reasoning about the interplay between classical non-linear behaviour (e.g. in an oracle) and purely quantum operations. After presenting the calculus, we will prove it is sound and complete for universal quantum computation by demonstrating the reduction of any diagram to an easily describable normal form.

arXiv:1805.02175•Electronic Proceedings in Theoretical Computer Science•Jan 31, 2019•73 citations
Graphical calculi are vital tools for representing and reasoning about quantum circuits and processes. Some are not only graphically intuitive but also logically complete. The best known of these is the ZX-calculus, which is an industry candidate for an Intermediate Representation; a language that sits between the algorithm designer's intent and the quantum hardware's gate instructions. The ZX calculus, built from generalised Z and X rotations, has difficulty reasoning about arbitrary rotations. This contrasts with the cross-hardware compiler TriQ which uses these arbitrary rotations to exploit hardware efficiencies. In this paper we introduce the graphical calculus ZQ, which uses quaternions to represent these arbitrary rotations, similar to TriQ, and the phase-free Z spider to represent entanglement, similar to ZX. We show that this calculus is sound and complete for qubit quantum computing, while also showing that a fully spider-based representation would have been impossible. This new calculus extends the zoo of qubit graphical calculi, each with different strengths, and we hope it will provide a common language for the optimisation procedures of both ZX and TriQ.
Categorical Quantum Mechanics, and graphical calculi in particular, has proven to be an intuitive and powerful way to reason about quantum computing. This work continues the exploration of graphical calculi, inside and outside of the quantum computing setting, by investigating the algebraic structures with which we label diagrams. The initial aim for this was Conjecture Synthesis; the algorithmic process of creating theorems. To this process we introduce a generalisation step, which itself requires the ability to infer and then verify parameterised families of theorems. This thesis introduces such inference and verification frameworks, in doing so forging novel links between graphical calculi and fields such as Algebraic Geometry and Galois Theory. These frameworks inspired further research into the design of graphical calculi, and we introduce two important new calculi here. First is the calculus RING, which is initial among ring-based qubit graphical calculi, and in turn inspired the introduction and classification of phase homomorphism pairs also presented here. The second is the calculus ZQ, an edge-decorated calculus which naturally expresses arbitrary qubit rotations, eliminating the need for non-linear rules such as (EU) of ZX. It is expected that these results will be of use to those creating optimisation schemes and intermediate representations for quantum computing, to those creating new graphical calculi, and for those performing conjecture synthesis.
While the quantum circuit model remains the dominant framework for representing and executing quantum algorithms, it is not always the most optimal framework for representing the quantum circuit’s deeper structure. In a standard circuit diagram, computation is shown mainly as a time ordered sequence of gates acting on qubit wires. ZX calculus, by contrast, represents the same process using two families of generators, the Z spiders and the X spiders, together with wires and Hadamard structure, so that algebraic identities, entanglement structure, and rewrite based simplifications become visible directly in the diagram itself. ZX calculus is not another visual representation for the same quantum circuit we have been using, but a graphical calculus in which diagrams carry both computational meaning and transformation rules. This is also the reason for the name ZX ; the formalism is built around the interaction between Z -type and X -type observables, phases, and basis changes. By turning matrix manipulations into diagrammatic rewrites, ZX calculus reduces much of the redundancies and abstract nature usually associated with quantum computation and provides a more structural language for understanding, optimizing, and verifying quantum processes.
The ZX-calculus is a universal graphical language for qubit quantum computation, meaning that every linear map between qubits can be expressed in the ZX-calculus. Furthermore, it is a complete graphical rewrite system: any equation involving linear maps that is derivable in the Hilbert space formalism for quantum theory can also be derived in the calculus by rewriting. It has widespread usage within quantum industry and academia for a variety of tasks such as quantum circuit optimisation, error-correction, and education.The ZW-calculus is an alternative universal graphical language that is also complete for qubit quantum computing. In fact, its completeness was used to prove that the ZX-calculus is universally complete. This calculus has advanced how quantum circuits are compiled into photonic hardware architectures in the industry.Recently, by combining these two calculi, a new calculus has emerged for qubit quantum computation, the ZXW-calculus. Using this calculus, graphical-differentiation, -integration, and -exponentiation were made possible, thus enabling the development of novel techniques in the domains of quantum machine learning and quantum chemistry.Here, we generalise the ZXW-calculus to arbitrary finite dimensions, that is, to qudits. Moreover, we prove that this graphical rewrite system is complete for any finite dimension. This is the first completeness result for any universal graphical language beyond qubits.
While the ZX and ZW calculi have been effective as graphical reasoning tools for finite-dimensional quantum computation, the possibilities for continuous-variable quantum computation (CVQC) in infinite-dimensional Hilbert space are only beginning to be explored. In this work, we formulate a graphical language for CVQC. Each diagram is an undirected graph made of two types of spiders: the Z spider from the ZX calculus defined on the reals, and the newly introduced Fock spider defined on the natural numbers. The Z and X spiders represent functions in position and momentum space respectively, while the Fock spider represents functions in the discrete Fock basis. In addition to the Fourier transform between Z and X, and the Hermite transform between Z and Fock, we present exciting new graphical rules capturing heftier CVQC interactions. We ensure this calculus is complete for all of Gaussian CVQC interpreted in infinite-dimensional Hilbert space, by translating the completeness in affine Lagrangian relations by Booth, Carette, and Comfort. Applying our calculus for quantum error correction, we derive graphical representations of the Gottesman-Kitaev-Preskill (GKP) code encoder, syndrome measurement, and magic state distillation of Hadamard eigenstates. Finally, we elucidate Gaussian boson sampling by providing a fully graphical proof that its circuit samples submatrix hafnians.
The ZX-calculus is a graphical language for reasoning about quantum computing and quantum information theory.As a complete graphical language, it incorporates a set of axioms rich enough to derive any equation of the underlying formalism.While completeness of the ZX-calculus has been established for qubits and the Clifford fragment of prime-dimensional qudits, universal completeness beyond two-level systems has remained unproven until now.In this paper, we present a proof establishing the completeness of finite-dimensional ZX-calculus, incorporating only the mixeddimensional Z-spider and the qudit X-spider as generators.Our approach builds on the completeness of another graphical language, the finite-dimensional ZW-calculus, with direct translations between these two calculi.By proving its completeness, we lay a solid foundation for the ZX-calculus as a versatile tool not only for quantum computation but also for various fields within finite-dimensional quantum theory.
We present a new graphical calculus that is sound and complete for a universal family of quantum circuits, which can be seen as the natural string-diagrammatic extension of the approximately (real-valued) universal family of Hadamard+CCZ circuits. The diagrammatic language is generated by two kinds of nodes: the so-called 'spider' associated with the computational basis, as well as a new arity-N generalisation of the Hadamard gate, which satisfies a variation of the spider fusion law. Unlike previous graphical calculi, this admits compact encodings of non-linear classical functions. For example, the AND gate can be depicted as a diagram of just 2 generators, compared to ~25 in the ZX-calculus. Consequently, N-controlled gates, hypergraph states, Hadamard+Toffoli circuits, and diagonal circuits at arbitrary levels of the Clifford hierarchy also enjoy encodings with low constant overhead. This suggests that this calculus will be significantly more convenient for reasoning about the interplay between classical non-linear behaviour (e.g. in an oracle) and purely quantum operations. After presenting the calculus, we will prove it is sound and complete for universal quantum computation by demonstrating the reduction of any diagram to an easily describable normal form.