skip to main content
10.1145/3582016.3582030acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

CaQR: A Compiler-Assisted Approach for Qubit Reuse through Dynamic Circuit

Published:25 March 2023Publication History

ABSTRACT

Quantum measurement is important to quantum computing as it extracts out the outcome of the circuit at the end of the computation. Previously, all measurements have to be done at the end of the circuit. Otherwise, it will incur significant errors. But it is not the case now. Recently IBM starts supporting dynamic circuit through hardware (instead of software by simulator). With mid-circuit hardware measurement, we can improve circuit efficacy and fidelity from three aspects: (a) reduced qubit usage, (b) reduced swap insertion, and (c) improved fidelity. We demonstrate this using real-world applications Bernstein Verizani on real hardware and show that circuit resource usage can be improved by 60%, and circuit fidelity can be improved by 15%. We design a compiler-assisted tool that can find and exploit the tradeoff between qubit reuse, fidelity, gate count, and circuit duration. We also developed a method for identifying whether qubit reuse will be beneficial for a given application. We evaluated our method on a representative set of important applications. We can reduce resource usage by up to 80% and improve circuit fidelity by up to 20%.

References

  1. Mahabubul Alam, Abdullah Ash-Saki, and Swaroop Ghosh. 2020. Circuit Compilation Methodologies for Quantum Approximate Optimization Algorithm. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO). 215–228. https://doi.org/10.1109/MICRO50266.2020.00029 Google ScholarGoogle ScholarCross RefCross Ref
  2. Christopher Chamberland, Guanyu Zhu, Theodore J Yoder, Jared B Hertzberg, and Andrew W Cross. 2020. Topological and Subsystem Codes on Low-Degree Graphs with Flag Qubits. Phys. Rev. X, 10, 1 (2020), jan, 11022. https://doi.org/10.1103/PhysRevX.10.011022 Google ScholarGoogle ScholarCross RefCross Ref
  3. A. D. Córcoles, Maika Takita, Ken Inoue, Scott Lekuch, Zlatko K. Minev, Jerry M. Chow, and Jay M. Gambetta. 2021. Exploiting Dynamic Quantum Circuits in a Quantum Algorithm with Superconducting Qubits. Phys. Rev. Lett., 127 (2021), Aug, 100501. https://doi.org/10.1103/PhysRevLett.127.100501 Google ScholarGoogle ScholarCross RefCross Ref
  4. Andrew Cross, Ali Javadi-Abhari, Thomas Alexander, Niel De Beaudrap, Lev S Bishop, Steven Heidel, Colm A Ryan, Prasahnt Sivarajah, John Smolin, and Jay M Gambetta. 2022. OpenQASM 3: A broader and deeper quantum assembly language. ACM Transactions on Quantum Computing, 3, 3 (2022), 1–50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Yongshan Ding, Xin-Chuan Wu, Adam Holmes, Ash Wiseth, Diana Franklin, Margaret Martonosi, and Frederic T. Chong. 2020. SQUARE: Strategic Quantum Ancilla Reuse for Modular Quantum Programs via Cost-Effective Uncomputation. In 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA). IEEE. https://doi.org/10.1109/isca45697.2020.00054 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. 2014. A Quantum Approximate Optimization Algorithm. arxiv:1411.4028. Google ScholarGoogle Scholar
  7. E. Farhi, J. Goldstone, S. Gutmann, and H. Neven. 2017. Quantum Algorithms for Fixed Qubit Architectures. arxiv:1703.06199. Google ScholarGoogle Scholar
  8. Edward Farhi, Jeffrey Goldstone, Sam Gutmann, and Leo Zhou. 2021. The Quantum Approximate Optimization Algorithm and the Sherrington-Kirkpatrick Model at Infinite Size. arxiv:1910.08187. Google ScholarGoogle Scholar
  9. L. C. G. Govia, P. Jurcevic, S. T. Merkel, and D. C. McKay. 2022. A randomized benchmarking suite for mid-circuit measurements. https://doi.org/10.48550/ARXIV.2207.04836 Google ScholarGoogle Scholar
  10. Lov K Grover. 1996. A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing. 212–219. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. IBM. 2022. Introduction to Dynamic Circuits. https://quantum-computing.ibm.com/lab/docs/iql/manage/systems/dynamic-circuits/02-Introduction-To-Dynamic-Circuits Google ScholarGoogle Scholar
  12. Abhinav Kandala, Antonio Mezzacapo, Kristan Temme, Maika Takita, Markus Brink, Jerry M Chow, and Jay M Gambetta. 2017. Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature, 549, 7671 (2017), 242–246. Google ScholarGoogle Scholar
  13. Lingling Lao and Dan E. Browne. 2022. 2QAN: A Quantum Compiler for 2-Local Qubit Hamiltonian Simulation Algorithms. In Proceedings of the 49th Annual International Symposium on Computer Architecture (ISCA ’22). Association for Computing Machinery, New York, NY, USA. 351–365. isbn:9781450386104 https://doi.org/10.1145/3470496.3527394 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ang Li, Samuel Stein, Sriram Krishnamoorthy, and James Ang. 2021. QASMBench: A Low-level QASM Benchmark Suite for NISQ Evaluation and Simulation. arXiv preprint arXiv:2005.13018. Google ScholarGoogle Scholar
  15. Gushu Li, Yufei Ding, and Yuan Xie. 2019. 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. 1001–1014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Gushu Li, Anbang Wu, Yunong Shi, Ali Javadi-Abhari, Yufei Ding, and Yuan Xie. 2022. Paulihedral: A Generalized Block-Wise Compiler Optimization Framework for Quantum Simulation Kernels. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2022). Association for Computing Machinery, New York, NY, USA. 554–569. isbn:9781450392051 https://doi.org/10.1145/3503222.3507715 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Prakash Murali, Jonathan M. Baker, Ali Javadi-Abhari, Frederic T. Chong, and Margaret Martonosi. 2019. Noise-Adaptive Compiler Mappings for Noisy Intermediate-Scale Quantum Computers. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’19). ACM, New York, NY, USA. 1015–1029. isbn:978-1-4503-6240-5 https://doi.org/10.1145/3297858.3304075 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Adam Paetznick and Krysta M. Svore. 2013. Repeat-Until-Success: Non-deterministic decomposition of single-qubit unitaries. https://doi.org/10.48550/ARXIV.1311.1074 Google ScholarGoogle Scholar
  19. Alexandru Paler, Robert Wille, and Simon J. Devitt. 2016. Wire recycling for quantum circuit optimization. Physical Review A, 94, 4 (2016), oct, https://doi.org/10.1103/physreva.94.042337 Google ScholarGoogle ScholarCross RefCross Ref
  20. Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, and Jeremy L. O’Brien. 2014. A variational eigenvalue solver on a photonic quantum processor. Nature Communications, 5, 1 (2014), jul, https://doi.org/10.1038/ncomms5213 Google ScholarGoogle ScholarCross RefCross Ref
  21. Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J Love, Alán Aspuru-Guzik, and Jeremy L O’brien. 2014. A variational eigenvalue solver on a photonic quantum processor. Nature communications, 5 (2014), 4213. Google ScholarGoogle Scholar
  22. Alireza Shafaei, Mehdi Saeedi, and Massoud Pedram. 2014. Qubit placement to minimize communication overhead in 2D quantum architectures. In 2014 19th Asia and South Pacific Design Automation Conference (ASP-DAC). 495–500. Google ScholarGoogle ScholarCross RefCross Ref
  23. Peter W Shor. 1999. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM review, 41, 2 (1999), 303–332. Google ScholarGoogle Scholar
  24. Marcos Yukio Siraichi, Vinícius Fernandes dos Santos, Caroline Collange, and Fernando Magno Quintão Pereira. 2019. Qubit Allocation as a Combination of Subgraph Isomorphism and Token Swapping. Proc. ACM Program. Lang., 3, OOPSLA (2019), Article 120, Oct., 29 pages. https://doi.org/10.1145/3360546 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Marcos Yukio Siraichi, Vinícius Fernandes dos Santos, Sylvain Collange, and Fernando Magno Quintão Pereira. 2018. Qubit allocation. In Proceedings of the 2018 International Symposium on Code Generation and Optimization. 113–125. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Bochen Tan and Jason Cong. 2020. Optimal Layout Synthesis for Quantum Computing. In Proceedings of the 39th International Conference on Computer-Aided Design (ICCAD ’20). Association for Computing Machinery, New York, NY, USA. Article 137, 9 pages. isbn:9781450380263 https://doi.org/10.1145/3400302.3415620 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Wei Tang, Teague Tomesh, Martin Suchara, Jeffrey Larson, and Margaret Martonosi. 2021. CutQC: Using Small Quantum Computers for Large Quantum Circuit Evaluations. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’21). Association for Computing Machinery, New York, NY, USA. 473–486. isbn:9781450383172 https://doi.org/10.1145/3445814.3446758 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Swamit S Tannu and Moinuddin K Qureshi. 2019. Mitigating Measurement Errors in Quantum Computers by Exploiting State-Dependent Bias. In Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO ’52). Association for Computing Machinery, New York, NY, USA. 279–290. isbn:9781450369381 https://doi.org/10.1145/3352460.3358265 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Swamit S. Tannu and Moinuddin K. Qureshi. 2019. Not All Qubits Are Created Equal: A Case for Variability-Aware Policies for NISQ-Era Quantum Computers. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’19). ACM, New York, NY, USA. 987–999. isbn:978-1-4503-6240-5 https://doi.org/10.1145/3297858.3304007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Robert Wille, Lukas Burgholzer, and Alwin Zulehner. 2019. Mapping quantum circuits to IBM QX architectures using the minimal number of SWAP and H operations. In Proceedings of the 56th Annual Design Automation Conference 2019. 142. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Chi Zhang, Ari B. Hayes, Longfei Qiu, Yuwei Jin, Yanhao Chen, and Eddy Z. Zhang. 2021. Time-Optimal Qubit Mapping. ASPLOS 2021. Association for Computing Machinery, New York, NY, USA. 360–374. isbn:9781450383172 https://doi.org/10.1145/3445814.3446706 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Alwin Zulehner, Stefan Gasser, and Robert Wille. 2017. Exact Global Reordering for Nearest Neighbor Quantum Circuits Using A*. In International Conference on Reversible Computation. 185–201. Google ScholarGoogle ScholarCross RefCross Ref
  33. Alwin Zulehner, Alexandru Paler, and Robert Wille. 2018. Efficient mapping of quantum circuits to the IBM QX architectures. In 2018 Design, Automation & Test in Europe Conference & Exhibition (DATE). 1135–1138. Google ScholarGoogle Scholar

Index Terms

  1. CaQR: A Compiler-Assisted Approach for Qubit Reuse through Dynamic Circuit

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ASPLOS 2023: Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3
      March 2023
      820 pages
      ISBN:9781450399180
      DOI:10.1145/3582016

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 25 March 2023

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate535of2,713submissions,20%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader