QWIRE Practice: Formal Verification of Quantum Circuits in Coq

We describe an embedding of the QWIRE quantum circuit language in the Coq proof assistant. This allows programmers to write quantum circuits using high-level abstractions and to prove properties of those circuits using Coq's theorem proving features. The implementation uses higher-order abstract syntax to represent variable binding and provides a type-checking algorithm for linear wire types, ensuring that quantum circuits are well-formed. We formalize a denotational semantics that interprets QWIRE circuits as superoperators on density matrices, and prove the correctness of some simple quantum programs.

[1]  P. Selinger,et al.  Quantum lambda calculus , 2010 .

[2]  Jennifer Paykin,et al.  QWIRE: a core language for quantum circuits , 2017, POPL.

[3]  Rajagopal Nagarajan,et al.  Formalization of Quantum Protocols using Coq , 2015, QPL.

[4]  Xiaodi Wu,et al.  Invariants of quantum programs: characterisations and generation , 2017, POPL.

[5]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[6]  Martin Rötteler,et al.  Verified Compilation of Space-Efficient Reversible Circuits , 2016, CAV.

[7]  Krysta Marie Svore,et al.  LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing , 2014, ArXiv.

[8]  Benoît Valiron,et al.  Quipper: a scalable quantum programming language , 2013, PLDI.

[9]  Thierry Paul,et al.  Quantum computation and quantum information , 2007, Mathematical Structures in Computer Science.

[10]  Prakash Panangaden,et al.  Quantum weakest preconditions , 2005, Mathematical Structures in Computer Science.

[11]  Neil J. Ross,et al.  ALGEBRAIC AND LOGICAL METHODS IN QUANTUM COMPUTATION , 2015, 1510.02198.

[12]  Sam Staton,et al.  Classical Control and Quantum Circuits in Enriched Category Theory , 2018, MFPS.

[13]  Jennifer Paykin,et al.  The linearity Monad , 2017, Haskell.

[14]  Mingsheng Ying,et al.  Floyd--hoare logic for quantum programs , 2011, TOPL.

[15]  Rajagopal Nagarajan,et al.  QMC: A Model Checker for Quantum Systems , 2007, CAV.

[16]  Sam Staton,et al.  Algebraic Effects, Linearity, and Quantum Programming Languages , 2015, POPL.