skip to main content

Verified compilation of Quantum oracles

Published:31 October 2022Publication History
Skip Abstract Section

Abstract

Quantum algorithms often apply classical operations, such as arithmetic or predicate checks, over a quantum superposition of classical data; these so-called oracles are often the largest components of a quantum program. To ease the construction of efficient, correct oracle functions, this paper presents VQO, a high-assurance framework implemented with the Coq proof assistant. The core of VQO is OQASM, the oracle quantum assembly language. OQASM operations move qubits between two different bases via the quantum Fourier transform, thus admitting important optimizations, but without inducing entanglement and the exponential blowup that comes with it. OQASM’s design enabled us to prove correct VQO’s compilers—from a simple imperative language called OQIMP to OQASM, and from OQASM to SQIR, a general-purpose quantum assembly language—and allowed us to efficiently test properties of OQASM programs using the QuickChick property-based testing framework. We have used VQO to implement a variety of arithmetic and geometric operators that are building blocks for important oracles, including those used in Shor’s and Grover’s algorithms. We found that VQO’s QFT-based arithmetic oracles require fewer qubits, sometimes substantially fewer, than those constructed using “classical” gates; VQO’s versions of the latter were nevertheless on par with or better than (in terms of both qubit and gate counts) oracles produced by Quipper, a state-of-the-art but unverified quantum programming platform.

References

  1. Ali Abhari, Arvin Faruque, Mohammad Javad Dousti, Lukas Svec, Oana Catu, Amlan Chakrabati, Chen-Fu Chiang, Seth Vanderwilt, John Black, Frederic Chong, Margaret Martonosi, Martin Suchara, Ken Brown, Massoud Pedram, and Todd Brun. 2012. Scaffold: Quantum Programming Language. Princeton University. Google ScholarGoogle Scholar
  2. Matthew Amy, Martin Roetteler, and Krysta M. Svore. 2017. Verified Compilation of Space-Efficient Reversible Circuits. In Computer Aided Verification, Rupak Majumdar and Viktor Kunčak (Eds.). Springer International Publishing, Cham. 3–21. isbn:978-3-319-63390-9 Google ScholarGoogle Scholar
  3. Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, and Päivi Törmä. 1996. Approximate quantum Fourier transform and decoherence. Physical Review A, 54, 1 (1996), Jul, 139–146. issn:1094-1622 https://doi.org/10.1103/physreva.54.139 Google ScholarGoogle ScholarCross RefCross Ref
  4. Stephane Beauregard. 2003. Circuit for Shor’s Algorithm Using 2n+3 Qubits. Quantum Info. Comput., 3, 2 (2003), March, 175–185. issn:1533-7146 https://doi.org/10.26421/QIC3.2-8 Google ScholarGoogle ScholarCross RefCross Ref
  5. Daniel J. Bernstein. 2008. ChaCha, a variant of Salsa20. The State of the Art of Stream Ciphers. ECRYPT Network of Excellence in Cryptology, 273–278. https://cr.yp.to/papers.html##chacha Google ScholarGoogle Scholar
  6. Daniel J. Bernstein. 2010. Grover vs. McEliece. In Post-Quantum Cryptography, Nicolas Sendrier (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 73–80. isbn:978-3-642-12929-2 https://doi.org/10.1007/978-3-642-12929-2_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Xiaoning Bian. 2020. Compile Quipper quantum circuit to OpenQasm 2.0 program. https://www.mathstat.dal.ca/~xbian/QasmTrans/ [Online; accessed 8-July-2021] Google ScholarGoogle Scholar
  8. Benjamin Bichsel, Maximilian Baader, Timon Gehr, and Martin Vechev. 2020. Silq: A High-Level Quantum Language with Safe Uncomputation and Intuitive Semantics. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 286–300. isbn:9781450376136 https://doi.org/10.1145/3385412.3386007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Lukas Burgholzer, Hartwig Bauer, and Robert Wille. 2021. Hybrid Schrödinger-Feynman Simulation of Quantum Circuits With Decision Diagrams. https://doi.org/10.48550/ARXIV.2105.07045 arxiv:2105.07045. Google ScholarGoogle Scholar
  10. Christophe Chareton, Sébastien Bardin, François Bobot, Valentin Perrelle, and Benoît Valiron. 2021. An Automated Deductive Verification Framework for Circuit-building Quantum Programs. In Programming Languages and Systems - 30th European Symposium on Programming, ESOP 2021, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2021, Luxembourg City, Luxembourg, March 27 - April 1, 2021, Proceedings, Nobuko Yoshida (Ed.) (Lecture Notes in Computer Science, Vol. 12648). Springer, 148–177. https://doi.org/10.1007/978-3-030-72019-3_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Andrew M. Childs. 2009. On the Relationship Between Continuous- and Discrete-Time Quantum Walk. Communications in Mathematical Physics, 294, 2 (2009), Oct, 581–603. issn:1432-0916 https://doi.org/10.1007/s00220-009-0930-1 Google ScholarGoogle ScholarCross RefCross Ref
  12. Koen Claessen and John Hughes. 2000. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP ’00). Association for Computing Machinery, New York, NY, USA. 268–279. isbn:1581132026 https://doi.org/10.1145/351240.351266 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Andrew Cross. 2018. The IBM Q experience and QISKit open-source quantum computing software. In APS Meeting Abstracts. Google ScholarGoogle Scholar
  14. Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta. 2017. Open quantum assembly language. arXiv e-prints, Jul, https://doi.org/10.48550/ARXIV.1707.03429 arxiv:1707.03429. Google ScholarGoogle Scholar
  15. Thomas G. Draper. 2000. Addition on a Quantum Computer. arXiv e-prints, Article quant-ph/0008033, Aug., quant-ph/0008033 pages. https://doi.org/10.48550/ARXIV.QUANT-PH/0008033 arxiv:quant-ph/0008033. Google ScholarGoogle Scholar
  16. Richard P Feynman. 1982. Simulating physics with computers. International journal of theoretical physics, 21, 6/7 (1982), 467–488. https://doi.org/10.1007/BF02650179 Google ScholarGoogle ScholarCross RefCross Ref
  17. Craig Gidney and Martin Ekerå. 2021. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum, 5 (2021), April, 433. issn:2521-327X https://doi.org/10.22331/q-2021-04-15-433 Google ScholarGoogle ScholarCross RefCross Ref
  18. Google Quantum AI. 2019. Cirq: An Open Source Framework for Programming Quantum Computers. https://quantumai.google/cirq Google ScholarGoogle Scholar
  19. Alexander Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoît Valiron. 2013. Quipper: A scalable quantum programming language. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2013). 333–342. https://doi.org/10.1145/2491956.2462177 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 (STOC ’96). Association for Computing Machinery, New York, NY, USA. 212–219. isbn:0897917855 https://doi.org/10.1145/237814.237866 arxiv:quant-ph/9605043. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Lov K. Grover. 1997. Quantum Mechanics Helps in Searching for a Needle in a Haystack. Phys. Rev. Lett., 79 (1997), July, 325–328. https://doi.org/10.1103/PhysRevLett.79.325 arxiv:quant-ph/9706033. Google ScholarGoogle ScholarCross RefCross Ref
  22. L. Hales and S. Hallgren. 2000. An improved quantum Fourier transform algorithm and applications. In Proceedings 41st Annual Symposium on Foundations of Computer Science. 515–525. https://doi.org/10.1109/SFCS.2000.892139 Google ScholarGoogle ScholarCross RefCross Ref
  23. Kesha Hietala, Robert Rand, Shih-Han Hung, Liyi Li, and Michael Hicks. 2021. Proving Quantum Programs Correct. In 12th International Conference on Interactive Theorem Proving (ITP 2021), Liron Cohen and Cezary Kaliszyk (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 193). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany. 21:1–21:19. isbn:978-3-95977-188-7 issn:1868-8969 https://doi.org/10.4230/LIPIcs.ITP.2021.21 Google ScholarGoogle ScholarCross RefCross Ref
  24. Kesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu, and Michael Hicks. 2021. A Verified Optimizer for Quantum Circuits. Proc. ACM Program. Lang., 5, POPL (2021), Article 37, jan, 29 pages. https://doi.org/10.1145/3434318 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N.D. Jones, C.K. Gomard, and P. Sestoft. 1993. Partial Evaluation and Automatic Program Generation. Prentice Hall. isbn:9780130202499 lccn:lc93016674 https://books.google.com/books?id=7rPPScYo8w8C Google ScholarGoogle Scholar
  26. A. Langley, W. Chang, N. Mavrogiannopoulos, J. Strombergson, and S. Josefsson. 2016. ChaCha20-Poly1305 Cipher Suites for Transport Layer Security (TLS). issn:2070-1721 https://doi.org/10.17487/RFC7905 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Liyi Li, Finn Voichick, Kesha Hietala, Yuxiang Peng, Xiaodi Wu, and Michael Hicks. 2021. Verified Compilation of Quantum Oracles. https://doi.org/10.48550/ARXIV.2112.06700 Google ScholarGoogle Scholar
  28. Liyi Li, Finn Voichick, Kesha Hietala, Yuxiang Peng, Xiaodi Wu, and Michael Hicks. 2022. VQO: Verified Compilation of Quantum Oracles. https://doi.org/10.5281/zenodo.7068972 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Andrew Litteken, Yung-Ching Fan, Devina Singh, Margaret Martonosi, and Frederic T Chong. 2020. An updated LLVM-based quantum research compiler with further OpenQASM support. Quantum Science and Technology, 5, 3 (2020), may, 034013. https://doi.org/10.1088/2058-9565/ab8c2c Google ScholarGoogle ScholarCross RefCross Ref
  30. Igor L. Markov and Mehdi Saeedi. 2012. Constant-Optimized Quantum Circuits for Modular Multiplication and Exponentiation. Quantum Info. Comput., 12, 5–6 (2012), May, 361–394. issn:1533-7146 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Microsoft. 2017. The Q# Programming Language. https://docs.microsoft.com/ Google ScholarGoogle Scholar
  32. Yunseong Nam, Yuan Su, and Dmitri Maslov. 2020. Approximate quantum Fourier transform with O(n log(n)) T gates. npj Quantum Information, 6, 1 (2020), Mar, issn:2056-6387 https://doi.org/10.1038/s41534-020-0257-5 Google ScholarGoogle ScholarCross RefCross Ref
  33. Michael A. Nielsen and Isaac L. Chuang. 2011. Quantum Computation and Quantum Information (10th anniversary ed.). Cambridge University Press, USA. isbn:1107002176 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Anouk Paradis, Benjamin Bichsel, Samuel Steffen, and Martin Vechev. 2021. Unqomp: Synthesizing Uncomputation in Quantum Circuits. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2021). Association for Computing Machinery, New York, NY, USA. 222?236. isbn:9781450383912 https://doi.org/10.1145/3453483.3454040 Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Zoe Paraskevopoulou, Cătălin HriŢcu, Maxime Dénès, Leonidas Lampropoulos, and Benjamin C. Pierce. 2015. Foundational Property-Based Testing. In Interactive Theorem Proving, Christian Urban and Xingyuan Zhang (Eds.). Springer International Publishing, Cham. 325–343. isbn:978-3-319-22102-1 https://doi.org/10.1007/978-3-319-22102-1_22 Google ScholarGoogle ScholarCross RefCross Ref
  36. Yuxiang Peng, Kesha Hietala, Runzhou Tao, Liyi Li, Robert Rand, Michael Hicks, and Xiaodi Wu. 2022. A Formally Certified End-to-End Implementation of Shor’s Factorization Algorithm. https://doi.org/10.48550/ARXIV.2204.07112 Google ScholarGoogle Scholar
  37. Robert Rand. 2018. Formally verified quantum programming. Ph. D. Dissertation. University of Pennsylvania. Google ScholarGoogle Scholar
  38. Robert Rand, Jennifer Paykin, Dong-Ho Lee, and S. Zdancewic. 2018. ReQWIRE: Reasoning about Reversible Quantum Circuits. In QPL. https://doi.org/10.4204/eptcs.287.17 Google ScholarGoogle ScholarCross RefCross Ref
  39. E. Rescorla. 2018. The Transport Layer Security (TLS) Protocol Version 1.3. issn:2070-1721 https://doi.org/10.17487/RFC8446 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Rigetti Computing. 2019. The @rigetti optimizing Quil compiler. https://github.com/rigetti/quilc Google ScholarGoogle Scholar
  41. Rigetti Computing. 2021. PyQuil: Quantum programming in Python. https://pyquil-docs.rigetti.com Google ScholarGoogle Scholar
  42. Yunong Shi, Xupeng Li, Runzhou Tao, Ali Javadi-Abhari, Andrew W. Cross, Frederic T. Chong, and Ronghui Gu. 2019. Contract-based verification of a realistic quantum compiler. arXiv e-prints, Aug, arxiv:1908.08963. Google ScholarGoogle Scholar
  43. P.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
  44. Rolando Somma. 2020. Are We Ready for Quantum Computers? Scientific American, https://blogs.scientificamerican.com/observations/are-we-ready-for-quantum-computers Google ScholarGoogle Scholar
  45. Angela Wilkins. 2021. The Way I See It: The State of Quantum Computing. Rice University, https://news.rice.edu/news/2021/way-i-see-it-state-quantum-computing Google ScholarGoogle Scholar

Index Terms

  1. Verified compilation of Quantum oracles

        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!