skillfed

qiskit-qasm3-import

Importer for parsing OpenQASM 3 strings into Qiskit circuits

qiskit-qasm3-import v0.6.0 258.5K downloads/30d#8,430 on PyPI27
Permissive license Apache 2.0 License Active released

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-import

uv

uv add qiskit-qasm3-import

poetry

poetry add qiskit-qasm3-import

Installing 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

openqasm 3 to qiskit converterqasm3 circuit importerquantum circuit from openqasmparse openqasm 3 stringsqiskit qasm3 loaderopenqasm 3 parser qiskit
quantum-computingcircuit-conversion

More Scientific/Engineering packages