deltakit.decode.BPOSDecoder#

class deltakit.decode.BPOSDecoder(circuit: Circuit | Circuit | str, parameters: dict[str, Any] | None = None, use_experimental_graph_method: bool = False, client: Client | None = None)#

Bases: _CloudDecoder

Belief Propagation - Ordered Statistics Decoder (Cloud-based).

Parameters:
  • circuit (deltakit_circuit.Circuit | stim.Circuit | str) – Circuit to use to construct the decoder.

  • parameters (Optional[dict[str, Any]]) –

    • max_bp_rounds is an integer, and specifies the maximum number of iterations of message passing that should be performed during the execution of belief propagation. It may terminate earlier. By default, this is 20.

    • combination_sweep_order is the depth of the OSD search.

  • use_experimental_graph_method (bool) – If enabled, the decoder tries to extract noise model from the experimental data.

  • client (Optional[Client]) – Client with which to perform operations.

Raises:

NotImplementedError – When a method or attribute other than decode_batch_to_logical_flip is accessed.

Notes

Currently, only decode_batch_to_logical_flip is implemented; this class can be used with deltakit.decode.analysis.run_decoding_on_circuit, but not other decoder workflows.

This cloud-based decoder implements Belief Propagation - Ordered Statistics Decoding (https://quantum-journal.org/papers/q-2021-11-22-585/).

Methods#

BPOSDecoder.decode_batch_to_full_correction

Decodes a batch of syndrome bitstrings to full correction.

BPOSDecoder.decode_batch_to_logical_flip

The method decodes the batch of syndromes to boolean values.

BPOSDecoder.decode_to_full_correction

Decode a given syndrome and return the full correction as a collection of decoding edges.

BPOSDecoder.decode_to_logical_flip

Decode a given syndrome and return a flip boolean for each logical.