Expand description
The repository contains an implementation of the combinator variant of the “it’s just a phase” language. Given an input program, the interpreter:
- performs some basic normalisation (associativity etc.)
- performs macro expansion of inverses, square roots, and gate definitions
- compiles the term to a circuit definition.
- Builds the unitary for the output.
§Running
A file of commands can be run using:
cargo run -- --file <FILENAME>or passed in through stdin. For all options see:
cargo run -- --helpModules§
- circuit_
syntax - Definitions of circuit-normal syntax.
- command
- A syntax of commands and their parsing.
- ket
- Structure for representing primitive states in ket notation.
- normal_
syntax - Normal-form syntax definitions
- phase
- Structure for representing phases, elements of the unit circle on the complex plane.
- raw_
syntax - Raw syntax definitions
- text
- Helpers for parsing and pretty printing.
- typecheck
- Functions and datastructures for type checking
- typed_
syntax - Typed syntax definitions