ISA-aware qubit mapping/routing framework tailored to advanced quantum instruction sets, built on canonical two-qubit gate representation.
Project description
🧭 Canopus: Canonical-Optimized Placement Utility Suite for Quantum Compilation
Canopus (Canonical-Optimized Placement Utility Suite) is a qubit mapping/routing framework tailored to advanced quantum ISAs. Its main function is to optimize the layout and routing of qubits on quantum hardware, handling optimal synthesis with diverse ISAs in a unified approach through two-qubit canonical gate representation, providing guidance for hardware-software co-design.
Canopus evokes the name of the second-brightest star in the sky, symbolizing its role as a "navigational" guide for routing qubits through the complex constraints of quantum hardware.
Installation
Prerequisite: monodromy (+ lrslib)
Canopus depends on the monodromy library for Weyl-chamber coverage computation. monodromy is not on PyPI and must be installed manually before pip install canopus-quantum:
pip install git+https://github.com/Pitt-JonesLab/monodromy
monodromy itself needs the lrs binary from lrslib. Platform-specific setup:
macOS
brew install gmp
cd lrslib-073 && make
sudo make install
Ubuntu / Debian
sudo apt update && sudo apt install -y build-essential libgmp-dev
cd lrslib-073 && make
sudo make install
Conda (any OS)
conda install -c conda-forge gmp
cd lrslib-073
make INCLUDEDIR="$CONDA_PREFIX/include" LIBDIR="$CONDA_PREFIX/lib"
make prefix=$HOME/.local install
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
From PyPI (recommended)
pip install canopus-quantum
Pre-compiled wheels are published for Linux and macOS on Python 3.10 – 3.13. No Rust toolchain is required for this path.
The distribution name on PyPI is
canopus-quantum; the import name remainscanopus:import canopus
From source
git clone https://github.com/Youngcius/canopus.git
cd canopus
pip install .
pip install . runs the maturin build backend in an isolated environment, which:
- Compiles the Rust extension (
canopus.utils._accel) for the active Python version, - Packages the Python sources, and
- Installs the resulting wheel into the current environment.
Prerequisite for source builds: a working Rust toolchain. Install via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Usage
More end-to-end examples live under ./examples/:
routing.ipynb— Canopus routing in detailrebasing.ipynb— Optimal ISA rebase (Bgate,√iSWAP, arbitrary)python route_demo.pyto test the routing effect by Sabre and Canopus on a demo circuitpython route_qft.py <n>— Compare Canopus vs Sabre routing on ann-qubit QFTpython rebase_xxx.pyto test the rebase passes for arbitrary ISAs
Package layout
canopus/ # Python package
├── __init__.py
├── backends.py # Backend / ISA / cost-estimator definitions
├── basics.py # CanonicalGate, BGate, SQiSWGate
├── mapping.py # CanopusMapping & SabreMapping transpiler passes
├── synthesis.py # rebase_to_{canonical, sqisw, zzphase, custom, ...}
├── decomposition/ # Two-qubit decomposition kernels
├── extensions/ # Optional integrations (bqskit, ...)
└── utils/
├── _core.py # Pure-Python utilities
├── _accel.cpython-*.so # Rust-compiled accelerator (built by maturin)
└── _accel.pyi # Type stubs for the Rust extension
src/ # Rust source for the accelerator
└── lib.rs # PyO3 bindings
Development
Install the dev extras and build the Rust extension in editable mode:
pip install -e ".[dev]"
poe dev # equivalent to: maturin develop --release
Common tasks (defined in pyproject.toml):
| Command | Description |
|---|---|
poe dev |
Build & install the Rust extension in editable mode |
poe rebuild |
Clean and rebuild from scratch |
poe build |
Build a redistributable wheel into ./target/wheels/ |
poe clean |
Remove every compiled artifact and cache |
poe lint |
ruff check canopus |
poe fmt |
ruff format canopus |
poe fmt-check |
ruff format --check canopus |
poe typecheck |
mypy canopus |
poe test |
pytest |
poe check |
Aggregate gate that CI runs: lint + fmt-check + test |
See CONTRIBUTING.md for the full contribution workflow.
Evaluation artifact
./experiments/ contains the full evaluation suite that accompanies the paper.
Case studies
./experiments/eval_qft/— QFT kernel./experiments/eval_qldpc/— QLDPC stabilizer circuits
Benchmark suite
Evaluation commands are managed via ./experiments/Makefile. First prepare prerequisite files (coupling files, coverage sets, logical-level optimized circuits):
cd experiments && make
Then:
make canopus— evaluate Canopusmake baselines— evaluate baseline compilers (Sabre, TOQM, BQSKit)make sum_result— summarize results once routing evaluation completesmake disp_result— display summarized routing overheads across compilers, topologies, and ISAs
For fine-grained evaluation, you may also run bench_all.py, bench_all_toqm.py, etc. directly.
Citation
If you use Canopus in your work, please cite:
@article{yang2025unifying,
title = {Unifying Qubit Routing Across Diverse Quantum ISAs via Canonical Representation},
author = {Yang, Zhaohui and Zhang, Kai and Tian, Xinyang and Ren, Xiangyu and
Liu, Yingjian and Li, Yunfeng and Ding, Dawei and Chen, Jianxin and Xie, Yuan},
journal = {arXiv preprint arXiv:2511.04608},
year = {2025}
}
License
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 canopus_quantum-0.1.0.tar.gz.
File metadata
- Download URL: canopus_quantum-0.1.0.tar.gz
- Upload date:
- Size: 12.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cfe7f5426d23a3b6f8b49ccdcb1122044e970c574c20d50b23402e32b250c52
|
|
| MD5 |
9f55107e3448e15d6e40281df55ccbc7
|
|
| BLAKE2b-256 |
59241be64c86a947d8a76a67172ab2030c03b648c9914fb7b580a3de37ccac9c
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0.tar.gz:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0.tar.gz -
Subject digest:
7cfe7f5426d23a3b6f8b49ccdcb1122044e970c574c20d50b23402e32b250c52 - Sigstore transparency entry: 1553424045
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 280.5 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3b198c4cdff2d9f694029b93e589e4c2491369fed686c500189ac05de264aee
|
|
| MD5 |
64135bb54b9af21b509ffe05ff942508
|
|
| BLAKE2b-256 |
419983e70b09b73caa87a5ed6545fa6fc5d64f147994dd793e500cbfb6a837f3
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
b3b198c4cdff2d9f694029b93e589e4c2491369fed686c500189ac05de264aee - Sigstore transparency entry: 1553424065
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 250.6 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1fe30355bedcc4aaf4ffb58b9d1fd5e912db5114ade202de5ae4e7e4f34aa81
|
|
| MD5 |
8603c7be989c78361e08e6344ed2f5b8
|
|
| BLAKE2b-256 |
28defe775312db7967dd362ca41ffe774e4070046844ba714e1e4ca1eca8cc23
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
a1fe30355bedcc4aaf4ffb58b9d1fd5e912db5114ade202de5ae4e7e4f34aa81 - Sigstore transparency entry: 1553424079
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 280.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69cf626191c807ecc40b0d9c5578e7f8aa6f73ca6e7e900d1e5d7fce95911c8c
|
|
| MD5 |
6adfe8403c182d162324f9a30e45bf09
|
|
| BLAKE2b-256 |
8ca60d47aa0d9ee4becafacb56e7149d71328b9aae8e6863ab8f9c27f05fe7fc
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
69cf626191c807ecc40b0d9c5578e7f8aa6f73ca6e7e900d1e5d7fce95911c8c - Sigstore transparency entry: 1553424107
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 250.7 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91ed0172f593a9937a2132a6d0683643b7607a55e737950bc370e2cbea40b56
|
|
| MD5 |
7b032220ae3243f61f5f9afb2c7fcad0
|
|
| BLAKE2b-256 |
e250f39aecc48497a2c8b4aab157710b1b070422c41408bda3dfba1fcb3208ec
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
b91ed0172f593a9937a2132a6d0683643b7607a55e737950bc370e2cbea40b56 - Sigstore transparency entry: 1553424097
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 280.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85c718b5d10c13d2c73a0200e5d1d0dc7bc07a23f43b7273b99a3831d025f7bc
|
|
| MD5 |
1f16873f37abb61f978e4ed57168a075
|
|
| BLAKE2b-256 |
bbc59743dd69413c096592f586b54cbc335f7f5c82c75bf2bb3758ce5d15c736
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
85c718b5d10c13d2c73a0200e5d1d0dc7bc07a23f43b7273b99a3831d025f7bc - Sigstore transparency entry: 1553424103
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 252.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8841b35a87423ee1d1a49cabb233b4047a619944a16c09d1ca944229b7f0ead2
|
|
| MD5 |
daddf6ad947e8d020388021ce340bdfc
|
|
| BLAKE2b-256 |
35c65fa2960c28927caf64a612b9d7960214bf8df36dfc320ff509c1077ebbd7
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
8841b35a87423ee1d1a49cabb233b4047a619944a16c09d1ca944229b7f0ead2 - Sigstore transparency entry: 1553424058
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3ddcbfb902c617cc30d247a393af42a6a955f530bebe4b21e77488b46c013eb
|
|
| MD5 |
73d7a382559e8df20f2760cdf5ce15c5
|
|
| BLAKE2b-256 |
9a7d5ad2789abccd338886455ef1e610291fd9ab893b00152e80d0e274b1519c
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
f3ddcbfb902c617cc30d247a393af42a6a955f530bebe4b21e77488b46c013eb - Sigstore transparency entry: 1553424115
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canopus_quantum-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: canopus_quantum-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 252.9 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cae7957de3d8e995a5da6dc1952c3d64935285abc4ef4c247c5eda63bbb99dc
|
|
| MD5 |
cd92ec66b6ea30fcbf801b5ac27e9c7b
|
|
| BLAKE2b-256 |
42884448a0d96b2523b8498efc5cf331e14e9426b88ff4566c9e05e483d5bfa1
|
Provenance
The following attestation bundles were made for canopus_quantum-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:
Publisher:
release.yml on Youngcius/canopus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canopus_quantum-0.1.0-cp310-cp310-macosx_11_0_arm64.whl -
Subject digest:
4cae7957de3d8e995a5da6dc1952c3d64935285abc4ef4c247c5eda63bbb99dc - Sigstore transparency entry: 1553424071
- Sigstore integration time:
-
Permalink:
Youngcius/canopus@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Youngcius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5bfd7c813e225ef0e20446840c6cfdd7f984f728 -
Trigger Event:
workflow_dispatch
-
Statement type: