CNOT Minimal Circuit Synthesis: A Reinforcement Learning Approach
Riccardo Romanello, Daniele Lizzio Bosco, Jacopo Cossio, Dusan Sutulovic, Giuseppe Serra, Carla Piazza, Paolo Burelli
TL;DR
This work tackles CNOT minimization in gate-based quantum computing by reformulating it as a planning problem over $n\times n$ binary invertible matrices and proposing a reinforcement-learning solution. A PPO2 agent is trained on a fixed size $m=8$ and generalized to sizes up to $n=15$ using embedding and Gaussian-striping preprocessing, enabling scalable handling of larger instances. Empirical results show the RL approach outperforms the state-of-the-art Patel-Markov-Hayes (PMH) algorithm for larger $n$, with gains growing in harder settings, and ablation confirms the benefit of the preprocessing strategy. The study advances scalable quantum circuit synthesis by combining fixed-size RL with principled matrix-manipulation preprocessors, potentially impacting stabilizer circuits and error-corrected quantum computation.
Abstract
CNOT gates are fundamental to quantum computing, as they facilitate entanglement, a crucial resource for quantum algorithms. Certain classes of quantum circuits are constructed exclusively from CNOT gates. Given their widespread use, it is imperative to minimise the number of CNOT gates employed. This problem, known as CNOT minimisation, remains an open challenge, with its computational complexity yet to be fully characterised. In this work, we introduce a novel reinforcement learning approach to address this task. Instead of training multiple reinforcement learning agents for different circuit sizes, we use a single agent up to a fixed size $m$. Matrices of sizes different from m are preprocessed using either embedding or Gaussian striping. To assess the efficacy of our approach, we trained an agent with m = 8, and evaluated it on matrices of size n that range from 3 to 15. The results we obtained show that our method overperforms the state-of-the-art algorithm as the value of n increases.
