Decoder related statements and interfaces for Bloqade.
Project description
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]])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 bloqade_decoders-0.5.1.tar.gz.
File metadata
- Download URL: bloqade_decoders-0.5.1.tar.gz
- Upload date:
- Size: 137.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
142aff76c98dfb698ce4a13e0c5987614f5be3f8f540439e10cd064523409a7b
|
|
| MD5 |
9bc29ad011a6e400e6563ee12f437af1
|
|
| BLAKE2b-256 |
fe6b4cc21123a2884486ab69f2f1fa345f7e4a224a598f5c6a2e513eac6088e7
|
Provenance
The following attestation bundles were made for bloqade_decoders-0.5.1.tar.gz:
Publisher:
release.yml on QuEraComputing/bloqade-decoders
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bloqade_decoders-0.5.1.tar.gz -
Subject digest:
142aff76c98dfb698ce4a13e0c5987614f5be3f8f540439e10cd064523409a7b - Sigstore transparency entry: 1030049126
- Sigstore integration time:
-
Permalink:
QuEraComputing/bloqade-decoders@fb7a1aceb820407db07f8989eae4ee27bc29a816 -
Branch / Tag:
refs/tags/list - Owner: https://github.com/QuEraComputing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb7a1aceb820407db07f8989eae4ee27bc29a816 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bloqade_decoders-0.5.1-py3-none-any.whl.
File metadata
- Download URL: bloqade_decoders-0.5.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac58437519160548fd7b8ea8895be3f7d81d1d2097d60c0f3fd5d5442d499bf3
|
|
| MD5 |
d45009db60ee2b5809256de0ea9ae09e
|
|
| BLAKE2b-256 |
1ed3a7f60dacebc1bb03293546849569764698be197fad6b785f08c6276f96f0
|
Provenance
The following attestation bundles were made for bloqade_decoders-0.5.1-py3-none-any.whl:
Publisher:
release.yml on QuEraComputing/bloqade-decoders
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bloqade_decoders-0.5.1-py3-none-any.whl -
Subject digest:
ac58437519160548fd7b8ea8895be3f7d81d1d2097d60c0f3fd5d5442d499bf3 - Sigstore transparency entry: 1030049008
- Sigstore integration time:
-
Permalink:
QuEraComputing/bloqade-decoders@fb7a1aceb820407db07f8989eae4ee27bc29a816 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/QuEraComputing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb7a1aceb820407db07f8989eae4ee27bc29a816 -
Trigger Event:
push
-
Statement type: