Formally Verified Quantum Programming Robert Rand University of Pennsylvania, [email protected]

Formally Verified Quantum Programming Robert Rand University of Pennsylvania, Rnrand@Gmail.Com

View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by ScholarlyCommons@Penn University of Pennsylvania ScholarlyCommons Publicly Accessible Penn Dissertations 2018 Formally Verified Quantum Programming Robert Rand University of Pennsylvania, [email protected] Follow this and additional works at: https://repository.upenn.edu/edissertations Part of the Computer Sciences Commons Recommended Citation Rand, Robert, "Formally Verified Quantum Programming" (2018). Publicly Accessible Penn Dissertations. 3175. https://repository.upenn.edu/edissertations/3175 This paper is posted at ScholarlyCommons. https://repository.upenn.edu/edissertations/3175 For more information, please contact [email protected]. Formally Verified Quantum Programming Abstract The field of quantum mechanics predates computer science by at least ten years, the time between the publication of the Schrodinger equation and the Church-Turing thesis. It took another fifty years for Feynman to recognize that harnessing quantum mechanics is necessary to efficiently simulate physics and for David Deutsch to propose the quantum Turing machine. After thirty more years, we are finally getting close to the first general-purpose quantum computers based upon prototypes by IBM, Intel, Google and others. While physicists and engineers have worked on building scalable quantum computers, theoretical computer scientists have made their own advances. Complexity theorists introduced quantum complexity classes like BQP and QMA; Shor and Grover developed their famous algorithms for factoring and unstructured search. Programming languages researchers pursued two main research directions: Small-scale languages like QPL and the quantum lambda-calculi for reasoning about quantum computation and large-scale languages like Quipper and Q# for industrial-scale quantum software development. This thesis aims to unify these two threads while adding a third one: formal verification. We argue that quantum programs demand machine-checkable proofs of correctness. We justify this on the basis of the complexity of programs manipulating quantum states, the expense of running quantum programs, and the inapplicability of traditional debugging techniques to programs whose states cannot be examined. We further argue that the existing mathematical models of quantum computation make this an easier task than one could reasonably expect. In light of these observations we introduce QWIRE, a tool for writing verifiable, large scale quantum programs. QWIRE is not merely a language for writing and verifying quantum circuits: it is a verified circuit description language. This means that the semantics of QWIRE circuits are verified in the Coq proof assistant. We also implement verified abstractions, like ancilla management and reversible circuit compilation. Finally, we turn QWIRE and Coq's abilities outwards, towards verifying popular quantum algorithms like quantum teleportation. We argue that this tool provides a solid foundation for research into quantum programming languages and formal verification going forward. Degree Type Dissertation Degree Name Doctor of Philosophy (PhD) Graduate Group Computer and Information Science First Advisor Steve Zdancewic Keywords formal verification, programming languages, quantum computing This dissertation is available at ScholarlyCommons: https://repository.upenn.edu/edissertations/3175 Subject Categories Computer Sciences This dissertation is available at ScholarlyCommons: https://repository.upenn.edu/edissertations/3175 FORMALLY VERIFIED QUANTUM PROGRAMMING Robert Rand A DISSERTATION in Computer and Information Science Presented to the Faculties of the University of Pennsylvania in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy 2018 Supervisor of Dissertation Steve Zdancewic Professor of Computer and Information Science Graduate Group Chairperson Rajeev Alur Professor of Computer and Information Science Dissertation Committee Stephanie Weirich, Professor of Computer and Information Science, Chair Val Tannen, Professor of Computer and Information Science Benjamin Pierce, Professor of Computer and Information Science Prakash Panangaden, Professor of Computer Science, McGill University Acknowledgments A lot of people helped me on the road to this dissertation, none more than my advisor, Steve Zdancewic. From the moment I wandered into his office and asked if we could do research on probability and logic (his response: “Sure!”), to the moment he emailed me and Jennifer Paykin asking if we wanted to work on a quantum computing project (“Sure!”), to the moment I submitted this dissertation, Steve has been endlessly enthusiastic, generous with his time, and willing to explore entirely new horizons. In a similar vein, I have to thank my friend and collaborator Jennifer Paykin, who jumped into the new and exciting world of quantum programming languages with me. Doing research is an entirely different, and better, experience with a close collaborator, especially one as talented and tireless as Jennifer. Qwire, and therefore this thesis, could not possibly have existed without her. Thanks to Mike Mislove and the other members of the “Semantics, Formal Rea- soning, and Tools for Quantum Programming” research initiative for introducing me to quantum computing and helping me acclimate to the field. Relatedly, thanks to the MFPS and QPL communities, which taught me a great deal and always made me feel welcome. Thanks especially to Peter Selinger, who blazed the path that I tried to follow and happily helped me along it, and Prakash Panangaden, who lent me his knowledge of quantum mechanics and graciously agreed to serve on my thesis committee. Thanks to Andy Gordon, who hosted me for a summer at Microsoft Research Cambridge. Thanks to my collaborators there: Neil Toronto, Cecily Morrison, Claudio Russo, Simon Peyton-Jones, Abigail Sellen, Felienne Hermans, Advait Sarkar and Rupert Horlick. Also, thanks to Tony Hoare, Cédric Fournet and Georges Gonthier for intellectually stimulating lunch meetings that often segued into extensive discussions of formal verification. Thanks to PLClub. The Penn Programming Languages group is not just a research group: it is a meeting place for people who love programming languages and are deeply invested in one another’s success. Thanks especially to Stephanie Weirich, Benjamin Pierce, Rajeev Alur, Mayur Naik and Val Tannen for their criticism, encouragement and advice. And thanks to Antal Spector-Zabusky, Leonidas Lampropoulos, Arthur Azevedo de Amorim, Peter-Michael Osera, Vilhelm Sjöberg, Richard Eisenberg, Brent Yorgey, Justin Hsu, Kenny Foner, Dmitri Garbuzov, Yannick Zakowski, Christine Rizkallah, Joachim Breitner, William Mansky, Maxime Dénès, Cǎtǎlin Hriţcu, Emilio ii Jesús Gallego Arias and Benoît Valiron for their generous help and camaraderie. Everyone who read this thesis, in part or in full, has my lasting gratitude. That’s Steve and Jennifer again, and my committee, Stephanie, Benjamin, Val and Prakash, as well Julien Ross, Yannick Zakowski, Alex Burka and Rivka Cohen. You are all my heroes. I’d like to end with a tribute to my first advisor and mentor at Penn, the late Dr. Ben Taskar. I can vividly remember receiving a text message from out of the blue saying Ben had passed away. In a daze, I searched the internet for confirmation, coming upon a lone tweet from Ben’s own mentor, the legendary Andrew Ng: “RIP Ben Taskar. Machine learning just lost a star.” The night sky may be full of lost stars but we still benefit from their light. iii ABSTRACT FORMALLY VERIFIED QUANTUM PROGRAMMING Robert Rand Steve Zdancewic The field of quantum mechanics predates computer science by at least ten years, the time between the publication of the Schrödinger equation and the Church-Turing thesis. It took another fifty years for Feynman to recognize that harnessing quantum mechanics is necessary to efficiently simulate physics and for David Deutsch to propose the quantum Turing machine. After thirty more years, we are finally getting close to the first general-purpose quantum computers based upon prototypes by IBM, Intel, Google and others. While physicists and engineers have worked on building scalable quantum comput- ers, theoretical computer scientists have made their own advances. Complexity theo- rists introduced quantum complexity classes like BQP and QMA; Shor and Grover de- veloped their famous algorithms for factoring and unstructured search. Programming languages researchers pursued two main research directions: Small-scale languages like QPL and the quantum λ-calculi for reasoning about quantum computation and large-scale languages like Quipper and Q# for industrial-scale quantum software de- velopment. This thesis aims to unify these two threads while adding a third one: formal verification. We argue that quantum programs demand machine-checkable proofs of correct- ness. We justify this on the basis of the complexity of programs manipulating quan- tum states, the expense of running quantum programs, and the inapplicability of traditional debugging techniques to programs whose states cannot be examined. We further argue that the existing mathematical models of quantum computation make this an easier task than one could reasonably expect. In light of these observations we introduce Qwire, a tool for writing verifiable, large scale quantum programs. Qwire is not merely a language for writing and verifying quantum circuits: it is a verified circuit description language. This

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    225 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us