Document Open Access Logo

Constraint Programming Models for Depth-Optimal Qubit Assignment and SWAP-Based Routing (Short Paper)

Author Kyle E. C. Booth

Thumbnail PDF


  • Filesize: 0.56 MB
  • 10 pages

Document Identifiers

Author Details

Kyle E. C. Booth
  • Amazon Quantum Solutions Lab, Seattle, WA, USA

Cite AsGet BibTex

Kyle E. C. Booth. Constraint Programming Models for Depth-Optimal Qubit Assignment and SWAP-Based Routing (Short Paper). In 29th International Conference on Principles and Practice of Constraint Programming (CP 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 280, pp. 43:1-43:10, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


Due to the limited connectivity of gate model quantum devices, logical quantum circuits must be compiled to target hardware before they can be executed. Often, this process involves the insertion of SWAP gates into the logical circuit, usually increasing the depth of the circuit, achieved by solving a so-called qubit assignment and routing problem. Recently, a number of integer linear programming (ILP) models have been proposed for solving the qubit assignment and routing problem to proven optimality. These models encode the objective function and constraints of the problem, and leverage the use of automated solver technology to find hardware-compliant quantum circuits. In this work, we propose constraint programming (CP) models for this problem and compare their performance against ILP for circuit depth minimization for both linear and two-dimensional grid lattice device topologies on a set of randomly generated instances. Our empirical analysis indicates that the proposed CP approaches outperform the ILP models both in terms of solution quality and runtime.

Subject Classification

ACM Subject Classification
  • Computing methodologies → Planning and scheduling
  • Theory of computation → Constraint and logic programming
  • Qubit routing
  • quantum computing
  • constraint programming
  • combinatorial optimization


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Tobias Achterberg. SCIP: solving constraint integer programs. Mathematical Programming Computation, 1(1):1-41, 2009. Google Scholar
  2. Aniruddha Bapat, Andrew M Childs, Alexey V Gorshkov, Samuel King, Eddie Schoute, and Hrishee Shastri. Quantum routing with fast reversals. Quantum, 5:533, 2021. Google Scholar
  3. Maurizio Boccia, Adriano Masone, Antonio Sforza, and Claudio Sterle. SWAP minimization in nearest neighbour quantum circuits: An ILP formulation. In Advances in Optimization and Decision Science for Society, Services and Enterprises, pages 255-265. Springer, 2019. Google Scholar
  4. Kyle E. C. Booth, Minh Do, J Beck, Eleanor Rieffel, Davide Venturelli, and Jeremy Frank. Comparing and integrating constraint programming and temporal planning for quantum circuit compilation. In Proceedings of the International Conference on Automated Planning and Scheduling, volume 28, pages 366-374, 2018. Google Scholar
  5. Adi Botea, Akihiro Kishimoto, and Radu Marinescu. On the complexity of quantum circuit compilation. In Proceedings of the International Symposium on Combinatorial Search, volume 9, pages 138-142, 2018. Google Scholar
  6. Alexander Cowtan, Silas Dilkes, Ross Duncan, Alexandre Krajenbrink, Will Simmons, and Seyon Sivarajah. On the qubit routing problem. arXiv preprint arXiv:1902.08091, 2019. Google Scholar
  7. Petar Jurcevic, Ali Javadi-Abhari, Lev S Bishop, Isaac Lauer, Daniela F Bogorin, Markus Brink, Lauren Capelluto, Oktay Günlük, Toshinari Itoko, Naoki Kanazawa, et al. Demonstration of quantum volume 64 on a superconducting quantum computing system. Quantum Science and Technology, 6(2):025020, 2021. Google Scholar
  8. Gushu Li, Yufei Ding, and Yuan Xie. Tackling the qubit mapping problem for NISQ-era quantum devices. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, pages 1001-1014, 2019. Google Scholar
  9. Jesse Mulderij, Karen I Aardal, Irina Chiscop, and Frank Phillipson. A polynomial size model with implicit SWAP gate counting for exact qubit reordering. arXiv preprint arXiv:2009.08748, 2020. Google Scholar
  10. Giacomo Nannicini, Lev S Bishop, Oktay Günlük, and Petar Jurcevic. Optimal qubit assignment and routing via integer programming. ACM Transactions on Quantum Computing, 2021. Google Scholar
  11. Laurent Perron. Operations research and constraint programming at Google. In Principles and Practice of Constraint Programming-CP 2011: 17th International Conference, CP 2011, Perugia, Italy, September 12-16, 2011. Proceedings 17, pages 2-2. Springer, 2011. Google Scholar
  12. Eleanor G Rieffel and Wolfgang H Polak. Quantum computing: A gentle introduction. MIT Press, 2011. Google Scholar
  13. Willem-Jan Van Hoeve. The AllDifferent constraint: A survey. arXiv preprint cs/0105015, 2001. Google Scholar
  14. Davide Venturelli, Minh Do, Eleanor Rieffel, and Jeremy Frank. Compiling quantum circuits to realistic hardware architectures using temporal planners. Quantum Science and Technology, 3(2):025004, 2018. Google Scholar
  15. Alwin Zulehner, Alexandru Paler, and Robert Wille. An efficient methodology for mapping quantum circuits to the IBM QX architectures. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 38(7):1226-1236, 2018. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail