Skip to main contentIBM Quantumย Documentation Mirror

OpenQASM 3 feature table

Below is a list of the OpenQASM 3 language features.

For more details on these capabilities, see the OpenQASM 3.X Live Specification.

Key:

  • โŒ Not supported
  • ๐ŸŸก Partial support
  • โœ… Supported

The "supported" mark meaning depends on the column:

  • Qiskit SDK: The feature can be parsed by qiskit.qasm3.loads (by using the qiskit-qasm3-import extension) and represented in a QuantumCircuit.

    The feature can be exported to OpenQASM 3 by qiskit.qasm3.dumps.

  • IBM Qiskit Runtime: A circuit containing the corresponding Qiskit feature can be successfully executed on hardware through IBMยฎ Qiskit Runtime.

OpenQASM 3 FeatureQiskit SDK featureQiskit SDKIBM Qiskit RuntimeNotes
commentsโœ…โœ…1
QASM vstringโœ…โœ…1
include๐ŸŸกโŒ1, 7
unicode namesโœ…โœ…
qubitQubit and QuantumRegisterโœ…๐ŸŸก2
bitClbit and ClassicalRegisterโœ…โœ…3
boolexpr.Var and classical expressions๐ŸŸกโœ…4
intโŒโœ…4
uintexpr.Var and classical expressions๐ŸŸกโœ…4
floatexpr.Var and classical expressions๐ŸŸก๐ŸŸก4
angleImplicit, as gate parametersโŒ๐ŸŸก4
complexโŒโŒ4
constโŒโŒ4
pi/ฯ€/tau/ฯ„/euler/โ„‡Constant-folded into gate parametersโœ…โœ…
Aliasing: letQuantum and classical registers๐ŸŸกโŒ5
register concatenationQuantum and classical registers๐ŸŸกโŒ5
castingexpr.Cast classical expressions๐ŸŸก๐ŸŸก4
durationโŒโŒ
durationofโŒโŒ
ns/ยตs/us/ms/s/dtDurations of delay and boxโœ…โœ…6
stretchexpr.Stretch๐ŸŸก๐ŸŸก4, 6
delayDelay/QuantumCircuit.delayโœ…โœ…6
barrierBarrier/QuantumCircuit.barrierโœ…โœ…
boxBoxOp/QuantumCircuit.boxโœ…โŒ6
Built-in UUGate/QuantumCircuit.uโœ…โœ…
gate๐ŸŸก๐ŸŸก7
gphaseQuantumCircuit.global_phase๐ŸŸกโŒ7
ctrl @/ negctrl @AnnotatedOperation๐ŸŸกโŒ7
inv @AnnotatedOperation๐ŸŸกโŒ7
pow(k) @AnnotatedOperation๐ŸŸกโŒ7
resetReset/QuantumCircuit.resetโœ…โœ…
measureMeasure/QuantumCircuit.measureโœ…โœ…
bit operationsโœ…โœ…4
boolean operationsโœ…โœ…4
arithmetic expressions๐ŸŸก๐ŸŸก4
comparisonsโœ…โœ…4
ifQuantumCircuit.if_testโœ…โœ…8
elseQuantumCircuit.if_testโœ…โœ…8
else ifQuantumCircuit.if_testโœ…โŒ8
for loopsQuantumCircuit.for_loop๐ŸŸกโŒ8
while loopsQuantumCircuit.while_loopโœ…โŒ8
continueQuantumCircuit.continue_loop๐ŸŸกโŒ8
breakQuantumCircuit.break_loop๐ŸŸกโŒ8
returnโŒโŒ
externโŒโŒ
def subroutines (classical)โŒโŒ
def subroutines (quantum)โŒโŒ
inputQuantumCircuit.add_inputโœ…๐ŸŸก4, 9
outputโŒโŒ

Notes

  1. These OpenQASM 3 program features have no impact on the execution and Qiskit strips them out as part of parsing the files. Files that use them can be submitted but they will have no effect. For include files, stdgates.inc is currently supported as input to Qiskit, and backend execution always requires circuits to have been compiled to the backend Instruction Set Architecture (ISA), where include files are irrelevant.
  1. Qiskit SDK supports parsing and dumping OpenQASM 3 files with any qubit declarations. For execution on hardware, only circuits defined in terms of hardware qubits (for example, $0) are valid. Qiskit SDK automatically outputs OpenQASM 3 in terms of the supported hardware-qubit identifiers if the circuit was transpiled for a backend with layout information.
  1. bit- and bit[n]-typed variable declarations in Qiskit SDK correspond to Clbit and ClassicalRegister declarations.
  1. As of July 2025, Qiskit SDK (through qiskit-qasm3-import v0.6.0) does not support parsing OpenQASM 3 files that contain variable declarations, and has very limited support for parsing variable expressions. QuantumCircuit, however, can represent local variables of a restricted set of types, can represent many different expressions on these types, and supports outputting them to OpenQASM 3. In general, most of what Qiskit can represent in its expression system can be executed on suitable dynamic circuits hardware. See the Qiskit documentation of the qiskit.circuit.classical module for the most up-to-date information.
  1. Qiskit SDK can represent register aliasing for both quantum and classical registers, but it is strongly discouraged to use aliasing of classical registers. Most expressions on classical registers do not work with aliases, and aliased classical registers are not supported for execution on hardware. The Qiskit OpenQASM 3 parser can resolve let alias statements that bind the result of register concantenation.
  1. Qiskit SDK supports explicit delays via QuantumCircuit.delay, and circuit boxes (QuantumCircuit.box) can also have explicit durations. These durations can include classical expressions of stretch variables. Qiskit SDK (as of July 2025 through qiskit-qasm3-import v0.6.0) does not support parsing declarations of type duration or type stretch from OpenQASM 3 files. Hardware has limited support for durations including stretch.
  1. Circuits must be transpiled to the backend ISA to run on IBM hardware. This precludes custom gate definitions and higher-level constructs like gate modifiers (such as inv @) from being valid for execution on hardware verbatim, but the transpile process resolves them into valid ISA circuits. Qiskit SDK (as of July 2025, through qiskit-qasm3-import v0.6.0) will eagerly evaluate gate modifiers during the parse, so these will not be evident in the resulting QuantumCircuit, potentially at a runtime cost.
  1. Qiskit SDK can represent structured control flow and export this to OpenQASM 3. The continue and break statements can technically be represented by Qiskit, but are not well supported even within Qiskit SDK. for loops in Qiskit v2.1.0 are not well supported. Nested control flow (such as an if inside another if, or an else if statement) is not eligible for execution on hardware.
  1. Qiskit SDK supports declaring any supported classical type as an input variable on the circuit. Such variables are not currently eligible for execution on hardware, and cannot be loaded by the Qiskit OpenQASM 3 importer. Unbound Parameter objects present in the QuantumCircuit are exported as input float[64] variables. Certain runtime configuration options can enable executing such circuits on some backends.

Next steps

Recommendations