You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since a {py:class}`~mqt.core.ir.QuantumComputation` can be imported from and exported to an OpenQASM 3.0 (or OpenQASM 2.0) string, any library that can work with OpenQASM is easy to use in conjunction with the {py:class}`~mqt.core.ir.QuantumComputation` class.
303
+
### OpenQASM
304
304
305
-
In addition, `mqt-core` can import [Qiskit](https://qiskit.org/) {py:class}`~qiskit.circuit.QuantumCircuit` objects directly.
305
+
OpenQASM is a widely used format for representing quantum circuits.
306
+
Its latest version, [OpenQASM 3](https://openqasm.com/index.html), is a powerful language that can express a wide range of quantum circuits.
307
+
MQT Core supports the full functionality of OpenQASM 2.0 (including classically controlled operations) and a growing subset of OpenQASM 3.
306
308
307
309
```{code-cell} ipython3
308
-
from qiskit import QuantumCircuit
310
+
from mqt.core.ir import QuantumComputation
309
311
310
-
from mqt.core.plugins.qiskit import qiskit_to_mqt
312
+
qasm_str = """
313
+
OPENQASM 3.0;
314
+
include "stdgates.inc";
315
+
qubit[3] q;
316
+
h q[0];
317
+
cx q[0], q[1];
318
+
cx q[0], q[2];
319
+
"""
320
+
321
+
qc = QuantumComputation.from_qasm_str(qasm_str)
322
+
323
+
print(qc)
324
+
```
325
+
326
+
### Qiskit
327
+
328
+
In addition to OpenQASM, `mqt-core` can natively import [Qiskit](https://qiskit.org/) {py:class}`~qiskit.circuit.QuantumCircuit` objects.
0 commit comments