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.

Release files for qodec 0.2.1

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.1
File Size Uploaded
qodec-0.2.1.tar.gz 429.7 kB Details

Built distributions (wheels)

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

Total release size: 26.3 MB

Release files / qodec-0.2.1.tar.gz

Download URL qodec-0.2.1.tar.gz
Size 429.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c15d8a22a46445e1e9e7bec10a957503e219cb630933bf59aea44337e30b4fc
BLAKE2b-256 checksum
How to use checksums
f0bea572610579970e3a733b7cdc23a269332846fdd138f82f3b73c6ff681c08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
7b0666b3aa4ef744c7c91e270df403c0ac488dc5d5120e8a1d0eed4fd6552835
BLAKE2b-256 checksum
How to use checksums
cfd217f8331dc0b10d1e509924eec4eefba37757d7065066e8cef2e960789a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
38c0d7bfb310de83e7ab86985ff65de089331c749f7cd761ff8f5940e0759f4d
BLAKE2b-256 checksum
How to use checksums
1205fcd5fa5efb7388692673f8aace26177509c7a8a3c7657c281fba48ce3a39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
44fd91c488ad1e9f7e181d83281bf96e7c78f31feddb3bd4cdcc3168d7d001ae
BLAKE2b-256 checksum
How to use checksums
29a6c31b04c2d30affe6ea1ab85e0b088eda97b8a99d8b3b538cd2e6a6f77bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
edded47c379feefab00cdbccc8a3cc928cf1ea8da004f11242f4d76288c29a3e
BLAKE2b-256 checksum
How to use checksums
0ca8bc5d417d80dc2d3624cf0f796390e7eae48ae0657948bd9cb619ebff1382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
0fe86320ed3896d39d1982721a88ee3e13408a453fa14bb06630955e895016d0
BLAKE2b-256 checksum
How to use checksums
7a5b9a02fe65aeba8f21d50958024b2d52bac40f4ddecfa6b9f1cca5b1c821f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
3ff252a7e6b56d2432c52ff570b4794721fdcd634533398a201f47f890c6e6fb
BLAKE2b-256 checksum
How to use checksums
73bc5ef3ec15adfed29f842b54045cd266c8b80d764c9e936fb7474a7602c6f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
95bcf6d57f5e2369d71284bca5aaae84309fc245b232b7fb82eac720acd21ee4
BLAKE2b-256 checksum
How to use checksums
8276076cb83e9ff1cd12ff7de8a30f88df394eb6d7ad6ac206ca3b6e7415934e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
be875888266998886c49bf6a10af508f9abbcd191c38000a170980319d2162e8
BLAKE2b-256 checksum
How to use checksums
686d283b02b6614c8d6e0f0d965925460950a20f83fc9519ee1876d07c429c72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
7da96a58312c4a96ad9b0072035298aff2aa049eb85e3ef98e12ba05f168a4cc
BLAKE2b-256 checksum
How to use checksums
a21a4b47981d94f5cbfb7c93493c63e91e286504e0b006824cb6568a249105e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
fadb117d815817f3de256afe1ca27dd73f1d3aa5fa2fefd15acd31f3a2264ac2
BLAKE2b-256 checksum
How to use checksums
f0d17dfe02d0bf3a15417fe8efa9f6e38ac61d8c66e982297ddbf78edfddfb7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
433b2bf3d44a53a0be2fdccc5b44df1011f0fcb6d30840705563cfb7bca4e200
BLAKE2b-256 checksum
How to use checksums
d47655d42b0cda089c29c8fce382d2752be8d87de81a710f5a621c5d47fbfbf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
382e0b8d03351e5c709cc33e69c285e4ef1cc32649f796d0fab10df16d2bfcfe
BLAKE2b-256 checksum
How to use checksums
5a57e698f399f48651bdb82af1522cbf4878bf834f5e5f2f2a790e66ce5a2550
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

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

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

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

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

Download URL qodec-0.2.1-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
a565a190a89c91b607c941ee16894dc073e613c74a09bab2eae51d9ce067cdc8
BLAKE2b-256 checksum
How to use checksums
af6f9354752e1d7484fbd22759348c3270aa703ef3ae011a41f92a164d16cb48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
072c0e79030bb55021ca21266ffd33d19b5dc7ad7514e28a5d50f53b028ac2eb
BLAKE2b-256 checksum
How to use checksums
75ea34a782325ce76f56763073c56dd790a3af38f11acddc823a196ff6ecb6ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
cd1c67ee566e62b1a622ace0aae09e45b7af724ba3fc6a7abf1ecc64b49c7335
BLAKE2b-256 checksum
How to use checksums
cbc06afa9c990a6eed985307885db8a90826ad17853c943d75965b2566b7ddd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

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

Download URL qodec-0.2.1-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
5ad775df0ce94121bb49b29258ff83cf5a5c774052a4b2329b10a1ef9e4b6078
BLAKE2b-256 checksum
How to use checksums
5ff7d98dbb308bf107415085e2e524ae07c114635c7d807080222067b5ef8a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release history Release notifications | RSS feed

This release

0.2.1 This release

19 release files

0.2.0

7 release files

0.1.0

7 release files

0.0.0

2 release files

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