qiskit-qasm3-import
Importer for parsing OpenQASM 3 strings into Qiskit circuits
What it is and what it does
This package provides a parser that converts OpenQASM 3 source code into Qiskit's QuantumCircuit representation. It accepts a complete OpenQASM 3 program as a string and returns a QuantumCircuit object ready for use in Qiskit workflows. The importer handles parametrized gates, gate modifiers, mathematical expressions, control flow (while loops, if/else), qubit aliasing, and measurement operations, as demonstrated in the documentation examples.
The package is designed as a temporary bridge: Qiskit itself optionally wraps this package's parse function as qiskit.qasm3.load and qiskit.qasm3.loads. The authors explicitly note this is a stop-gap solution until technical decisions can be resolved more permanently, meaning the API and feature set may evolve. It depends on qiskit and openqasm3, both of which must be installed.
Use it for:
- Convert existing OpenQASM 3 quantum programs into Qiskit circuits for execution on IBM quantum hardware or simulators
- Import parametrized quantum gate definitions and control flow from OpenQASM 3 files into Qiskit for circuit manipulation
- Migrate quantum algorithm code written in OpenQASM 3 to Qiskit-based workflows
- Parse OpenQASM 3 benchmark or reference circuits for testing and validation in Qiskit
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts OpenQASM 3 programs (as strings) into Qiskit QuantumCircuit objects, enabling quantum circuit construction from OpenQASM 3 source code.
Yes, if you need to work with OpenQASM 3 programs in Qiskit. Install friction is minimal, maintenance is active, and the license is permissive. However, note that the authors explicitly position this as a temporary solution pending technical decisions—expect the API or feature coverage to potentially change. No known vulnerabilities.
Install
qiskit-qasm3-import on PyPI
pip
pip install qiskit-qasm3-importuv
uv add qiskit-qasm3-importpoetry
poetry add qiskit-qasm3-importInstalling qiskit-qasm3-import
Before you install
Low install friction with only two runtime dependencies (qiskit and openqasm3). Package is actively maintained with a recent release (2025-06-10) and an active repository.
License in practice
Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install qiskit-qasm3-import
from qiskit_qasm3_import import parse
program = 'OPENQASM 3.0;\nqubit[2] q;\nmeasure q;'
circuit = parse(program)
Verify before relying
- Whether the package supports all OpenQASM 3 features or only a subset of the specification
- Performance characteristics when parsing large or complex OpenQASM 3 programs
- Stability guarantees: the description notes this is a 'stop-gap measure' pending technical decisions
Package facts
| License | Apache 2.0 License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — qiskit, openqasm3 |
| Maintenance | actively maintained — 430 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 258,455/month — #8,430 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: qiskit_qasm3_import-0.6.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
qiskitQiskit is an open-source SDK for building and…
permissive · top 5,000 on PyPI
openqasm3Provides a reference abstract syntax tree (AST)…
permissive · top 15,000 on PyPI
oqpyOQpy generates OpenQASM 3 and OpenPulse…
permissive · top 15,000 on PyPI
qiskit-ionqQiskit IonQ Provider enables submission of…
permissive · top 15,000 on PyPI
qiskit-terraQiskit Terra provides the core SDK for building…
permissive · top 15,000 on PyPI
openpulseOpenPulse parses and represents pulse grammar…
permissive · top 15,000 on PyPI
qiskit-connectorAutomates IBM Quantum backend connection,…
permissive · top 15,000 on PyPI
qiskit-experimentsQiskit Experiments provides tools for building,…
permissive · top 15,000 on PyPI
qiskit-ibm-runtimeProvides a Python client to access IBM Quantum…
permissive · top 15,000 on PyPI
cirqCirq is a Python framework for writing,…
permissive · top 15,000 on PyPI