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.
- 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 Scholar
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Andrew Cross. 2018. The IBM Q experience and QISKit open-source quantum computing software. In APS Meeting Abstracts.
Google Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- Google Quantum AI. 2019. Cirq: An Open Source Framework for Programming Quantum Computers. https://quantumai.google/cirq
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Microsoft. 2017. The Q# Programming Language. https://docs.microsoft.com/
Google Scholar
- 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 Scholar
Cross Ref
- Michael A. Nielsen and Isaac L. Chuang. 2011. Quantum Computation and Quantum Information (10th anniversary ed.). Cambridge University Press, USA. isbn:1107002176
Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
- Robert Rand. 2018. Formally verified quantum programming. Ph. D. Dissertation. University of Pennsylvania.
Google Scholar
- 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 Scholar
Cross Ref
- E. Rescorla. 2018. The Transport Layer Security (TLS) Protocol Version 1.3. issn:2070-1721 https://doi.org/10.17487/RFC8446
Google Scholar
Digital Library
- Rigetti Computing. 2019. The @rigetti optimizing Quil compiler. https://github.com/rigetti/quilc
Google Scholar
- Rigetti Computing. 2021. PyQuil: Quantum programming in Python. https://pyquil-docs.rigetti.com
Google Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- Rolando Somma. 2020. Are We Ready for Quantum Computers? Scientific American, https://blogs.scientificamerican.com/observations/are-we-ready-for-quantum-computers
Google Scholar
- 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 Scholar
Index Terms
Verified compilation of Quantum oracles
Recommendations
Locking the Design of Building Blocks for Quantum Circuits
Special Issue ESWEEK 2019, CASES 2019, CODES+ISSS 2019 and EMSOFT 2019The research community expects that quantum computers will give economical results for particular problems on which the classical computers break down. Examples include factoring of large numbers, searching in a big database, or simulating chemical ...
Quantum correlation swapping
Quantum correlations (QCs), including quantum entanglement and those different, are important quantum resources and have attracted much attention recently. Quantum entanglement swapping as a kernel technique has already been applied to quantum repeaters ...
Can quantum discord increase in a quantum communication task?
Quantum teleportation of an unknown quantum state is one of the few communication tasks which has no classical counterpart. Usually the aim of teleportation is to send an unknown quantum state to a receiver. But is it possible in some way that the ...






Comments