deltakit.decode.MWPMDecoder#

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

Bases: _CloudDecoder

Minimum Weight Perfect 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 MWPM.

  • 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 Minimum Weight Perfect Matching (https://arxiv.org/abs/2303.15933).

Methods#

MWPMDecoder.decode_batch_to_full_correction

Decodes a batch of syndrome bitstrings to full correction.

MWPMDecoder.decode_batch_to_logical_flip

The method decodes the batch of syndromes to boolean values.

MWPMDecoder.decode_to_full_correction

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

MWPMDecoder.decode_to_logical_flip

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