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
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 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.
Was this page helpful?
Report a bug or request content on GitHub.