The `qiskit-qasm3-import` library provides functionality to parse OpenQASM 3 strings into Qiskit circuits, enabling interoperability between QASM 3 programs and the Qiskit ecosystem. It is currently at version 0.6.0 and releases new minor versions periodically, typically in conjunction with Qiskit's major releases or to add support for new QASM 3 features.
pip install qiskit-qasm3-importVerified import paths — ran on the pinned version, not inferred.
Parse an OpenQASM 3 string into a Qiskit `QuantumCircuit` object using the `loads` function.
Upgrade to `qiskit-qasm3-import>=0.6.0` when using Qiskit 1.0.0 or later: `pip install --upgrade qiskit-qasm3-import`.
Refer to the official documentation and GitHub repository for the list of currently supported OpenQASM 3 features. For unsupported features, consider simplifying your QASM 3 code or reporting an issue to the project.
Ensure that the input to `qiskit_qasm3_import.loads()` is a valid string containing the OpenQASM 3 code. To load from a file, read the file content into a string first (e.g., `with open('my_circuit.qasm', 'r') as f: qasm_str = f.read()`).