bloqade-decoders
The QEC user interface providing integration with popular open-source decoders for the Bloqade SDK.
By default, the following decoders from the ldpc package and
their corresponding interfaces are immediately available for decoding use upon installation of this package:
- BP+OSD - through
bloqade.decoders.BpOsdDecoder - BP+LSD - through
bloqade.decoders.BpLsdDecoder - Belief Find - through
bloqade.decoders.BeliefFindDecoder
Interfaces also exist for the Hypergraph Minimum-Weight Parity Factor MWPF decoder as well as the Tesseract decoder but the decoders themselves are not included as a dependency and are instead optional.
You can install them separately or specify you would like them included with the bloqade-decoders installation through the
additional instructions below.
Installation
For access to the ldpc-package originating decoders and their respective interfaces, just do the following:
pip install bloqade-decoders
To add the tesseract decoder you can do:
pip install bloqade-decoders[tesseract]
Or for MWPF do:
pip install bloqade-decoders[mwpf]
and for both, you can do:
pip install bloqade-decoders[mwpf, tesseract]
Usage
The decoding interfaces are designed to align as closely as possible with the decoders themselves in terms of arguments. The only major difference is you're expected to pass in a Detector Error Model (DEM) to instantiate the interface.
Furthermore, all decoder interfaces are designed to accept the detector results of a single shot
OR a batch of shots as a numpy ndarray of booleans, with the result being the observable correction (also as an ndarray of booleans).
from bloqade.decoders import BpOsdDecoder
import numpy as np
import stim
dem = stim.DetectorErrorModel("""
error(0.1) D0
error(0.1) D0 D1
error(0.1) D1 L0
""")
# Pretend that circuit was executed twice,
# with two sets of detector results.
syndromes = np.array([[False, False], [False, True]])
# instantiate decoder, passing in desired arguments as you would
# the original decoder interface.
decoder = BpOsdDecoder(dem, bp_method="product_sum")
decoded_observable = decoder.decode(syndromes)
# decoded_observable should give you
# np.array([[False], [True]])
Metadata
Release files for bloqade-decoders 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bloqade_decoders-0.5.2.tar.gz | 138.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bloqade_decoders-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 155.4 kB
Release files / bloqade_decoders-0.5.2.tar.gz
| Download URL | bloqade_decoders-0.5.2.tar.gz |
|---|---|
| Size | 138.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
691e610224ad04babb0fc22547d9be53ee7f38231bb13349f405f8c5dde2cbb9
|
|
BLAKE2b-256 checksum How to use checksums |
ae454e6cdfa242f34f70c6281173ee6ae831e2ebe50e9a253539b76e85769bea
|
| 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 Sep 9, 2026.
Transparency logRelease files / bloqade_decoders-0.5.2-py3-none-any.whl
| Download URL | bloqade_decoders-0.5.2-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29988b76b49da520be329bb32293093ae2653955928e277c83b8ac87a314a9d5
|
|
BLAKE2b-256 checksum How to use checksums |
976d7da5e4d26e5b4559a4c82865de9549efa2295e9ecf49c2fb0fac039e71ed
|
| 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 Sep 9, 2026.
Transparency log