Skip to main content

stabilizer-qec

A surface-code simulator and decoder written in Rust, with Python bindings.

  • Circuits and detector error models in Stim's text formats, and error models built by walking a circuit backwards, identical to Stim's on every circuit checked.
  • Exact minimum-weight matching by sparse blossom, and correlated matching, agreeing with PyMatching shot for shot except for ties.
  • A bit-parallel sampler, 64 shots per machine word, that runs REPEAT blocks without flattening.
  • Raw measurements to detection events, reproducing Google's Willow and Sycamore files bit for bit.
  • Sliding and parallel window decoders for real-time decoding.
  • Belief propagation reproducing the ldpc library's arithmetic bit for bit, and belief-matching equal to the beliefmatching package's.
  • BP+OSD (OSD-0, OSD-E, OSD-CS), whose corrections equal ldpc's BpOsdDecoder's, and IBM's bivariate bicycle codes: the gross code [[144, 12, 12]] and [[72, 12, 6]], with the depth-8 syndrome cycle of Bravyi et al. (Nature 627, 778, 2024).
  • On the gross code, every automorphism's action on the logical qubits, and the gauging measurement of a logical operator as a circuit, its error model equal to Stim's.
  • Stim's whole circuit language (every gate, all three bases, MPP, SPP, correlated and heralded noise, measurement feedback, instruction tags, Pauli-target observables), checked against Stim on random circuits that use every gate.
  • Lattice surgery as single circuits, their error models equal to Stim's: Z⊗Z and X⊗X merges, a logical CNOT, merges in a row, and lines of patches merged at once.
  • A sinter adapter for threshold sweeps, and objects that pickle for multiprocessing.
import stabilizer_qec as sq

circuit = sq.memory_circuit(distance=5, rounds=5, p=0.004)               # a d = 5 SD6 memory
dets, obs = circuit.compile_detector_sampler(seed=1).sample(100_000, separate_observables=True, threads=0)
dem = circuit.detector_error_model(decompose_errors=True)
pred = sq.Matching(dem, enable_correlations=True).decode_batch(dets, threads=0)
print((pred != obs).any(axis=1).mean())                                  # logical error rate

The gross code, decoded by BP+OSD:

gross = sq.BivariateBicycleCode("gross")                                 # [[144, 12, 12]], 12 cycles
c = gross.memory_circuit(12, 0.003)
dets, obs = c.compile_detector_sampler(seed=2).sample(2_000, separate_observables=True)
pred = sq.BpOsd(c.detector_error_model()).decode_batch(dets, threads=0)
print((pred != obs).any(axis=1).mean())                                  # any of the 12 logicals wrong

In sinter's sweeps (pip install "stabilizer-qec[sinter]"):

import sinter
from stabilizer_qec import sinter as sq_sinter

stats = sinter.collect(tasks=tasks, decoders=["sq_matching", "sq_belief_matching", "pymatching"],
                       custom_decoders=sq_sinter.sinter_decoders(), num_workers=8, max_shots=100_000)

The names follow Stim (Circuit, compile_detector_sampler, separate_observables), PyMatching (Matching, decode_batch, enable_correlations) and ldpc (BpDecoder, BpOsdDecoder, error_channel). A seed gives the same shots on any machine and thread count. See the changelog.

The explainer, its figures running the engine in the browser, is at https://qcompiler.jaspersands.com, with a technical report. The source and the full write-up are at https://github.com/Jaspersands/quantum-simulator-qec.

Metadata

Release files for stabilizer-qec 1.4.0

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

Source distribution (sdist)

Source distribution for stabilizer-qec 1.4.0
File Size Uploaded Provenance
stabilizer_qec-1.4.0.tar.gz 359.8 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for stabilizer-qec 1.4.0
File
stabilizer_qec-1.4.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
stabilizer_qec-1.4.0-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
stabilizer_qec-1.4.0-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
stabilizer_qec-1.4.0-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details
stabilizer_qec-1.4.0-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
stabilizer_qec-1.4.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
stabilizer_qec-1.4.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.9 abi3 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details

Total release size: 16.5 MB

Release files / stabilizer_qec-1.4.0.tar.gz

Download URL stabilizer_qec-1.4.0.tar.gz
Size 359.8 kB
Tags Source
SHA-256 checksum
How to use checksums
425ba0de0c9850fc2c11c814bf85fcc263d4a28236f32846554f6981804b698f
BLAKE2b-256 checksum
How to use checksums
c177019d9ae3f100b880775a5d1fa0e512e76343dbc481bf7a3cae1454a8bbdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp314-cp314t-win_amd64.whl

Download URL stabilizer_qec-1.4.0-cp314-cp314t-win_amd64.whl
Size 975.6 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
2e68bb58c87669161ca3931ad41c587d5f8e1c4a8e26025e624cc5a9bfbb2103
BLAKE2b-256 checksum
How to use checksums
813a58914ab93897852beaa6cd7b18b48901e590d790bcff304e424f28669814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL stabilizer_qec-1.4.0-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
4746e06a0073d132bc6a4f4084527324e5c0c0d1cbc16308a0be9f4584728bd7
BLAKE2b-256 checksum
How to use checksums
1452c7f4b6f82c7ff2e60c0a3a5e04b89a7aa29093f52cba8c292e81ee815393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL stabilizer_qec-1.4.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e9ab899aefaf50b7888d351556b39f2d49f08694e5b6596fad880739fad7710f
BLAKE2b-256 checksum
How to use checksums
fefbf77c5968018c5945d7e6a06e84809fd5ebb150394f8f893c25439b827078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL stabilizer_qec-1.4.0-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.0 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0f1527f726cf66f80ef3ed847c4363e218b983b48629e4fe564da17ff3ce5958
BLAKE2b-256 checksum
How to use checksums
e2e5ac88d70c52054ab4b4e75f617757b1389ee081c0cb44a974ae59dfc36a01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-win_arm64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-win_arm64.whl
Size 907.0 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
3e4cbe3cdaef5ee480609067b708518cf2738d75e8189416765c47893f5d6acb
BLAKE2b-256 checksum
How to use checksums
574672c492fffdfe3659ce71f1638866cead2857ef0da9e638eccbc787fe3a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-win_amd64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-win_amd64.whl
Size 994.9 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e202c63f963b0bc391128020d2679e62863032840dde085f3c92897da24ce025
BLAKE2b-256 checksum
How to use checksums
9dbba9c67f24308593ab4da5bde0e01c7461069267fb5056d52c36c66dfdad5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b4760cfafc585cb42fabf4835c4382c560c6568697af200c4e0c5fedee573d59
BLAKE2b-256 checksum
How to use checksums
3f161a6e8fa4596bd3152d03c6d542e935973a9c2b1d137b784b60a1bb5ecf94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 1.6 MB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
39c17fed7a0379c909a0bd0523c78bd25a1ce9569b112c0d1679c0841e9e977e
BLAKE2b-256 checksum
How to use checksums
dab96c84aab2164818229d1364607c0074bf29f5c6d521f26fac151b3c80ab90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1b435c15b7fef397a16d674563993fc0941c0a3b9cccac98ee0fa26845e3336d
BLAKE2b-256 checksum
How to use checksums
7884dfbb24b514e2910ac1c977a712103e958bd6238c730f688fc6a1180f95ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.4 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
d700409b9a30ec86c28b4b229fcd8775c48dc5f1f51d13f8389b987786182571
BLAKE2b-256 checksum
How to use checksums
4a938235a1f92dc301987d93de0bca7dbe109b2e80622b41e132afcd176d5979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / stabilizer_qec-1.4.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL stabilizer_qec-1.4.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.0 MB
Tags CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5fc9699f825c71de4b1bed1a204de2a2ee21ef3a5f72c0a37f79b30f519e7e6a
BLAKE2b-256 checksum
How to use checksums
7f50406841e25d4498dd14617d695eac0cf8462a42ccce0042ac56650769c940
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Security for stabilizer-qec 1.4.0

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.

Full provenance

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for stabilizer_qec-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

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.

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