Skip to content
A quantum circuit language and formal verification tool
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore some reorganization Apr 20, 2017
Ancilla.v
Arithmetic.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Complex.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Composition.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Contexts.v early attempt, unitary as a predicate in set Dec 12, 2018
DBCircuits.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
DBGenerator.v some new notations and changes Dec 1, 2018
Denotation.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Deutsch.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Dirac.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Equations.v
Generator.v Updated generator Jul 15, 2018
HOASCircuits.v refactoring, all admitted lemmas now 'Fact's, all aborted lemmas now … Jul 27, 2018
HOASExamples.v operator sum decomposition axiom added, prior axioms now lemmas Nov 14, 2018
HOASGenerator.v some new notations and changes Dec 1, 2018
HOASLib.v mostly swap circuits/proofs Mar 12, 2019
HOASProofs.v
LICENSE.md Rename LICENSE to LICENSE.md Sep 18, 2018
Makefile updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Matrix.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Monad.v
Monoid.v readded monoid.v Sep 1, 2018
Oracles.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Prelim.v
QASM.v
QASMExamples.v
QASMPrinter.v
Quantum.v
README.md switched back to to maintain compatibility with Coq 8.5-8.7. Modified… Nov 27, 2018
SemanticLib.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
Symmetric.v updating to SQIRE versions of Complex, Dirac, Matrix, Prelim, and Qua… Apr 20, 2019
TypeChecking.v filled in Toffoli_at Nov 15, 2018
TypesDBCircuit.v proofs that add_fresh and get_fresh type their pats Jul 25, 2018
UnitarySemantics.v closed end comment Jan 17, 2019

README.md

QWIRE

This is a Coq implementation of the QWIRE quantum programming language, described in the following papers by Jennifer Paykin, Robert Rand, Dong-Ho Lee and Steve Zdancewic:

Rennela and Staton's Classical Control, Quantum Circuits and Linear Logic in Enriched Category Theory provides a categorical semantics for QWIRE.

QWIRE is compatible with Coq 8.5 - 8.8.

This version of the project has no dependencies. Run make to compile the core (preliminary and implementation) files and make all to compile the whole project. We recommend using Company Coq with QWIRE in light of its support for unicode.

Files in this repository

Preliminaries

  • Monad.v : An implementation of some basic monads
  • Monoid.v : A typeclass and solver for commutative monoids, modified from LinearTypingContexts
  • Prelim.v : A variety of general purpose definitions and tactics

Underlying mathematical libraries

  • Complex.v : Complex number library, modified from Coquelicot
  • Matrix.v : Matrix library
  • Quantum.v : Defines unitary matrices and quantum operations

Implementation of QWIRE

  • Contexts.v : Defines wire types and typing contexts
  • HOASCircuits.v : Defines QWIRE circuits using higher-order abstract syntax
  • DBCircuits.v : Compiling HOAS to De Bruijin style circuits
  • TypeChecking.v : Circuit notations and tactics for proving well-typedness
  • Denotation.v : Defines the denotational semantics of QWIRE circuits and proves its (quantum mechanical) validity
  • HOASLib.v : A library of basic circuits used in QWIRE programming
  • SemanticLib.v : Proves the semantic properties of HOASLib circuits
  • HOASExamples.v : Additional examples of HOAS circuits
  • Composition.v : States and admits compositionality lemmas (used in the following five files)
  • Ancilla.v : Defines the correctness of circuits using ancilla assertions
  • Symmetric.v : Syntactic conditions for guaranteeing the validity of assertions
  • Oracles.v : Compilation of boolean expressions to QWIRE circuits

Verification of QWIRE circuits

  • Arithmetic.v : Verification of a quantum adder
  • Deutsch.v : Variants on Deutsch's Algorithm
  • Equations.v : Equalities on small circuits
  • HOASProofs.v : Additional proofs, including coin flips and teleportation

Compilation to QASM

  • QASM.v : Compilation from QWIRE to QASM
  • QASMPrinter.v : A printer for compiled circuits, for execution on a quantum computer/simulator
  • QASMExamples.v : Examples of circuit compilation
You can’t perform that action at this time.