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(opens in a new tab) .
Key:
- β Not supported
- π‘ Partial support
- β Supported
Feature | Support | Comments |
---|---|---|
comments | β | |
QASM version string | β | |
include | β | |
unicode names | β | |
qubit | π‘ | Only supports physical qubits, and no arrays. |
bit | β | |
bool | β | |
int | β | Some support for comparisons against integers and casting. |
uint | β | |
float | β | |
angle | β | |
complex | β | |
const | β | |
pi /Ο /tau /Ο /euler /β | β | |
Aliasing: let | β | |
register concatenation | β | |
casting | π‘ | Casting between arrays of bits, int, and bool is supported |
duration | β | |
durationof | β | |
ns /Β΅s /us /ms /s /dt | β | |
stretch | β | |
delay | β | |
barrier | β | |
box | β | |
Built-in U | β | |
gate | β | No support for non-basis gates |
gphase | β | |
ctrl @ / negctrl @ | β | |
inv @ | β | |
pow(k) @ | β | |
reset | β | |
measure | β | |
bit operations | β | |
boolean operations | β | |
arithmetic expressions | β | |
comparisons | β | |
if | β | |
else | β | |
else if | β | |
for loops | π‘ | Discrete sets and negative stepping is not supported. |
while loops | β | |
continue | β | |
break | β | |
return | β | |
extern | π‘ | Only for certain extern subroutines exposed by systems. It is currently not possible for clients to submit these. |
def subroutines (classical) | β | |
def subroutines (quantum) | β | |
input | β | |
output | β |
Next steps
Recommendations
- Learn how to generate OpenQASM code in the Explore gates and circuits with the Quantum Composer(opens in a new tab) tutorial.
- See the OpenQASM 3 Qiskit API reference.
- See the OpenQASM 2 Qiskit API reference.
- Review the Verify your program topic.
- Visit the OpenQASM Live Specification(opens in a new tab).