OpenQASM refers to the extended language we now describe, specifically OpenQASM Version 3.0.
The human-readable form of OpenQASM is a simple, case-sensitive textual language. Statements are separated by semicolons and whitespace is ignored.
In other respects, OpenQASM possesses a dual nature as an assembly language and as a hardware description language.
Appendix [app:summary] summarizes the language statements, Appendix [app:grammar] specifies the grammar, and Appendix [app:semantics] gives formal semantics.
- Version string
- Included files
- Types and Casting
- Quantum types
- Classical scalar types
- Compile-time constants
- Types related to timing
- Index sets and slicing
- Register concatenation and slicing
- Classical value bit slicing
- Array concatenation and slicing
- Casting specifics
- Built-in quantum instructions
- Classical instructions
- Low-level classical instructions
- Extern function calls
- Further reserved keywords
- Scoping of variables
- Circuit timing
- Pulse-level descriptions of gates and measurement
- OpenPulse Grammar
- Play instruction
- Capture Instruction