Reinforcement Learning Based Quantum Circuit Optimization via ZX-Calculus
arXiv:2312.11597 · doi:10.22331/q-2025-05-28-1758
Abstract
We propose a novel Reinforcement Learning (RL) method for optimizing quantum circuits using graph-theoretic simplification rules of ZX-diagrams. The agent, trained using the Proximal Policy Optimization (PPO) algorithm, employs Graph Neural Networks to approximate the policy and value functions. We demonstrate the capacity of our approach by comparing it against the best performing ZX-Calculus-based algorithm for the problem in hand. After training on small Clifford+T circuits of 5-qubits and few tenths of gates, the agent consistently improves the state-of-the-art for this type of circuits, for at least up to 80-qubit and 2100 gates, whilst remaining competitive in terms of computational performance. Additionally, we illustrate the versatility of the agent by incorporating additional optimization routines on the workflow during training, improving the two-qubit gate count state-of-the-art on multiple structured quantum circuits for relevant applications of much larger dimension and different gate distributions than the circuits the agent trains on. This conveys the potential of tailoring the reward function to the specific characteristics of each application and hardware backend. Our approach is a valuable tool for the implementation of quantum algorithms in the near-term intermediate-scale range (NISQ).
22 pages, 11 figures, 2 tables
References in corpus (19)
- A Comprehensive Survey on Graph Neural Networks
- Quantum Computing in the NISQ era and beyond
- Improved Simulation of Stabilizer Circuits
- Interacting Quantum Observables: Categorical Algebra and Diagrammatics
- Graph Matching Networks for Learning the Similarity of Graph Structured Objects
- Automated optimization of large quantum circuits with continuous parameters
- Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus
- Reducing T-count with the ZX-calculus
- Determinism in the one-way model
- Generalized Flow and Determinism in Measurement-based Quantum Computation
- PyZX: Large Scale Automated Diagrammatic Reasoning
- Quantum circuit optimizations for NISQ architectures
- The one-way quantum computer -- a non-network model of quantum computation
- There and back again: A circuit extraction tale
- Finding Optimal Flows Efficiently
- Optimization of Clifford Circuits
- Reducing 2-QuBit Gate Count for ZX-Calculus based Quantum Circuit Optimization
- Circuit Extraction for ZX-diagrams can be #P-hard
- Optimizing ZX-Diagrams with Deep Reinforcement Learning