PyZX: Large Scale Automated Diagrammatic Reasoning

The ZX-calculus is a graphical language for reasoning about ZX-diagrams, a type of tensor networks that can represent arbitrary linear maps between qubits. Using the ZX-calculus, we can intuitively reason about quantum theory, and optimise and validate quantum circuits. In this paper we introduce PyZX, an open source library for automated reasoning with large ZX-diagrams. We give a brief introduction to the ZX-calculus, then show how PyZX implements methods for circuit optimisation, equality validation, and visualisation and how it can be used in tandem with other software. We end with a set of challenges that when solved would enhance the utility of automated diagrammatic reasoning.

[1]  Aleks Kissinger,et al.  Quantomatic: A proof assistant for diagrammatic reasoning , 2015, CADE.

[2]  Aleks Kissinger,et al.  Reducing the number of non-Clifford gates in quantum circuits , 2020, Physical Review A.

[3]  A. Kissinger,et al.  Universal MBQC with generalised parity-phase interactions and Pauli measurements , 2017, Quantum.

[4]  Bob Coecke,et al.  Interacting quantum observables: categorical algebra and diagrammatics , 2009, ArXiv.

[5]  Aleks Kissinger,et al.  Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus , 2019, Quantum.

[6]  Aleks Kissinger,et al.  Reducing T-count with the ZX-calculus , 2019, 1903.10477.

[7]  Igor L. Markov,et al.  Simulating Quantum Computation by Contracting Tensor Networks , 2008, SIAM J. Comput..

[8]  Simon Perdrix,et al.  Rewriting Measurement-Based Quantum Computations with Generalised Flow , 2010, ICALP.

[9]  Amar Hadzihasanovic,et al.  The algebra of entanglement and the geometry of composition , 2017, ArXiv.

[10]  Andrew W. Cross,et al.  Open Quantum Assembly Language , 2017, 1707.03429.

[11]  Giovanni de Felice,et al.  A diagrammatic calculus of fermionic quantum circuits , 2019, Log. Methods Comput. Sci..

[12]  Aleks Kissinger,et al.  The Compositional Structure of Multipartite Quantum Entanglement , 2010, ICALP.

[13]  Simon Perdrix,et al.  A Complete Axiomatisation of the ZX-Calculus for Clifford+T Quantum Mechanics , 2017, LICS.

[14]  Quanlong Wang,et al.  Two complete axiomatisations of pure-state qubit quantum computing , 2018, LICS.

[15]  Miriam Backens,et al.  Making the stabilizer ZX-calculus complete for scalars , 2015, 1507.03854.

[16]  Earl T. Campbell,et al.  An efficient quantum compiler that reduces T count , 2017, Quantum Science and Technology.

[17]  Giovanni de Felice,et al.  A diagrammatic axiomatisation of fermionic quantum circuits , 2018, FSCD.

[18]  Aleks Kissinger,et al.  Pattern Graph Rewrite Systems , 2012, DCM.

[19]  A. Kissinger,et al.  ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity , 2018, QPL.

[20]  Yaoyun Shi,et al.  Classical Simulation of Intermediate-Size Quantum Circuits , 2018, 1805.01450.

[21]  Dmitri Maslov,et al.  Automated optimization of large quantum circuits with continuous parameters , 2017, npj Quantum Information.

[22]  Dominic Horsman,et al.  The ZX calculus is a language for surface code lattice surgery , 2017, Quantum.

[23]  Ross Duncan,et al.  Optimising Clifford Circuits with Quantomatic , 2019, QPL.

[24]  Renaud Vilmart,et al.  A Near-Minimal Axiomatisation of ZX-Calculus for Pure Qubit Quantum Mechanics , 2019, 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[25]  Bob Coecke,et al.  Interacting Quantum Observables , 2008, ICALP.

[26]  Aleks Kissinger,et al.  Picturing Quantum Processes , 2017 .