Header menu logo Encodings

QasmVersion Type

OpenQASM language version.

QASM 2.0 is required by Quokka, older Qiskit, and many hardware backends. QASM 3.0 is the modern standard with richer control flow and typing. Gate names (h, cx, rz, s, sdg) are identical across both versions.

Union cases

Union case Description

V2

Full Usage: V2

OpenQASM 2.0 — uses qreg declarations and qelib1.inc.

V3

Full Usage: V3

OpenQASM 3.0 — uses qubit[] declarations and stdgates.inc.

Instance members

Instance member Description

this.IsV2

Full Usage: this.IsV2

Returns: bool
Returns: bool

this.IsV3

Full Usage: this.IsV3

Returns: bool
Returns: bool

Type something to start searching.