7.6 KiB
7.6 KiB
Quil
QuiL is the classic example of a language written specifically for a quantum machine.
The full document on the Quil language is found here.
Quil Specification
Authors: Robert S. Smith; Rigetti & Co. Inc.; and contributors
Language Version: 2021.1 (DRAFT)
Table of Contents
- 1. Preamble
- 1.1. An Introduction to Quil
- 1.2. Annexes
- 2. Operational Semantic Devices
- 2.1. Mathematical Preliminaries
- 2.2. The Quantum Abstract Machine
- 3. Structure of a Quil Program
- 3.1. Meta-Syntax
- 3.2. Syntactic Rudiments
- 3.2.1. Arithmetic Expressions
- 3.3. Main Program Elements
- 3.4. Comments
- 4. Quantum Gates
- 4.1. Qubits and Quantum State
- 4.2. Quantum Gate Definitions
- 4.2.1. Structure of a Gate Definition
- 4.2.2. Definition by Matrix
- 4.2.3. Definition by Permutation
- 4.2.4. Definition by Pauli Sum
- 4.2.4.1. Semantics
- 4.2.4.2. Example Syntax
- 4.2.4.3. Example Semantic Reduction of CPHASE
- 4.3. Standard Gate Definitions
- 4.3.1. Pauli Gates
- 4.3.2. Hadamard Gate
- 4.3.3. Phase Gates
- 4.3.4. Controlled-Phase Gates
- 4.3.5. Cartesian Rotation Gates
- 4.3.6. Controlled-X Gates
- 4.3.7. Swap Gates
- 4.3.8. Other Gates
- 4.4. Quantum Gate Applications
- 4.4.1. Syntax and Semantics
- 4.4.2. DAGGER Gate Modifier
- 4.4.3. CONTROLLED Gate Modifier
- 4.4.4. FORKED Gate Modifier
- 4.4.5. Chaining Modifiers
- 5. Quantum State Reset
- 6. Classical Memory
- 6.1. Design Considerations
- 6.2. Types
- 6.3. Declaring Memory
- 6.3.1. Declaring Memory
- 6.3.2. Declaring Aliased Memory
- 6.3.3. Declaring Aliased Memory Declaration with an Offset
- 6.3.4. Portability of Aliased Declarations
- 6.3.5. Duplicate Declaration Identifiers
- 6.3.6. Examples
- 6.3.6.1. Register Machine with a Condition Bit
- 6.3.6.2. Memory-Mapped RAM
- 6.3.6.3. Computing Bits of an Angle
- 6.4. Memory Access and Dereferencing
- 6.5. Classical Instructions
- 7. Measurement
- 8. Classical Control
- 8.1. Halting the Program
- 8.2. Program Labels and Branching
- 9. Other Instructions and Directives
- 9.1. No-Operation Instruction
- 9.2. Pragmas
- 9.3. File Inclusion
- 10. Circuits
- 10.1. Circuit Syntax
- 10.2. Circuit Expansion
- 11. History and Changes
- 11.1. A History of Quil
- 11.2. Changes
- 12. Annex T: Pulse-Level Control
- 12.1. Frames
- 12.1.1. DEFFRAME
- 12.1.1.1. Frame Attributes
- 12.2. Waveforms
- 12.2.1. Defining new waveforms
- 12.3. Pulses
- 12.4. Frame Mutations
- 12.4.1. Frequency
- 12.4.2. Phase
- 12.4.3. Scale
- 12.5. Capture
- 12.6. Defining Calibrations
- 12.7. Timing and Synchronization
Note: This document is in DRAFT STATUS and is for review purposes only. It is being developed by the Quil-Lang group on GitHub.
1. Preamble
1.1. An Introduction to Quil
This is the language specification for Quil, a language for hybrid classical/quantum computations.
TLDR
Quil is an instruction-based language; each line of a Quil program generally corresponds to a single, discrete action. Despite its resemblance, Quil is not an assembly language.
- QVM is what runs on the backend and is the high-performance Quil simulator