skip to main content

A verified optimizer for Quantum circuits

Published:04 January 2021Publication History
Skip Abstract Section

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.

References

  1. Samson Abramsky and Bob Coecke. 2009. Categorical quantum mechanics. Handbook of quantum logic and quantum structures 2 ( 2009 ), 261-325.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarCross RefCross Ref
  4. 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 ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarCross RefCross Ref
  6. 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 ScholarGoogle Scholar
  7. Charles H Bennett and Gilles Brassard. 2020. Quantum cryptography: Public key distribution and coin tossing. arXiv preprint arXiv: 2003. 06557 ( 2020 ).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. https: //doi.org/10.1145/3385412.3386007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarCross RefCross Ref
  10. Cambridge Quantum Computing Ltd. 2019. pytket. https://cqcl.github.io/pytket/build/html/index.htmlGoogle ScholarGoogle Scholar
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarCross RefCross Ref
  13. The Coq Development Team. 2019. The Coq proof assistant, version 8.10.0. https://doi.org/10.5281/zenodo.3476303 Google ScholarGoogle ScholarCross RefCross Ref
  14. 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 ScholarGoogle Scholar
  15. 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 ScholarGoogle ScholarCross RefCross Ref
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarCross RefCross Ref
  18. 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
  19. Alexander S Green. 2010. Towards a formally verified functional quantum programming language. Ph.D. Dissertation. University of Nottingham.Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarCross RefCross Ref
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarCross RefCross Ref
  23. Kesha Hietala, Robert Rand, Shih-Han Hung, Liyi Li, and Michael Hicks. 2020a. Proving Quantum Programs Correct. arXiv: 2010. 01240 [cs.PL]Google ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle Scholar
  26. 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 ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle Scholar
  30. 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 ScholarGoogle Scholar
  31. 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 ScholarGoogle ScholarCross RefCross Ref
  32. 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 ScholarGoogle Scholar
  33. Emmanuel Knill. 1996. Conventions for quantum pseudocode. Technical Report. Los Alamos National Lab., NM (United States).Google ScholarGoogle ScholarCross RefCross Ref
  34. Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM 52, 7 ( July 2009 ), 107-115. https://doi.org/10/ c9sb7qGoogle ScholarGoogle Scholar
  35. Margaret Martonosi and Martin Roetteler. 2019. Next steps in quantum computing: computer science's role. arXiv: 1903. 10541 [cs.ET]Google ScholarGoogle Scholar
  36. Guillaume Melquiond. 2020. Interval package for Coq. https://gitlab.inria.fr/coqinterval/intervalGoogle ScholarGoogle Scholar
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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
  39. 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
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. Robert Rand. 2018. Formally verified quantum programming. Ph.D. Dissertation. University of Pennsylvania.Google ScholarGoogle Scholar
  43. 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 ScholarGoogle ScholarCross RefCross Ref
  44. 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 ScholarGoogle ScholarCross RefCross Ref
  45. Robert Rand, Jennifer Paykin, and Steve Zdancewic. 2018a. Phantom types for quantum programs. The Fourth International Workshop on Coq for Programming Languages.Google ScholarGoogle Scholar
  46. Rigetti Computing. 2019a. Pyquil documentation. http://pyquil.readthedocs.io/en/latest/Google ScholarGoogle Scholar
  47. Rigetti Computing. 2019b. The @rigetti optimizing Quil compiler. https://github.com/rigetti/quilcGoogle ScholarGoogle Scholar
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  50. 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 ScholarGoogle Scholar
  51. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  52. DR Simon. 1994. On the power of quantum computation. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science. 116-123.Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. 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 ScholarGoogle Scholar
  54. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  55. 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 ScholarGoogle Scholar
  56. 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
  57. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  58. The Cirq Developers. 2019. Cirq: A python library for NISQ circuits. https://cirq.readthedocs.io/en/stable/Google ScholarGoogle Scholar
  59. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  60. Vladimir Zamdzhiev. 2016. Quantum computing: The good, the bad, and the (not so) ugly! Invited talk, Tulane University.Google ScholarGoogle Scholar
  61. 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 ScholarGoogle Scholar

Index Terms

  1. A verified optimizer for Quantum circuits

        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!