4

I am interested in using QASM 3.0 after reading it's documentation and seeing it's examples 1. However, I see that in IBM Quantum Experience QASM 3.0 is not supported yet. Is there any way I can run QASM 3.0 code locally or by a customized Qiskit install? Also is QASM 3.0 still in active development and is there a timeline? Long story short I feel like there is documentation I am just missing/not finding.

Ryan
  • 41
  • 1

1 Answers1

3

OpenQASM 3 is under active developement (as in July 2022), with several working groups that are adding new features regularly.

I am not aware of a timeframe, but you can ask in the #open-qasm channel in the Qiskit Slack and watch the recordings on the OpenQASM 3 TSC Meeting (links in the same slack channel).

At the moment (July 2022), Qiskit support for OpenQASM3 is limited. It does not have an importer (OpenQASM3 -> Qiskit) but it has some sopport for exporting (Qiskit -> OpenQASM3). For example:

from qiskit import qasm3, QuantumCircuit

qc = QuantumCircuit(2,1) qc.h(0) qc.cx(0, 1) qc.measure(0,0) qc.x(1).c_if(0, 0)

print(qasm3.dumps(qc))

OPENQASM 3;
include "stdgates.inc";
bit[1] c;
qubit[2] _all_qubits;
let q = _all_qubits[0:1];
h q[0];
cx q[0], q[1];
c[0] = measure q[0];
if (c[0] == 0) {
  x q[1];
}
luciano
  • 6,084
  • 1
  • 13
  • 34