# Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus

arXiv: https://arxiv.org/abs/1902.03178 · HTML: https://mlsanity.com/paper/1902.03178/

## Key facts

- Cited by 20 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 8 Feb 2019.

## Built on by (most cited first, 20 of 20)

- [Noisy intermediate-scale quantum (NISQ) algorithms](https://mlsanity.com/paper/2101.08448/) (2021)
- [Analyzing the barren plateau phenomenon in training quantum neural networks with the ZX-calculus](https://mlsanity.com/paper/2102.01828/) (2021)
- [Compositionality as we see it, everywhere around us](https://mlsanity.com/paper/2110.05327/) (2021)
- [Quantum Circuit Synthesis and Compilation Optimization: Overview and Prospects](https://mlsanity.com/paper/2407.00736/) (2024)
- [Optimizing ZX-Diagrams with Deep Reinforcement Learning](https://mlsanity.com/paper/2311.18588/) (2023)
- [Diagrammatic Differentiation for Quantum Machine Learning](https://mlsanity.com/paper/2103.07960/) (2021)
- [How to make qubits speak](https://mlsanity.com/paper/2107.06776/) (2021)
- [Kindergarden quantum mechanics graduates (...or how I learned to stop gluing LEGO together and love the ZX-calculus)](https://mlsanity.com/paper/2102.10984/) (2021)
- [Solving Quantum-Inspired Perfect Matching Problems via Tutte's Theorem-Based Hybrid Boolean Constraints](https://mlsanity.com/paper/2301.09833/) (2023)
- [AltGraph: Redesigning Quantum Circuits Using Generative Graph Models for Efficient Optimization](https://mlsanity.com/paper/2403.12979/) (2024)
- [Evaluating the Potential of Quantum Machine Learning in Cybersecurity: A Case-Study on PCA-based Intrusion Detection Systems](https://mlsanity.com/paper/2502.11173/) (2025)
- [Optimizing Quantum Circuits via ZX Diagrams using Reinforcement Learning and Graph Neural Networks](https://mlsanity.com/paper/2504.03429/) (2025)
- [Equivariant Reinforcement Learning for Clifford Quantum Circuit Synthesis](https://mlsanity.com/paper/2605.10910/) (2026)
- [Differentiating and Integrating ZX Diagrams with Applications to Quantum Machine Learning](https://mlsanity.com/paper/2201.13250/) (2022)
- [Quantum Models with Multi-Stage Training for Compositional Concept Generalization](https://mlsanity.com/paper/2608.15601/) (2026)
- [Representing and Implementing Matrices Using Algebraic ZX-calculus](https://mlsanity.com/paper/2110.06898/) (2021)
- [Compilation of product-formula Hamiltonian simulation via reinforcement learning](https://mlsanity.com/paper/2311.04285/) (2023)
- [Virtual Reality for Understanding Artificial-Intelligence-driven Scientific Discovery with an Application in Quantum Optics](https://mlsanity.com/paper/2403.00834/) (2024)
- [Tackling Decision Processes with Non-Cumulative Objectives using Reinforcement Learning](https://mlsanity.com/paper/2405.13609/) (2024)
- [One-Shot Structured Pruning of Quantum Neural Networks via q-Group Engineering and Quantum Geometric Metrics](https://mlsanity.com/paper/2512.24019/) (2025)

## Abstract (arXiv)

We present a completely new approach to quantum circuit optimisation, based on the ZX-calculus. We first interpret quantum circuits as ZX-diagrams, which provide a flexible, lower-level language for describing quantum computations graphically. Then, using the rules of the ZX-calculus, we give a simplification strategy for ZX-diagrams based on the two graph transformations of local complementation and pivoting and show that the resulting reduced diagram can be transformed back into a quantum circuit. While little is known about extracting circuits from arbitrary ZX-diagrams, we show that the underlying graph of our simplified ZX-diagram always has a graph-theoretic property called generalised flow, which in turn yields a deterministic circuit extraction procedure. For Clifford circuits, this extraction procedure yields a new normal form that is both asymptotically optimal in size and gives a new, smaller upper bound on gate depth for nearest-neighbour architectures. For Clifford+T and more general circuits, our technique enables us to to `see around' gates that obstruct the Clifford structure and produce smaller circuits than naive 'cut-and-resynthesise' methods.
