OpenQASM 2.0 Abstract Syntax Tree Node Definitions
This module defines the AST node classes for OpenQASM 2.0, which provides a simpler and more limited set of constructs compared to OpenQASM 3.0.
OpenQASM 2.0 focuses on:
qreg
creg
Key limitations compared to 3.0:
// Quantum register: qreg q[2];new QReg('q', 2)// Gate application: h q[0];new ApplyGate('h', [['q', 0]], [])// Measurement: measure q[0] -> c[0];new Measure('q', 'c', 0, 0) Copy
// Quantum register: qreg q[2];new QReg('q', 2)// Gate application: h q[0];new ApplyGate('h', [['q', 0]], [])// Measurement: measure q[0] -> c[0];new Measure('q', 'c', 0, 0)
OpenQASM 2.0 Abstract Syntax Tree Node Definitions
This module defines the AST node classes for OpenQASM 2.0, which provides a simpler and more limited set of constructs compared to OpenQASM 3.0.
OpenQASM 2.0 focuses on:
qreg
) and classical register (creg
) declarationsKey limitations compared to 3.0:
Example: Basic OpenQASM 2.0 constructs