pyqir
Decision gist · record as of 2026-08-14
Yes, if you are building quantum compiler infrastructure or translation tools that need to emit or consume QIR. No, if you are writing quantum algorithms directly—use a higher-level quantum framework instead. The package is actively maintained, has no known vulnerabilities, and carries permissive licensing, but it is explicitly designed for tool developers, not end users.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; PyQIR 0.12 produces QIR with opaque pointers (LLVM 18+) and major version 2 by default—use 0.11 or earlier for typed pointer output.
- Medium install friction due to compiled wheels for multiple platforms (macOS, Linux, Windows on x86_64 and ARM64); actively maintained with recent releases and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
last release 2026-05-12 (94 days) · last repo commit 2026-08-11 · 82 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 92,693 downloads/mo, #13,433 on PyPI
Alternatives
Verify before relying
pip install pyqir
from pyqir import BasicQisBuilder, SimpleModule
module = SimpleModule("Bell", num_qubits=2, num_results=2)
qis = BasicQisBuilder(module.builder)
qis.h(module.qubits[0])
qis.cx(module.qubits[0], module.qubits[1])
print(module.ir())- Whether the package is suitable for frameworks other than those explicitly mentioned in the description
- Performance characteristics when parsing or generating large QIR programs
- Specific quantum computing platforms or backends that integrate with PyQIR
What it is and what it does
PyQIR is a low-level toolkit for generating and analyzing QIR, a standardized intermediate representation for quantum programs. It is designed as a bridge for code automation and translation tools—not as a framework for direct quantum algorithm development. The package provides builders like BasicQisBuilder and SimpleModule to construct quantum operations (gates, measurements) and emit them as QIR, which can then be parsed, analyzed, or passed to downstream quantum compilers and execution platforms.
The package supports modern Python versions (3.9–3.13) and is distributed as compiled wheels for macOS, Linux, and Windows on both x86_64 and ARM64 architectures. As of version 0.12, it defaults to LLVM opaque pointers and QIR major version 2, though earlier versions are available for typed pointer compatibility. It has no runtime dependencies beyond the Python standard library.
Use it for
- Translate quantum programs from domain-specific languages or frameworks into standardized QIR for cross-platform compilation
- Build QIR generation backends for quantum programming tools and compilers
- Parse and analyze existing QIR code for optimization, validation, or transformation
- Integrate quantum code generation into classical Python automation pipelines
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building quantum compiler infrastructure or translation tools that need to emit or consume QIR.
No, if you are writing quantum algorithms directly—use a higher-level quantum framework instead. The package is actively maintained, has no known vulnerabilities, and carries permissive licensing, but it is explicitly designed for tool developers, not end users.
Install
pyqir on PyPI
Before you install
Medium install friction due to compiled wheels for multiple platforms (macOS, Linux, Windows on x86_64 and ARM64); actively maintained with recent releases and no known vulnerabilities.
Requires Python 3.9 or later; PyQIR 0.12 produces QIR with opaque pointers (LLVM 18+) and major version 2 by default—use 0.11 or earlier for typed pointer output.
License in practice
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install pyqir
from pyqir import BasicQisBuilder, SimpleModule
module = SimpleModule("Bell", num_qubits=2, num_results=2)
qis = BasicQisBuilder(module.builder)
qis.h(module.qubits[0])
qis.cx(module.qubits[0], module.qubits[1])
print(module.ir())
Verify before relying
- Whether the package is suitable for frameworks other than those explicitly mentioned in the description
- Performance characteristics when parsing or generating large QIR programs
- Specific quantum computing platforms or backends that integrate with PyQIR
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 94 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 92,693 / month, #13,433 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Rust |
Evidence: pyqir-0.12.5-cp39-abi3-macosx_10_12_x86_64.whl; pyqir-0.12.5-cp39-abi3-macosx_11_0_arm64.whl; pyqir-0.12.5-cp39-abi3-manylinux_2_34_x86_64.whl; pyqir-0.12.5-cp39-abi3-manylinux_2_38_aarch64.whl; pyqir-0.12.5-cp39-abi3-win_amd64.whl; pyqir-0.12.5-cp39-abi3-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “quantum intermediate representation generation”
- pyqirPyQIR generates, parses, and analyzes QIR (Quantum Intermediate…
- hugrhugr provides a pure-Python implementation of the Hierarchical…
- amazon-braket-schemasProvides serialization, deserialization, and schema definitions for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also qiskit-aer · pypcode · bfi · cirq · pyvex · pytket · amazon-braket-default-simulator · hugr · amazon-braket-sdk · oqpy