Abstract
We present VOQC, the first fully verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called SQIR, a simple quantum intermediate representation, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of SQIR programs. SQIR uses a semantics of matrices of complex numbers, which is the standard for quantum computation, but treats matrices symbolically in order to reason about programs that use an arbitrary number of quantum bits. SQIR's careful design and our provided automation make it possible to write and verify a broad range of optimizations in VOQC, including full-circuit transformations from cutting-edge optimizers.
- Samson Abramsky and Bob Coecke. 2009. Categorical quantum mechanics. Handbook of quantum logic and quantum structures 2 ( 2009 ), 261-325.Google Scholar
- Matthew Amy. 2018. Towards large-scale functional verification of universal quantum circuits. https://www.mathstat.dal. ca/qpl2018/papers/QPL_2018_paper_30.pdf. Presented at QPL 2018.Google Scholar
- Matthew Amy. 2019. Sized types for low-level quantum metaprogramming. In Reversible Computation, Michael Kirkedal Thomsen and Mathias Soeken (Eds.). Springer International Publishing, Cham, 87-107. https://doi.org/10.1007/978-3-030-21500-2_6 Google Scholar
Cross Ref
- Matthew Amy, Parsiad Azimzadeh, and Michele Mosca. 2018. On the controlled-NOT complexity of controlled-NOT-phase circuits. Quantum Science and Technology 4, 1 ( 2018 ).Google Scholar
- Matthew Amy, Dmitri Maslov, and Michele Mosca. 2013. Polynomial-time T-depth optimization of Cliford+T circuits via matroid partitioning. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 33 (03 2013 ). https://doi.org/10.1109/TCAD. 2014.2341953 Google Scholar
Cross Ref
- Matthew Amy, Martin Roetteler, and Krysta M. Svore. 2017. Verified compilation of space-eficient reversible circuits. In Proceedings of the 28th International Conference on Computer Aided Verification (CAV 2017 ). Springer. https://www. microsoft.com/en-us/research/publication/verified-compilation-of-space-eficient-reversible-circuits/Google Scholar
- Charles H Bennett and Gilles Brassard. 2020. Quantum cryptography: Public key distribution and coin tossing. arXiv preprint arXiv: 2003. 06557 ( 2020 ).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. https: //doi.org/10.1145/3385412.3386007 Google Scholar
Digital Library
- Jaap Boender, Florian Kammüller, and Rajagopal Nagarajan. 2015. Formalization of quantum protocols using Coq. In Proceedings of the 12th International Workshop on Quantum Physics and Logic, Oxford, U.K., July 15-17, 2015 (Electronic Proceedings in Theoretical Computer Science, Vol. 195 ), Chris Heunen, Peter Selinger, and Jamie Vicary (Eds.). Open Publishing Association, 71-83. https://doi.org/10.4204/EPTCS.195.6 Google Scholar
Cross Ref
- Cambridge Quantum Computing Ltd. 2019. pytket. https://cqcl.github.io/pytket/build/html/index.htmlGoogle Scholar
- Christophe Chareton, Sébastien Bardin, François Bobot, Valentin Perrelle, and Benoit Valiron. 2020. Toward certified quantum programming. arXiv e-prints ( 2020 ). arXiv: 2003. 05841 [cs.PL]Google Scholar
- Bob Coecke and Ross Duncan. 2009. Interacting quantum observables: Categorical algebra and diagrammatics. New Journal of Physics 13 ( 06 2009 ). https://doi.org/10.1088/ 1367-2630/13/4/043016 Google Scholar
Cross Ref
- The Coq Development Team. 2019. The Coq proof assistant, version 8.10.0. https://doi.org/10.5281/zenodo.3476303 Google Scholar
Cross Ref
- Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta. 2017. Open quantum assembly language. arXiv e-prints ( Jul 2017 ). arXiv: 1707.03429 [quant-ph]Google Scholar
- Andrew Fagan and Ross Duncan. 2018. Optimising Cliford circuits with Quantomatic. In Proceedings of the 15th International Conference on Quantum Physics and Logic, QPL 2018, Halifax, Nova Scotia, 3-7 June 2018. https://doi.org/10.4204/EPTCS. 287.5 Google Scholar
Cross Ref
- Jean-Christophe Filliâtre and Andrei Paskevich. 2013. Why3-Where programs meet provers. In Proceedings of the 22nd European Symposium on Programming (Lecture Notes in Computer Science).Google Scholar
Digital Library
- Daniel Gottesman. 2010. An introduction to quantum error correction and fault-tolerant quantum computation. In Quantum information science and its contributions to mathematics, Proceedings of Symposia in Applied Mathematics, Vol. 68. 13-58.Google Scholar
Cross Ref
- 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
- Alexander S Green. 2010. Towards a formally verified functional quantum programming language. Ph.D. Dissertation. University of Nottingham.Google Scholar
- Daniel M. Greenberger, Michael A. Horne, and Anton Zeilinger. 1989. Going beyond Bell's Theorem. Springer Netherlands, Dordrecht, 69-72. https://doi.org/10.1007/ 978-94-017-0849-4_10 Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Luke Heyfron and Earl T. Campbell. 2018. An eficient quantum compiler that reduces T count. Quantum Science and Technology 4 ( 2018 ). https://doi.org/10.1088/2058-9565/aad604 Google Scholar
Cross Ref
- Kesha Hietala, Robert Rand, Shih-Han Hung, Liyi Li, and Michael Hicks. 2020a. Proving Quantum Programs Correct. arXiv: 2010. 01240 [cs.PL]Google Scholar
- Kesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu, and Michael Hicks. 2020b. A Verified Optimizer for Quantum Circuits. arXiv: 1912. 02250 [cs.PL]Google Scholar
- IBM. [n.d.]. IBM Q5 Tenerife V1.x.x version log. https://github.com/Qiskit/ibmq-device-information/blob/master/backends/ tenerife/V1/version_log.mdGoogle Scholar
- IBM Research Editorial Staf. 2018. We have winners!... of the IBM Qiskit developer challenge. https://www.ibm.com/ blogs/research/2018/08/winners-qiskit-developer-challenge/Google Scholar
- Ali Javadi-Abhari, Shruti Patil, Daniel Kudrow, Jef Heckey, Alexey Lvov, Frederic T. Chong, and Margaret Martonosi. 2014. ScafCC: A framework for compilation and analysis of quantum computing programs. In Proceedings of the 11th ACM Conference on Computing Frontiers (Cagliari, Italy) (CF '14). ACM, New York, NY, USA, Article 1, 10 pages. https://doi.org/10.1145/2597917.2597939 Google Scholar
Digital Library
- Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. 2018. A complete axiomatisation of the ZX-calculus for Cliford+ T quantum mechanics. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science. ACM, 559-568. https://doi.org/10.1145/3209108.3209131 Google Scholar
Digital Library
- Jacques-Henri Jourdan, François Pottier, and Xavier Leroy. 2012. Validating LR(1) parsers. In Programming Languages and Systems, Helmut Seidl (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 397-416.Google Scholar
- Aleks Kissinger and John van de Wetering. 2019. Reducing T-count with the ZX-calculus. arXiv e-prints ( 2019 ). arXiv: 1903.10477 [quant-ph]Google Scholar
- Aleks Kissinger and John van de Wetering. 2020. PyZX: Large scale automated diagrammatic reasoning. Electronic Proceedings in Theoretical Computer Science 318 ( 04 2020 ), 230-242. https://doi.org/10.4204/EPTCS.318.14 Google Scholar
Cross Ref
- Aleks Kissinger and Vladimir Zamdzhiev. 2015. Quantomatic: A proof assistant for diagrammatic reasoning. In Automated Deduction-CADE-25, Amy P. Felty and Aart Middeldorp (Eds.). Springer International Publishing, Cham, 326-336.Google Scholar
- Emmanuel Knill. 1996. Conventions for quantum pseudocode. Technical Report. Los Alamos National Lab., NM (United States).Google Scholar
Cross Ref
- Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM 52, 7 ( July 2009 ), 107-115. https://doi.org/10/ c9sb7qGoogle Scholar
- Margaret Martonosi and Martin Roetteler. 2019. Next steps in quantum computing: computer science's role. arXiv: 1903. 10541 [cs.ET]Google Scholar
- Guillaume Melquiond. 2020. Interval package for Coq. https://gitlab.inria.fr/coqinterval/intervalGoogle Scholar
- D. M. Miller and M. A. Thornton. 2006. QMDD: A decision diagram structure for reversible and quantum circuits. In 36th International Symposium on Multiple-Valued Logic (ISMVL'06). 30-30. https://doi.org/10.1109/ISMVL. 2006.35 Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- Jennifer Paykin, Robert Rand, and Steve Zdancewic. 2017. QWIRE: A core language for quantum circuits. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (Paris, France) (POPL 2017 ). ACM, New York, NY, USA, 846-858. https://doi.org/10.1145/3009837.3009894 Google Scholar
Digital Library
- Frank Pfenning and Conal Elliott. 1988. Higher-order abstract syntax. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (Atlanta, Georgia, USA) ( PLDI '88). ACM, New York, NY, USA, 199-208. https://doi.org/10.1145/53990.54010 Google Scholar
Digital Library
- Robert Rand. 2018. Formally verified quantum programming. Ph.D. Dissertation. University of Pennsylvania.Google Scholar
- Robert Rand, Jennifer Paykin, Dong-Ho Lee, and Steve Zdancewic. 2018b. ReQWIRE: Reasoning about reversible quantum circuits. In Proceedings of the 15th International Conference on Quantum Physics and Logic, QPL 2018, Halifax, Nova Scotia, 3-7 June 2018. https://doi.org/10.4204/EPTCS.287.17 Google Scholar
Cross Ref
- Robert Rand, Jennifer Paykin, and Steve Zdancewic. 2017. QWIRE practice: Formal verification of quantum circuits in Coq. In Proceedings 14th International Conference on Quantum Physics and Logic, QPL 2017, Nijmegen, The Netherlands, 3-7 July 2017. 119-132. https://doi.org/10.4204/EPTCS.266.8 Google Scholar
Cross Ref
- Robert Rand, Jennifer Paykin, and Steve Zdancewic. 2018a. Phantom types for quantum programs. The Fourth International Workshop on Coq for Programming Languages.Google Scholar
- Rigetti Computing. 2019a. Pyquil documentation. http://pyquil.readthedocs.io/en/latest/Google Scholar
- Rigetti Computing. 2019b. The @rigetti optimizing Quil compiler. https://github.com/rigetti/quilcGoogle Scholar
- Mehdi Saeedi, Robert Wille, and Rolf Drechsler. 2011. Synthesis of quantum circuits for linear nearest neighbor architectures. Quantum Information Processing 10, 3 ( 01 Jun 2011 ), 355-377. https://doi.org/10.1007/s11128-010-0201-2 Google Scholar
Digital Library
- Peter Selinger. 2004. Towards a quantum programming language. Mathematical Structures in Computer Science 14, 4 (Aug. 2004 ), 527-586. https://doi.org/10.1017/S0960129504004256 Google Scholar
Digital Library
- 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 2019 ). arXiv: 1908.08963 [quant-ph]Google Scholar
- P. W. Shor. 1994. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings 35th Annual Symposium on Foundations of Computer Science (FOCS '94).Google Scholar
Digital Library
- DR Simon. 1994. On the power of quantum computation. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science. 116-123.Google Scholar
Digital Library
- Kartik Singhal, Robert Rand, and Michael Hicks. 2020. Verified translation between low-level quantum languages. The First International Workshop on Programming Languages for Quantum Computing.Google Scholar
- Kaitlin N. Smith and Mitchell A. Thornton. 2019. A quantum computational compiler and design tool for technology-specific targets. In Proceedings of the 46th International Symposium on Computer Architecture (ISCA '19). https://doi.org/10.1145/ 3307650.3322262 Google Scholar
Digital Library
- Robert S. Smith, Michael J. Curtis, and William J. Zeng. 2016. A practical quantum instruction set architecture. arXiv e-prints (Aug 2016 ). arXiv: 1608.03355 [quant-ph]Google Scholar
- 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 Scholar
Cross Ref
- 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). https://doi.org/10.1145/3297858.3304007 Google Scholar
Digital Library
- The Cirq Developers. 2019. Cirq: A python library for NISQ circuits. https://cirq.readthedocs.io/en/stable/Google Scholar
- Mingsheng Ying. 2011. Floyd-hoare logic for quantum programs. ACM Transactions on Programming Languages and Systems (TOPLAS) 33, 6 ( 2011 ), 19. https://doi.org/10.1145/2049706.2049708 Google Scholar
Digital Library
- Vladimir Zamdzhiev. 2016. Quantum computing: The good, the bad, and the (not so) ugly! Invited talk, Tulane University.Google Scholar
- Alwin Zulehner, Alexandru Paler, and Robert Wille. 2017. An eficient methodology for mapping quantum circuits to the IBM QX architectures. arXiv e-prints ( Dec 2017 ). arXiv: 1712.04722 [quant-ph]Google Scholar
Index Terms
A verified optimizer for Quantum circuits
Recommendations
A Verified Optimizer for Quantum Circuits
We present voqc, the first verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called sqir, a small quantum intermediate representation, which is deeply ...
Writing and verifying a Quantum optimizing compiler (keynote)
CC 2022: Proceedings of the 31st ACM SIGPLAN International Conference on Compiler ConstructionAs quantum computing hardware evolves, it will continue to face four key limitations: low qubit counts, limited connectivity, high error rates, and short coherence times. Quantum compilers play a key role in addressing these issues, reducing the number ...
Quantum logic synthesis by symbolic reachability analysis
DAC '04: Proceedings of the 41st annual Design Automation ConferenceReversible quantum logic plays an important role in quantum computing. In this paper, we propose an approach to optimally synthesize quantum circuits by symbolic reachability analysis where the primary inputs are purely binary. we use symbolic ...






Comments