Reducing T-count with the ZX-calculus

Reducing the number of non-Clifford quantum gates present in a circuit is an important task for efficiently implementing quantum computations, especially in the fault-tolerant regime. We present a new method for reducing the number of T-gates in a quantum circuit based on the ZX-calculus, which matches or beats previous approaches to T-count reduction on the majority of our benchmark circuits in the ancilla-free case, in some cases yielding up to 50% improvement. Our method begins by representing the quantum circuit as a ZX-diagram, a tensor network-like structure that can be transformed and simplified according to the rules of the ZX-calculus. We then show that a recently-proposed simplification strategy can be extended to reduce T-count using a new technique called phase teleportation. This technique allows nonClifford phases to combine and cancel by propagating non-locally through a generic quantum circuit. Phase teleportation does not change the number or location of non-phase gates and the method also applies to arbitrary non-Clifford phase gates as well as gates with unknown phase parameters in parametrised circuits. Furthermore, the simplification strategy we use is powerful enough to validate equality of many circuits. In particular, we use it to show that our optimised circuits are indeed equal to the original ones. We have implemented the routines of this paper in the open-source library PyZX.

[1]  Michele Mosca,et al.  T-Count Optimization and Reed–Muller Codes , 2016, IEEE Transactions on Information Theory.

[2]  B. Terhal,et al.  Roads towards fault-tolerant universal quantum computation , 2016, Nature.

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

[4]  Dmitri Maslov,et al.  Polynomial-Time T-Depth Optimization of Clifford+T Circuits Via Matroid Partitioning , 2013, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

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

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

[7]  Scott Aaronson,et al.  Improved Simulation of Stabilizer Circuits , 2004, ArXiv.

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

[9]  Robert Raussendorf,et al.  Fault-tolerant quantum computation with high threshold in two dimensions. , 2007, Physical review letters.

[10]  Fang Zhang,et al.  Optimizing T gates in Clifford+T circuit as $\pi/4$ rotations around Paulis , 2019, 1903.12456.

[11]  Simon Perdrix,et al.  Diagrammatic Reasoning beyond Clifford+T Quantum Mechanics , 2018, LICS.

[12]  M. Mosca,et al.  A Meet-in-the-Middle Algorithm for Fast Synthesis of Depth-Optimal Quantum Circuits , 2012, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[13]  Austin G. Fowler,et al.  Surface code quantum computing by lattice surgery , 2011, 1111.4022.

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

[15]  Miriam Backens,et al.  The ZX-calculus is complete for stabilizer quantum mechanics , 2013, 1307.7025.

[16]  Michele Mosca,et al.  On the controlled-NOT complexity of controlled-NOT–phase circuits , 2018, Quantum Science and Technology.

[17]  Stefan Zohren,et al.  Graphical structures for design and verification of quantum error correction , 2016, Quantum Science and Technology.

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

[19]  Alán Aspuru-Guzik,et al.  A variational eigenvalue solver on a photonic quantum processor , 2013, Nature Communications.

[20]  Rolf Drechsler,et al.  Quantum Circuit Optimization by Hadamard Gate Reduction , 2014, RC.

[21]  Michele Mosca,et al.  Parallelizing quantum circuit synthesis , 2016, 1606.07413.

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

[23]  Matthew Amy,et al.  Towards Large-scale Functional Verification of Universal Quantum Circuits , 2018, QPL.

[24]  Aleks Kissinger,et al.  Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning , 2017 .

[25]  A. Kissinger,et al.  ZH: A Complete Graphical Calculus for Quantum Computations Involving Classical Non-linearity , 2018, Electronic Proceedings in Theoretical Computer Science.

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