skip to main content
research-article
Open Access

Assertion-based optimization of Quantum programs

Published:13 November 2020Publication History
Skip Abstract Section

Abstract

Quantum computers promise to perform certain computations exponentially faster than any classical device. Precise control over their physical implementation and proper shielding from unwanted interactions with the environment become more difficult as the space/time volume of the computation grows. Code optimization is thus crucial in order to reduce resource requirements to the greatest extent possible. Besides manual optimization, previous work has adapted classical methods such as constant-folding and common subexpression elimination to the quantum domain. However, such classically-inspired methods fail to exploit certain optimization opportunities across subroutine boundaries, limiting the effectiveness of software reuse. To address this insufficiency, we introduce an optimization methodology which employs annotations that describe how subsystems are entangled in order to exploit these optimization opportunities. We formalize our approach, prove its correctness, and present benchmarks: Without any prior manual optimization, our methodology is able to reduce, e.g., the qubit requirements of a 64-bit floating-point subroutine by 34×.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This is the OOPSLA 2020 talk on Assertion-Based Optimization of Quantum Programs by Thomas Häner, Torsten Hoefler, and Matthias Troyer.

References

  1. M. Amy, D. Maslov, and M. Mosca. 2014. Polynomial-Time T-Depth Optimization of Cliford+T Circuits Via Matroid Partitioning. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 33, 10 (Oct 2014 ), 1476-1489. https://doi.org/10.1109/TCAD. 2014.2341953 Google ScholarGoogle ScholarCross RefCross Ref
  2. Matthew Amy, Dmitri Maslov, Michele Mosca, and Martin Roetteler. 2013. A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 32, 6 ( 2013 ), 818-830. https://doi.org/10.1109/TCAD. 2013.2244643 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Ryan Babbush, Dominic W Berry, Ian D Kivlichan, Annie Y Wei, Peter J Love, and Alán Aspuru-Guzik. 2016. Exponentially more precise quantum simulation of fermions in second quantization. New Journal of Physics 18, 3 ( 2016 ), 033032. https://doi.org/10.1088/ 1367-2630/18/3/033032 Google ScholarGoogle ScholarCross RefCross Ref
  4. Yunseong Nam, Neil J Ross, Yuan Su, Andrew M Childs, and Dmitri Maslov. 2018. Automated optimization of large quantum circuits with continuous parameters. npj Quantum Information 4, 1 ( 2018 ), 23. https://doi.org/10.1038/s41534-018-0072-4 Google ScholarGoogle ScholarCross RefCross Ref
  5. Michael A Nielsen and Isaac Chuang. 2010. Quantum computation and quantum information.Google ScholarGoogle Scholar
  6. Jennifer Paykin, Robert Rand, and Steve Zdancewic. 2017. QWIRE: a core language for quantum circuits. ACM SIGPLAN Notices 52, 1 ( 2017 ), 846-858. https://doi.org/10.1145/3093333.3009894 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Markus Reiher, Nathan Wiebe, Krysta M. Svore, Dave Wecker, and Matthias Troyer. 2017. Elucidating reaction mechanisms on quantum computers. Proceedings of the National Academy of Sciences 114, 29 ( 2017 ), 7555-7560. https://doi.org/10. 1073/pnas.1619152114 arXiv:https://www.pnas.org/content/114/29/7555.full.pdf Google ScholarGoogle ScholarCross RefCross Ref
  8. Peter W Shor. 1994. Algorithms for quantum computation: Discrete logarithms and factoring. In Foundations of Computer Science, 1994 Proceedings., 35th Annual Symposium on. IEEE, 124-134. https://doi.org/10.1109/SFCS. 1994.365700 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Robert S. Smith, Michael J. Curtis, and William J. Zeng. 2016. A Practical Quantum Instruction Set Architecture. arXiv preprint arXiv:1608.03355 ( 2016 ).Google ScholarGoogle Scholar
  10. Damian S. Steiger, Thomas Häner, and Matthias Troyer. 2018. ProjectQ: an open source software framework for quantum computing. Quantum 2 ( 2018 ), 49. https://doi.org/10.22331/q-2018-01-31-49 Google ScholarGoogle ScholarCross RefCross Ref
  11. Krysta Svore, Alan Geller, Matthias Troyer, John Azariah, Christopher Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, Andres Paz, and Martin Roetteler. 2018. Q#: Enabling Scalable Quantum Computing and Development with a High-level DSL. In Proceedings of the Real World Domain Specific Languages Workshop 2018 (Vienna, Austria) ( RWDSL2018 ). ACM, New York, NY, USA, Article 7, 10 pages. https://doi.org/10.1145/3183895.3183901 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Yasuhiro Takahashi, Seiichiro Tani, and Noboru Kunihiro. 2010. Quantum Addition Circuits and Unbounded Fan-out. Quantum Info. Comput. 10, 9 (Sept. 2010 ), 872-890. http://dl.acm.org/citation.cfm?id= 2011464. 2011476Google ScholarGoogle Scholar
  13. Mingsheng Ying. 2012. Floyd-hoare Logic for Quantum Programs. ACM Trans. Program. Lang. Syst. 33, 6, Article 19 ( Jan. 2012 ), 49 pages. https://doi.org/10.1145/2049706.2049708 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Assertion-based optimization of Quantum programs

      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

      Full Access

      • Published in

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 4, Issue OOPSLA
        November 2020
        3108 pages
        EISSN:2475-1421
        DOI:10.1145/3436718
        Issue’s Table of Contents

        Copyright © 2020 Owner/Author

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 November 2020
        Published in pacmpl Volume 4, Issue OOPSLA

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!