Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 734 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 734 Bytes

quil-coalton

This example shows a parser-combinator library as well as a parser for a subset of the Quil Language.

The currently supported Quil language features are:

  • Simple gates
  • Parametric gates
  • Gate modifiers
  • Measurement
  • Reset
  • Control Flow

Usage

To run the parser, load quil-coalton and run

(quil-coalton:run-quil-parser "<quil program>")

Example usage:

QUIL-COALTON> (quil-coalton:run-quil-parser "H 0; CNOT 0 1")
#.(OK #.(QUILPROGRAM #.(CONS #.(QUILGATE #.(SIMPLE #.(SIMPLEGATE #.(NAME "H") #.(CONS #.(QUBIT 0) #.NIL)))) #.(CONS #.(QUILGATE #.(SIMPLE #.(SIMPLEGATE #.(NAME "CNOT") #.(CONS #.(QUBIT 0) #.(CONS #.(QUBIT 1) #.NIL))))) #.NIL))))