Practical and efficient quantum circuit synthesis and transpiling with Reinforcement Learning
David Kremer, Victor Villar, Hanhee Paik, Ivan Duran, Ismael Faro, Juan Cruz-Benito
TL;DR
This work introduces a reinforcement learning framework to enhance quantum circuit synthesis and routing within transpilation workflows. By formulating synthesis as a sequential decision process and routing as a learned heuristic problem, the approach achieves near-optimal results for Linear Function, Clifford, and Permutation circuits up to $9$, $11$, and $65$ qubits, while significantly reducing two-qubit gate depth and count during routing for circuits up to $133$ qubits. The training employs curriculum learning with PPO, and inference supports greedy, sampling, and top-k/top-p strategies, enabling practical deployment without labeled datasets. Across benchmarks, RL outperforms traditional optimization (SAT) in runtime and matches or exceeds heuristic baselines (SABRE/TokenSwapper) in circuit quality, indicating strong potential for integration into AI-powered transpiler services such as Qiskit Transpiler. The results establish a foundation for scalable, device-aware AI-assisted quantum compilation and point to future directions like generic topology models and dynamic circuit synthesis.
Abstract
This paper demonstrates the integration of Reinforcement Learning (RL) into quantum transpiling workflows, significantly enhancing the synthesis and routing of quantum circuits. By employing RL, we achieve near-optimal synthesis of Linear Function, Clifford, and Permutation circuits, up to 9, 11 and 65 qubits respectively, while being compatible with native device instruction sets and connectivity constraints, and orders of magnitude faster than optimization methods such as SAT solvers. We also achieve significant reductions in two-qubit gate depth and count for circuit routing up to 133 qubits with respect to other routing heuristics such as SABRE. We find the method to be efficient enough to be useful in practice in typical quantum transpiling pipelines. Our results set the stage for further AI-powered enhancements of quantum computing workflows.
