Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bloqade_decoders-0.1.0.dev0.tar.gz (135.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bloqade_decoders-0.1.0.dev0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file bloqade_decoders-0.1.0.dev0.tar.gz.

File metadata

  • Download URL: bloqade_decoders-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 135.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bloqade_decoders-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 23a18b4c881f1dab286ef144d6bb93c7154fd57191a4c5828e9b7ee0b83e24a5
MD5 f9e28459d186bedf5a602abc8d78fe11
BLAKE2b-256 34cf0a62934535f07a69149dfa5f597d2330cfa9afa3eb5d5cbea6e730883464

See more details on using hashes here.

Provenance

The following attestation bundles were made for bloqade_decoders-0.1.0.dev0.tar.gz:

Publisher: release.yml on QuEraComputing/bloqade-decoders

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bloqade_decoders-0.1.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for bloqade_decoders-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 da6247fb61fe75db857a9ce4b869c40976fe3b0b21b166eabd067176a9f37c2e
MD5 d0dddd1b71ebb400c3212a4d0c5427a2
BLAKE2b-256 a7b6dd6bd5cada81deed6855a6ab3d74c656a6d6239cfe73d482c7f5d2bffe07

See more details on using hashes here.

Provenance

The following attestation bundles were made for bloqade_decoders-0.1.0.dev0-py3-none-any.whl:

Publisher: release.yml on QuEraComputing/bloqade-decoders

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page