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

Representing and Implementing Matrices Using Algebraic ZX-calculus

Quanlong Wang, Richie Wai Kit Yeung

Published Oct 13, 2021• 2 citations
arXivHTMLPDF

Abstract

In linear algebra applications, elementary matrices hold a significant role. This paper presents a diagrammatic representation of all $2^m\times 2^n$-sized elementary matrices in algebraic ZX-calculus, showcasing their properties on inverses and transpose through diagrammatic rewriting. Additionally, the paper uses this representation to depict the Jozsa-style matchgate in algebraic ZX-calculus. To further enhance practical use, we have implemented this representation in \texttt{discopy}. Overall, this work sets the groundwork for more applications of ZX-calculus such as synthesising controlled matrices [arXiv:2212.04462] in quantum computing.

DOI
10.48550/arxiv.2110.06898

Related papers

Representing Matrices Using Algebraic ZX-calculus.

Quanlong Wang

Elementary matrices play an important role in linear algebra applications. In this paper, we represent all the elementary matrices of size 2^m\times 2^m using algebraic ZX-calculus. Then we show their properties on inverses and transpose using rewriting rules of ZX-calculus. As a consequence, we are able to depict any matrices of size 2^m\times 2^n by string diagrams without resort to a diagrammatic normal form for matrices as shown in [Wang 2020]. By doing so we pave the way towards visualising by string diagrams important matrix technologies deployed in AI especially machine learning.

•Oct 13, 2021•0 citations

Completeness of algebraic ZX-calculus over arbitrary commutative rings and semirings

Quanlong Wang

ZX-calculus is a strict mathematical formalism for graphical quantum computing which is based on the field of complex numbers. In this paper, we extend its power by generalising ZX-calculus to such an extent that it is universal both in an arbitrary commutative ring and in an arbitrary commutative semiring. Furthermore, we follow the framework of arXiv:2007.13739 to prove respectively that the proposed ZX-calculus over an arbitrary commutative ring (semiring) is complete for matrices over the same ring (semiring), via a normal form inspired from matrix elementary operations such as row addition and row multiplication. This work could lead to various applications including doing elementary number theory in string diagrams.

arXiv:1912.01003•Dec 2, 2019•8 citations

Algebraic complete axiomatisation of ZX-calculus with a normal form via elementary matrix operations

Quanlong Wang

In this paper we give a complete axiomatisation of qubit ZX-calculus via elementary transformations which are basic operations in linear algebra. This formalism has two main advantages. First, all the operations of the phases are algebraic ones without trigonometry functions involved, thus paved the way for generalising complete axiomatisation of qubit ZX-calculus to qudit ZX-calculus and ZX-calculus over commutative semirings. Second, we characterise elementary transformations in terms of ZX diagrams, so a lot of linear algebra stuff can be done purely diagrammatically.

arXiv:2007.13739•Jul 26, 2020•8 citations

SZX-calculus: Scalable Graphical Quantum Reasoning

Titouan Carette, Dominic C. Horsman, Simon Perdrix

We introduce the Scalable ZX-calculus (SZX-calculus for short), a formal and compact graphical language for the design and verification of quantum computations. The SZX-calculus is an extension of the ZX-calculus, a powerful framework that captures graphically the fundamental properties of quantum mechanics through its complete set of rewrite rules. The ZX-calculus is, however, a low level language, with each wire representing a single qubit. This limits its ability to handle large and elaborate quantum evolutions. We extend the ZX-calculus to registers of qubits and allow compact representation of sub-diagrams via binary matrices. We show soundness and completeness of the SZX-calculus and provide two examples of applications, for graph states and error correcting codes.

arXiv:1905.00041•Apr 30, 2019•8 citations

An Algebraic Axiomatisation of ZX-calculus

Quanlong Wang

ZX-calculus is a graphical language for quantum computing which is complete in the sense that calculation in matrices can be done in a purely diagrammatic way. However, all previous universally complete axiomatisations of ZX-calculus have included at least one rule involving trigonometric functions such as sin and cos which makes it difficult for application purpose. In this paper we give an algebraic complete axiomatisation of ZX-calculus instead such that there are only ring operations involved for phases. With this algebraic axiomatisation of ZX-calculus, we are able to establish for the first time a simple translation of diagrams from another graphical language called ZH-calculus and to derive all the ZX-translated rules of ZH-calculus. As a consequence, we have a great benefit that all techniques obtained in ZH-calculus can be transplanted to ZX-calculus, which can't be obtained by just using the completeness of ZX-calculus.

arXiv:1911.06752•Electronic Proceedings in Theoretical Computer Science•Sep 6, 2021•14 citations

Graphical Algebraic Geometry: From Ideals and Varieties to Quantum Calculi

Dichuan Gao, Razin A. Shaikh, Aleks Kissinger

We introduce Graphical Algebraic Geometry (GAG), a family of diagrammatic languages extending the Graphical Linear Algebra programme. We construct several languages within this family and prove that they are universal and complete for the corresponding (co)span semantics of commutative algebras and affine varieties. This framework provides clear graphical representations of algebraic structures -- such as polynomials, ideals, and varieties -- enabling intuitive yet rigorous diagrammatic reasoning. We showcase two practical viewpoints on GAG. First, we show that instances of counting constraint satisfaction problem (#CSP) are recast as rewrite problems of closed diagrams in GAG. This means that deciding rewritability in GAG is #P-hard, and GAG can be viewed as a complete and compositional rewrite system for networks of polynomial constraints. Second, we characterize the qudit ZH calculus, a diagrammatic language for quantum computation, as an extension of Graphical Algebraic Geometry. This establishes the correspondence that Graphical Algebraic Geometry is to the ZH calculus what Graphical Linear Algebra is to the ZX calculus. Using this construction, we show that computing amplitudes in qudit ZH requires only a constant number of queries to a GAG oracle.

quant-pharXiv:2605.13993•May 15, 2026•0 citations
In linear algebra applications, elementary matrices hold a significant role. This paper presents a diagrammatic representation of all 2m×2n2^m\times 2^n2m×2n-sized elementary matrices in algebraic ZX-calculus, showcasing their properties on inverses and transpose through diagrammatic rewriting. Additionally, the paper uses this representation to depict the Jozsa-style matchgate in algebraic ZX-calculus. To further enhance practical use, we have implemented this representation in \texttt{discopy}. Overall, this work sets the groundwork for more applications of ZX-calculus such as synthesising controlled matrices [arXiv:2212.04462] in quantum computing.
Elementary matrices play an important role in linear algebra applications. In this paper, we represent all the elementary matrices of size 2^m\times 2^m using algebraic ZX-calculus. Then we show their properties on inverses and transpose using rewriting rules of ZX-calculus. As a consequence, we are able to depict any matrices of size 2^m\times 2^n by string diagrams without resort to a diagrammatic normal form for matrices as shown in [Wang 2020]. By doing so we pave the way towards visualising by string diagrams important matrix technologies deployed in AI especially machine learning.
ZX-calculus is a strict mathematical formalism for graphical quantum computing which is based on the field of complex numbers. In this paper, we extend its power by generalising ZX-calculus to such an extent that it is universal both in an arbitrary commutative ring and in an arbitrary commutative semiring. Furthermore, we follow the framework of arXiv:2007.13739 to prove respectively that the proposed ZX-calculus over an arbitrary commutative ring (semiring) is complete for matrices over the same ring (semiring), via a normal form inspired from matrix elementary operations such as row addition and row multiplication. This work could lead to various applications including doing elementary number theory in string diagrams.
In this paper we give a complete axiomatisation of qubit ZX-calculus via elementary transformations which are basic operations in linear algebra. This formalism has two main advantages. First, all the operations of the phases are algebraic ones without trigonometry functions involved, thus paved the way for generalising complete axiomatisation of qubit ZX-calculus to qudit ZX-calculus and ZX-calculus over commutative semirings. Second, we characterise elementary transformations in terms of ZX diagrams, so a lot of linear algebra stuff can be done purely diagrammatically.
We introduce the Scalable ZX-calculus (SZX-calculus for short), a formal and compact graphical language for the design and verification of quantum computations. The SZX-calculus is an extension of the ZX-calculus, a powerful framework that captures graphically the fundamental properties of quantum mechanics through its complete set of rewrite rules. The ZX-calculus is, however, a low level language, with each wire representing a single qubit. This limits its ability to handle large and elaborate quantum evolutions. We extend the ZX-calculus to registers of qubits and allow compact representation of sub-diagrams via binary matrices. We show soundness and completeness of the SZX-calculus and provide two examples of applications, for graph states and error correcting codes.
ZX-calculus is a graphical language for quantum computing which is complete in the sense that calculation in matrices can be done in a purely diagrammatic way. However, all previous universally complete axiomatisations of ZX-calculus have included at least one rule involving trigonometric functions such as sin and cos which makes it difficult for application purpose. In this paper we give an algebraic complete axiomatisation of ZX-calculus instead such that there are only ring operations involved for phases. With this algebraic axiomatisation of ZX-calculus, we are able to establish for the first time a simple translation of diagrams from another graphical language called ZH-calculus and to derive all the ZX-translated rules of ZH-calculus. As a consequence, we have a great benefit that all techniques obtained in ZH-calculus can be transplanted to ZX-calculus, which can't be obtained by just using the completeness of ZX-calculus.
We introduce Graphical Algebraic Geometry (GAG), a family of diagrammatic languages extending the Graphical Linear Algebra programme. We construct several languages within this family and prove that they are universal and complete for the corresponding (co)span semantics of commutative algebras and affine varieties. This framework provides clear graphical representations of algebraic structures -- such as polynomials, ideals, and varieties -- enabling intuitive yet rigorous diagrammatic reasoning. We showcase two practical viewpoints on GAG. First, we show that instances of counting constraint satisfaction problem (#CSP) are recast as rewrite problems of closed diagrams in GAG. This means that deciding rewritability in GAG is #P-hard, and GAG can be viewed as a complete and compositional rewrite system for networks of polynomial constraints. Second, we characterize the qudit ZH calculus, a diagrammatic language for quantum computation, as an extension of Graphical Algebraic Geometry. This establishes the correspondence that Graphical Algebraic Geometry is to the ZH calculus what Graphical Linear Algebra is to the ZX calculus. Using this construction, we show that computing amplitudes in qudit ZH requires only a constant number of queries to a GAG oracle.