Skip to main content

qodec: Python bindings

Python bindings for the Rust qodec model. See the usage and API documentation, the shared model, and the YAML representation.

Build and install from source

Use Python 3.11 or newer, a Rust toolchain, and a C compiler/linker. Start in the qodec directory inside a qdk-ec source checkout, the folder containing qodec's Cargo.toml, examples/, and tools/.

Activate the Python environment you intend to use, then run:

python -m pip install maturin
cd bindings/python
python -m maturin develop --release --extras parsers
cd ../..

The optional parsers extra currently installs Stim. Omit --extras parsers when working only with YAML or a custom parser; this build does not require an existing qodec release on PyPI. The Stim adapter registers on import when Stim is available, so restart a running Python process after installing the extra. Other languages supply a parser with qodec.register(custom_parser, format="my-format"); see Source formats. Use circuit.calls(parser=...) for a one-call override.

This is an editable development installation. To check a regular installation, build a wheel and install it into a separate environment:

python -m maturin build --release --manifest-path bindings/python/Cargo.toml --out target/wheels
python tools/check_wheel.py target/wheels

Use an output directory containing only the wheel you intend to test. The check creates a temporary environment, installs the wheel without optional dependencies, and checks imports and a load/save round trip outside the checkout. It runs on Windows, macOS, and Linux. The wheel installs the model, not the repository's examples or the QDK audit engine. The project README explains how to obtain example data outside a checkout.

Build and test the documentation

The .pyi files are canonical for Python signatures and API prose. Sphinx AutoAPI reads them to generate the API pages; edit the stubs, not the generated pages.

Documentation requires Python 3.11 or newer, the installed bindings, and the parsers extra for circuit examples. From the qodec directory, in that environment:

python -m pip install -r bindings/python/docs/requirements.txt
python -m sphinx -W --keep-going -b html bindings/python/docs target/python-docs/html
python -m sphinx -W --keep-going -b doctest bindings/python/docs target/python-docs/doctest
python bindings/python/docs/test_docs.py

Open target/python-docs/html/index.html for the built documentation. See Contributing for shared documentation guidelines.

Metadata

Release files for qodec 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qodec 0.2.2
File Size Uploaded Provenance Actions
qodec-0.2.2.tar.gz 439.9 kB Without provenance Details for qodec-0.2.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qodec 0.2.2
File Actions
qodec-0.2.2-cp315-abi3.abi3t-win_arm64.whl CPython 3.15 abi3, abi3t Windows ARM64 Details for qodec-0.2.2-cp315-abi3.abi3t-win_arm64.whl
qodec-0.2.2-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3t, abi3 Windows x86-64 Details for qodec-0.2.2-cp315-abi3.abi3t-win_amd64.whl
qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ x86-64 Details for qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3t, abi3 Linux glibc 2.28+ ARM64 Details for qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
qodec-0.2.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl CPython 3.15 abi3, abi3t macOS 11.0+ ARM64 Details for qodec-0.2.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl
qodec-0.2.2-cp315-abi3.abi3t-macosx_10_12_x86_64.whl CPython 3.15 abi3, abi3t macOS 10.12+ x86-64 Details for qodec-0.2.2-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
qodec-0.2.2-cp314-cp314t-win_arm64.whl CPython 3.14 CPython 3.14 free-threading Windows ARM64 Details for qodec-0.2.2-cp314-cp314t-win_arm64.whl
qodec-0.2.2-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for qodec-0.2.2-cp314-cp314t-win_amd64.whl
qodec-0.2.2-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details for qodec-0.2.2-cp314-cp314t-manylinux_2_28_x86_64.whl
qodec-0.2.2-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details for qodec-0.2.2-cp314-cp314t-manylinux_2_28_aarch64.whl
qodec-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for qodec-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl
qodec-0.2.2-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details for qodec-0.2.2-cp314-cp314t-macosx_10_12_x86_64.whl
qodec-0.2.2-cp311-abi3-win_arm64.whl CPython 3.11 abi3 Windows ARM64 Details for qodec-0.2.2-cp311-abi3-win_arm64.whl
qodec-0.2.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for qodec-0.2.2-cp311-abi3-win_amd64.whl
qodec-0.2.2-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for qodec-0.2.2-cp311-abi3-manylinux_2_28_x86_64.whl
qodec-0.2.2-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for qodec-0.2.2-cp311-abi3-manylinux_2_28_aarch64.whl
qodec-0.2.2-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for qodec-0.2.2-cp311-abi3-macosx_11_0_arm64.whl
qodec-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for qodec-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 26.4 MB

Release files / qodec-0.2.2.tar.gz

Download URL qodec-0.2.2.tar.gz
Size 439.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7c1682873dbcc84eb952d0b8c4029a012a766ca3c8cdf8a8732da525f9502298
BLAKE2b-256 checksum
How to use checksums
a6fc7a3eb9129e53fa7fe21c3dbf16fad67bda31adb3ae04ad0ab2fb837b695a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-win_arm64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-win_arm64.whl
Size 1.5 MB
Tags CPython 3.15 Windows ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
8ed07f883043577952dbd1b2c5b877f3345a7a4a5d5880b0be77e43e36aab7d7
BLAKE2b-256 checksum
How to use checksums
d21ad9a8ebfb7e3407286242346fa46f2a320ec50e7ad5d74b9fa5191cbfb4ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-win_amd64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-win_amd64.whl
Size 1.6 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
aa79c4020027b98cf3bdea5fbce54381c752c866b3dca5477fe3c60efa1ecc07
BLAKE2b-256 checksum
How to use checksums
cf17d3cc3ceaae6ba663e0f6b6a61e4a5abbad72ad5e12c3fdec3af6712af9f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
f9679d7e086d4e5d7be8d286692cbbe5c09d8e3d1b3772d1ba8980eacda76368
BLAKE2b-256 checksum
How to use checksums
704ce06d29a2bf06e04b1ea537a930baccfcc3672670e9427453615199b16e26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
cd1b13a32fd90a7cec0b04438a37e5423c23a2919702d733a4f8f9c0a08ee94a
BLAKE2b-256 checksum
How to use checksums
40c79a4c45fdd2a0ce323e032a7a57a241eafced26e75403d2227b05e17dd04c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
47b8606069c16b3fb05d5d539e474688c1cd13fe8f9794887f2473497288a632
BLAKE2b-256 checksum
How to use checksums
3674a389149371d0e0de9e212234ef02f3ffbb851d22946325001b9d84b27f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp315-abi3.abi3t-macosx_10_12_x86_64.whl

Download URL qodec-0.2.2-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 1.5 MB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7f1ef8c436bb9ea13d9b8c59d54cffde450a2ca70858f543a548f4a937cbfbb3
BLAKE2b-256 checksum
How to use checksums
48fe91aa65c344d69b5c926fd84d1c1c21d300793a46f69f2cb42f845f75946a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-win_arm64.whl

Download URL qodec-0.2.2-cp314-cp314t-win_arm64.whl
Size 1.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows ARM64
SHA-256 checksum
How to use checksums
968874a103200e228a680ddefb8a726b9d94a998609264c89a8d185b33f4bb03
BLAKE2b-256 checksum
How to use checksums
b2b7904df7dc6be7c4d746ad54d24d1a17b7b9505c9d6695d6e3b9b3c360d541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-win_amd64.whl

Download URL qodec-0.2.2-cp314-cp314t-win_amd64.whl
Size 1.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
293755a54dd5410515470eaee6c444d3cb012cacd1822467ce4e0c1e0d2fd83b
BLAKE2b-256 checksum
How to use checksums
642d7e3a0d5d270cfabd25005c8271b8d34c5b6a1e51a546a9e4ba49576c346a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL qodec-0.2.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
83d0a20a19f8b9d4dd0dfd33e50dc7698738ab4d64983dfca4d808f96b7ca0b0
BLAKE2b-256 checksum
How to use checksums
2afde036374a1c6f9d76a2fae6027d668ebdcc7a852245484421af7215ef6b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL qodec-0.2.2-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
31d1dab6c48d44a6fe6a64a1fe1b62fecb4a7abb7ee525a0c32af2fc8a54076d
BLAKE2b-256 checksum
How to use checksums
60f7dc159a7c7d4eb977c4d17b0e2481f28675de0d4327a8d14e61087622edd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl

Download URL qodec-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f33c250e3064e103542f5edfe2aac12ff25a94dfad2304bc676a4c89b6e7a97a
BLAKE2b-256 checksum
How to use checksums
9218ecad0b34adb5b4ca69dd0abbf1c4bb5d23ee24a8d40aa89b9b6a63cee154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL qodec-0.2.2-cp314-cp314t-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
62785d5fb4b8f0a0965a9acb8f445cad6cc1c20bf363f5347d683064beb83e2d
BLAKE2b-256 checksum
How to use checksums
52cce7eb6e597fd76491d2d2ef9f88a969e41d9408af1a56f96a469b2a3efccc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-win_arm64.whl

Download URL qodec-0.2.2-cp311-abi3-win_arm64.whl
Size 1.5 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
bf728b4e6a59447328e65a4fd6235efb94b2fa0e6c8583a573f1ad7f97bd97b6
BLAKE2b-256 checksum
How to use checksums
a1f257071e4fc563173c476395c369d981cac3b1ea0dd3c929977d62e225abd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-win_amd64.whl

Download URL qodec-0.2.2-cp311-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e025fc682f81b5217b196d9feffaecfb5e0a828845606fdb5cf232661cb52b70
BLAKE2b-256 checksum
How to use checksums
0b54fffdbaa84bbd9206f2b4d5152ecee71b60b4c6c15aeb7cec0f40d196fa28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL qodec-0.2.2-cp311-abi3-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
fc8a9642d33473b1a998e6fb271c4a50be1b20a561309cc3d27cceff363e86f6
BLAKE2b-256 checksum
How to use checksums
0833eb106949d3424f836d815aa990aa19669b88e8bda9965af77a5668f5a70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL qodec-0.2.2-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
900ac496eaff3a1e5e882c150914b834b5024780aa0a77a00d5367e77d28435d
BLAKE2b-256 checksum
How to use checksums
e452d2bb0e0bf73d50f3d4f70f2407ca53afdf762b7fb8d7168960f860606fea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-macosx_11_0_arm64.whl

Download URL qodec-0.2.2-cp311-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
54447b002a4a1f6c76f990e4fd7f3252e65e57f0129cdeaba47881cf718d75ba
BLAKE2b-256 checksum
How to use checksums
b036c7d57838f3791aea1095e011db9f029bafa41ad96d0e4ae1056ff17933e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / qodec-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl

Download URL qodec-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8b73571d86ca0b301e273795eb620e6170a9f6e11d15fd21745b659dde9e2ba8
BLAKE2b-256 checksum
How to use checksums
d125171abdb24d031b8cb997ead190f15d976e0e701a6f076144eb86a358ad53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for qodec 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page