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 .
Features supported by Qiskit
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 | โ |
Features supported by Qiskit Runtime
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.