QIR-QIS
A compiler that validates and translates QIR (Quantum Intermediate Representation) to Quantinuum QIS (Quantum Instruction Set). This tool enables quantum programs written in QIR to run on Quantinuum's quantum computing systems.
Features
- QIR Validation: Validates QIR bitcode for correctness and spec compliance
- QIS Translation: Compiles QIR to Quantinuum's native QIS instruction set
- Python & Rust API: Use as a Rust library or Python package
- CLI Tool: Command-line interface for quick compilation
See qtm-qir-reference.md for details on supported QIR features and their mapping to Quantinuum QIS.
Installation
From Source (Rust)
Requirements:
- Rust >= 1.91.0
- LLVM 21
# Point llvm-sys to your LLVM 21 installation
export LLVM_SYS_211_PREFIX=/path/to/llvm21
cargo build --release
The compiled binary will be available at target/release/qir-qis.
Python Package
Requirements:
- Python >= 3.10, < 3.15
- uv (recommended) or pip
Available pre-built wheels:
- Linux: x86_64 (manylinux_2_28), aarch64 (manylinux_2_28)
- macOS: x86_64, arm64 (Apple Silicon)
- Windows: x86_64
All wheels support Python 3.10+ using the stable ABI (abi3).
# Using uv (recommended)
uv pip install qir-qis
# Using pip
pip install qir-qis
Usage
Command Line
Compile a QIR LLVM IR file to QIS bitcode:
# Basic usage
qir-qis input.ll
# With custom optimization level
qir-qis -O 3 input.ll
# Specify target architecture
qir-qis -t x86-64 input.ll
# Or using cargo
cargo run -- input.ll
This generates input.qis.bc containing the compiled QIS bitcode.
On Windows, the default mode remains conservative: -O 0 -t native. Optimized
conversion requires requesting optimization (for example, -O 1) and is
supported only with -t x86-64; other optimized target combinations still fail
fast to avoid known unstable LLVM 21 paths.
Python API
See examples/python_api.py for a complete working example.
uv run examples/python_api.py
For a more comprehensive example with quantum simulation, see main.py.
Rust API
See examples/rust_api.rs for a complete working example.
cargo run --example rust_api
To keep untrusted entry-point metadata from driving effectively unbounded
compiler allocations, validation and translation accept at most 65,535
statically declared qubits and 65,535 statically declared results. The Rust
constants MAX_STATIC_QUBITS and MAX_STATIC_RESULTS expose these limits.
Platform Notes
Windows support is functional, but a few LLVM integration paths still differ from Linux and macOS:
- Optimized conversion on Windows is currently supported only when optimization is requested (for example,
-O 1) with-t x86-64; other optimized target combinations fail fast instead of entering known unstable LLVM paths. - LLVM verifier failures return a generic error on Windows instead of the full verifier message.
- Native target codegen on Windows uses conservative CPU settings instead of host CPU feature detection.
-O0optimization on Windows is a validation-only fast path and does not rewrite the module triple.
These limitations are implementation details of the current LLVM/Inkwell integration rather than QIR feature differences.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for:
- How to report issues and submit pull requests
- Coding standards and commit message format
- Development workflow and testing requirements
Development setup, test commands, and LLVM upgrade guidance live in DEVELOPMENT.md. Release notes are available in CHANGELOG.md.
License
Apache-2.0
Copyright Quantinuum
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qir_qis-0.1.11-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: qir_qis-0.1.11-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 20.1 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181d371c9fbc5091cedceaba156887f454def5bf35d02fab60f88b09a598e513
|
|
| MD5 |
6cd66cc5436327c68433466fc391035b
|
|
| BLAKE2b-256 |
7ff2fbdfd972df32041dae00796ab31df29d1cc1b3424e5b3a5f64c025f9aa8f
|
Provenance
The following attestation bundles were made for qir_qis-0.1.11-cp310-abi3-win_amd64.whl:
Publisher:
wheels-release.yml on Quantinuum/qir-qis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qir_qis-0.1.11-cp310-abi3-win_amd64.whl -
Subject digest:
181d371c9fbc5091cedceaba156887f454def5bf35d02fab60f88b09a598e513 - Sigstore transparency entry: 2678349885
- Sigstore integration time:
-
Permalink:
Quantinuum/qir-qis@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels-release.yml@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qir_qis-0.1.11-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qir_qis-0.1.11-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 30.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61444817dee4754b2c29c184dd9bc364278d0b16b6e552ae2ba24f18c9801655
|
|
| MD5 |
321051f51a3f0861bd9e43a4b094ac96
|
|
| BLAKE2b-256 |
c131a84480182f7185c3706a3c6db357f2e23dc6df6d4e8ad53061ed2cd6f297
|
Provenance
The following attestation bundles were made for qir_qis-0.1.11-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
wheels-release.yml on Quantinuum/qir-qis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qir_qis-0.1.11-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
61444817dee4754b2c29c184dd9bc364278d0b16b6e552ae2ba24f18c9801655 - Sigstore transparency entry: 2678350228
- Sigstore integration time:
-
Permalink:
Quantinuum/qir-qis@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels-release.yml@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qir_qis-0.1.11-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: qir_qis-0.1.11-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 29.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fe323b1f42d7d89a1bb0ae79d3f602de6b8154ceeb8a612be845ba3d36f545b
|
|
| MD5 |
655c43fe3a088d61bb8c89cb73d1ba84
|
|
| BLAKE2b-256 |
b83ec00eb922a188fce3717ed1e2125d526b9ae5a249aa26753c8a5abbf363e7
|
Provenance
The following attestation bundles were made for qir_qis-0.1.11-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
wheels-release.yml on Quantinuum/qir-qis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qir_qis-0.1.11-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
5fe323b1f42d7d89a1bb0ae79d3f602de6b8154ceeb8a612be845ba3d36f545b - Sigstore transparency entry: 2678349976
- Sigstore integration time:
-
Permalink:
Quantinuum/qir-qis@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels-release.yml@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qir_qis-0.1.11-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: qir_qis-0.1.11-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 21.0 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd3620d169a7947ff4331796cee1b44920a70a2f90ca24969a1f3ed38b7703c4
|
|
| MD5 |
2216fbe4d08130a9fcef20a240ffcf23
|
|
| BLAKE2b-256 |
386da0963f5fc74813ed123783689791ae9a6ea36d1f576a20370050e6bc395f
|
Provenance
The following attestation bundles were made for qir_qis-0.1.11-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels-release.yml on Quantinuum/qir-qis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qir_qis-0.1.11-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
cd3620d169a7947ff4331796cee1b44920a70a2f90ca24969a1f3ed38b7703c4 - Sigstore transparency entry: 2678350151
- Sigstore integration time:
-
Permalink:
Quantinuum/qir-qis@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels-release.yml@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qir_qis-0.1.11-cp310-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: qir_qis-0.1.11-cp310-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.10+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f77231fdc6f5a18b2676ffccfaef295cf5736116de056ca446e2a79578ab244
|
|
| MD5 |
3bfb9b3612138da72fa920e92637c0fa
|
|
| BLAKE2b-256 |
2e478151819751fcee4d399064ae17de65b02ca59add57a1816a6b76710f52aa
|
Provenance
The following attestation bundles were made for qir_qis-0.1.11-cp310-abi3-macosx_10_9_x86_64.whl:
Publisher:
wheels-release.yml on Quantinuum/qir-qis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qir_qis-0.1.11-cp310-abi3-macosx_10_9_x86_64.whl -
Subject digest:
4f77231fdc6f5a18b2676ffccfaef295cf5736116de056ca446e2a79578ab244 - Sigstore transparency entry: 2678350089
- Sigstore integration time:
-
Permalink:
Quantinuum/qir-qis@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels-release.yml@744b0fa2065f6c4e4d73600029b5d3d5c0fe9d01 -
Trigger Event:
push
-
Statement type: