skip to main content
research-article
Open Access

Enabling accuracy-aware Quantum compilers using symbolic resource estimation

Published:13 November 2020Publication History
Skip Abstract Section

Abstract

Approximation errors must be taken into account when compiling quantum programs into a low-level gate set. We present a methodology that tracks such errors automatically and then optimizes accuracy parameters to guarantee a specified overall accuracy while aiming to minimize the implementation cost in terms of quantum gates. The core idea of our approach is to extract functions that specify the optimization problem directly from the high-level description of the quantum program. Then, custom compiler passes optimize these functions, turning them into (near-)symbolic expressions for (1) the total error and (2) the implementation cost (e.g., total quantum gate count). All unspecified parameters of the quantum program will show up as variables in these expressions, including accuracy parameters. After solving the corresponding optimization problem, a circuit can be instantiated from the found solution. We develop two prototype implementations, one in C++ based on Clang/LLVM, and another using the Q# compiler infrastructure. We benchmark our prototypes on typical quantum computing programs, including the quantum Fourier transform, quantum phase estimation, and Shor's algorithm.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This video presents our work on enabling accuracy-aware quantum compilers using symbolic resource estimation. Approximation errors must be taken into account when compiling quantum programs into a low-level gate set. We present a methodology that tracks such errors automatically and then optimizes accuracy parameters to guarantee a specified overall accuracy while aiming to minimize the implementation cost in terms of quantum gates.

References

  1. Gadi Aleksandrowicz and et al. 2019. Qiskit: An Open-source Framework for Quantum Computing. (Jan. 2019 ). https: //doi.org/10.5281/zenodo.2562110 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 (Jun 2013 ), 818-830. https://doi.org/10.1109/tcad. 2013.2244643 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Matthew Amy, Martin Roetteler, and Krysta M. Svore. 2017. Verified Compilation of Space-Eficient Reversible Circuits. In Computer Aided Verification-29th International Conference, CAV. 3-21. https://doi.org/10.1007/978-3-319-63390-9_1 Google ScholarGoogle ScholarCross RefCross Ref
  4. Thanassis Avgerinos, Alexandre Rebert, Sang Kil Cha, and David Brumley. 2014. Enhancing symbolic execution with veritesting. In 36th International Conference on Software Engineering, ICSE ' 14. 1083-1094. https://doi.org/10.1145/2568225. 2568293 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ryan Babbush, Dominic W. Berry, Yuval R. Sanders, Ian D. Kivlichan, Artur Scherer, Annie Y. Wei, Peter J. Love, and Alán Aspuru-Guzik. 2017. Exponentially more precise quantum simulation of fermions in the configuration interaction representation. Quantum Science and Technology 3, 1 ( 2017 ), 015006. https://doi.org/10.1088/2058-9565/aa9463 Google ScholarGoogle ScholarCross RefCross Ref
  6. Earl T. Barr, Thanh Vo, Vu Le, and Zhendong Su. 2013. Automatic detection of floating-point exceptions. ACM SIGPLAN Notices 48, 1, 549-560. https://doi.org/10.1145/2480359.2429133 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stephane Beauregard. 2002. Circuit for Shor's algorithm using 2n+3 qubits. Quantum information & computation 3 ( 06 2002 ).Google ScholarGoogle Scholar
  8. Charles H. Bennett and Gilles Brassard. 2014. Quantum cryptography: Public key distribution and coin tossing. Theoretical Computer Science 560 (dec 2014 ), 7-11. https://doi.org/10.1016/j.tcs. 2014. 05.025 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ethan Bernstein and Umesh Vazirani. 1997. Quantum Complexity Theory. SIAM J. Comput. 26, 5 (oct 1997 ), 1411-1473. https://doi.org/10.1137/s0097539796300921 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Boldo. 2009. Kahan's Algorithm for a Correct Discriminant Computation at Last Formally Proven. IEEE Trans. Comput. 58, 2 ( 2009 ), 220-225. https://doi.org/10.1109/tc. 2008.200 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Sergey Bravyi and Alexei Kitaev. 2005. Universal quantum computation with ideal Cliford gates and noisy ancillas. Physical Review A 71 ( Feb 2005 ), 022316. Issue 2. https://doi.org/10.1103/PhysRevA.71.022316 Google ScholarGoogle ScholarCross RefCross Ref
  12. Earl T. Campbell and Mark Howard. 2017. Unified framework for magic state distillation and multiqubit gate synthesis with reduced resource cost. Physical Review A 95, 2 (Feb 2017 ). https://doi.org/10.1103/physreva.95.022316 Google ScholarGoogle ScholarCross RefCross Ref
  13. John H. Conway and Richard K. Guy. 1996. The Book of Numbers. Springer New York. https://doi.org/10.1007/978-1-4612-4072-3 Google ScholarGoogle ScholarCross RefCross Ref
  14. Don Coppersmith. 2002. An approximate Fourier transform useful in quantum factoring. arXiv:quant-ph/0201067 [quant-ph]Google ScholarGoogle Scholar
  15. Eva Darulova and Viktor Kuncak. 2014. Sound compilation of reals. ACM SIGPLAN Notices 49, 1, 235-248. https: //doi.org/10.1145/2578855.2535874 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Thomas G. Draper. 2000. Addition on a quantum computer. arXiv preprint quant-ph/0008033 ( 2000 ). arXiv:quant-ph/0008033Google ScholarGoogle Scholar
  17. Austin G. Fowler, Matteo Mariantoni, John M. Martinis, and Andrew N. Cleland. 2012. Surface codes: Towards practical large-scale quantum computation. Physical Review A 86, 3 (Sep 2012 ). https://doi.org/10.1103/physreva.86.032324 Google ScholarGoogle ScholarCross RefCross Ref
  18. Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoît Valiron. 2013. Quipper. ACM SIGPLAN Notices 48, 6, 333-342. https://doi.org/10.1145/2499370.2462177 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Thomas Häner, Martin Roetteler, and Krysta M. Svore. 2018. Managing approximation errors in quantum programs. ( 2018 ). arXiv: 1807.02336 [quant-ph]Google ScholarGoogle Scholar
  20. Vojtěch Havlíček, Antonio D. Córcoles, Kristan Temme, Aram W. Harrow, Abhinav Kandala, Jerry M. Chow, and Jay M. Gambetta. 2019. Supervised learning with quantum-enhanced feature spaces. Nature 567, 7747 (Mar 2019 ), 209-212. https://doi.org/10.1038/s41586-019-0980-2 Google ScholarGoogle ScholarCross RefCross Ref
  21. Shih-Han Hung, Kesha Hietala, Shaopeng Zhu, Mingsheng Ying, Michael Hicks, and Xiaodi Wu. 2019. Quantitative robustness analysis of quantum programs. Proceedings of the ACM on Programming Languages 3, POPL ( 2019 ), 31 : 1-31 : 29. https://doi.org/10.1145/3290344 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Ali Javadi-Abhari, Shruti Patil, Daniel Kudrow, Jef Heckey, Alexey Lvov, Frederic Chong, and Margaret Martonosi. 2014. ScafCC: a framework for compilation and analysis of quantum computing programs. Proceedings of the 11th ACM Conference on Computing Frontiers, CF 2014 (05 2014 ). https://doi.org/10.1145/2597917.2597939 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Alexei Kitaev. 1995. Quantum measurements and the Abelian Stabilizer Problem. arXiv preprint arXiv:quant-ph/9511026 ( 1995 ). arXiv:quant-ph/9511026 [quant-ph]Google ScholarGoogle Scholar
  24. Vadym Kliuchnikov, Dmitri Maslov, and Michele Mosca. 2013. Fast and eficient exact synthesis of single qubit unitaries generated by Cliford and gates. Quantum Information & Computation 13 ( June 2013 ), 607-630.Google ScholarGoogle Scholar
  25. E. Knill. 1996. Conventions for quantum pseudocode. Technical Report. https://doi.org/10.2172/366453 Google ScholarGoogle ScholarCross RefCross Ref
  26. Guang Hao Low and Isaac L. Chuang. 2019. Hamiltonian Simulation by Qubitization. Quantum 3 (jul 2019 ), 163. https: //doi.org/10.22331/q-2019-07-12-163 Google ScholarGoogle ScholarCross RefCross Ref
  27. Sam McArdle, Suguru Endo, Alán Aspuru-Guzik, Simon C. Benjamin, and Xiao Yuan. 2020. Quantum computational chemistry. Rev. Mod. Phys. 92 (Mar 2020 ), 015003. Issue 1. https://doi.org/10.1103/RevModPhys.92.015003 Google ScholarGoogle ScholarCross RefCross Ref
  28. Michael A. Nielsen and Isaac L. Chuang. 2000. Quantum Computation and Quantum Information. Cambridge University Press. https://doi.org/10.1017/CBO9780511976667 Google ScholarGoogle ScholarCross RefCross Ref
  29. Adam Paetznick and Krysta M. Svore. 2014. Repeat-until-Success : Non-Deterministic Decomposition of Single-Qubit Unitaries. Quantum Information & Computation 14, 15-16 ( 2014 ), 1277-1301.Google ScholarGoogle ScholarCross RefCross Ref
  30. Pavel Panchekha, Alex Sanchez-Stern, James R. Wilcox, and Zachary Tatlock. 2015. Automatically improving accuracy for lfoating point expressions. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation-PLDI 2015. ACM Press. https://doi.org/10.1145/2737924.2737959 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Jennifer Paykin, Robert Rand, and Steve Zdancewic. 2017. QWIRE: A Core Language for Quantum Circuits. SIGPLAN Not. 52, 1, 846-858. https://doi.org/10.1145/3093333.3009894 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Stefano Pirandola, Ulrik L. Andersen, Leonardo Banchi, Mario Berta, Darius Bunandar, Roger Colbeck, Dirk R. Englund, Tobias Gehring, Cosmo Lupo, Carlo Ottaviani, Jason Pereira, Mohsen Razavi, Jesni S. Shaari, Marco Tomamichel, Vladyslav C. Usenko, Giuseppe Vallone, Paolo Villoresi, and Petros Wallden. 2020. Advances in Quantum Cryptography. Advances in Optics and Photonics ( 2020 ). https://doi.org/10.1364/AOP.361502 Google ScholarGoogle ScholarCross RefCross Ref
  33. David Poulin, Matthew B. Hastings, Dave Wecker, Nathan Wiebe, Andrew C. Doberty, and Matthias Troyer. 2015. The Trotter Step Size Required for Accurate Quantum Simulation of Quantum Chemistry. Quantum Information & Computation 15, 5-6 ( 2015 ), 361-384.Google ScholarGoogle Scholar
  34. 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 Google ScholarGoogle ScholarCross RefCross Ref
  35. Neil J. Ross and Peter Selinger. 2016. Optimal ancilla-free Cliford+ T approximation of z-rotations. Quantum Information & Computation 16, 11 & 12 ( 2016 ), 901-953.Google ScholarGoogle Scholar
  36. Artur Scherer, Benoît Valiron, Siun-Chuon Mau, Scott Alexander, Eric van den Berg, and Thomas E. Chapuran. 2017. Concrete resource analysis of the quantum linear-system algorithm used to compute the electromagnetic scattering cross section of a 2D target. Quantum Information Processing 16, 3 (Jan 2017 ). https://doi.org/10.1007/s11128-016-1495-5 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Peter W. Shor. 1994. Algorithms for quantum computation: discrete logarithms and factoring. In Proceedings 35th Annual Symposium on Foundations of Computer Science. 124-134. https://doi.org/10.1109/SFCS. 1994.365700 Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Jonathan M. Smith, Neil J. Ross, Peter Selinger, and Benoît Valiron. 2014. Quipper: concrete resource estimation in quantum algorithms. arXiv:1412.0625Google ScholarGoogle Scholar
  39. Damian S. Steiger, Thomas Häner, and Matthias Troyer. 2018. ProjectQ: an open source software framework for quantum computing. Quantum 2 ( Jan 2018 ), 49. https://doi.org/10.22331/q-2018-01-31-49 Google ScholarGoogle ScholarCross RefCross Ref
  40. Martin Suchara, John Kubiatowicz, Arvin I. Faruque, Frederic T. Chong, Ching-Yi Lai, and Gerardo Paz. 2013. QuRE: The Quantum Resource Estimator toolbox. In 2013 IEEE 31st International Conference on Computer Design, ICCD 2013. 419-426. https://doi.org/10.1109/ICCD. 2013.6657074 Google ScholarGoogle ScholarCross RefCross Ref
  41. Krysta M. 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 Real World Domain Specific Languages Workshop. 7: 1-7 : 10. https://doi.org/10.1145/3183895.3183901 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. John Watrous. 2009. Semidefinite Programs for Completely Bounded Norms. Theory of Computing 5, 11 ( 2009 ), 217-238. https://doi.org/10.4086/toc. 2009.v005a011 Google ScholarGoogle ScholarCross RefCross Ref
  43. Wolfram Research Inc. 2019. Mathematica, Version 12.0. https://www.wolfram.com/mathematica Champaign, IL.Google ScholarGoogle Scholar
  44. Mingsheng Ying. 2011. Floyd-hoare logic for quantum programs. ACM Trans. Program. Lang. Syst. 33, 6 ( 2011 ), 19 : 1-19 : 49. https://doi.org/10.1145/2049706.2049708 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Enabling accuracy-aware Quantum compilers using symbolic resource estimation

      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

      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!