deltakit.decode.BeliefMatchingDecoder#

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

Bases: _CloudDecoder

Belief Matching Decoder (Cloud-based).

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

  • parameters (Optional[dict[str, Any]]) – Not used in Belief Matching.

  • 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 Matching (https://journals.aps.org/prx/abstract/10.1103/PhysRevX.13.031007).

Methods#

BeliefMatchingDecoder.decode_batch_to_full_correction

Decodes a batch of syndrome bitstrings to full correction.

BeliefMatchingDecoder.decode_batch_to_logical_flip

The method decodes the batch of syndromes to boolean values.

BeliefMatchingDecoder.decode_to_full_correction

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

BeliefMatchingDecoder.decode_to_logical_flip

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