deltakit.decode.ACDecoder#

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

Bases: _CloudDecoder

Ambiguity Clustering Decoder (Cloud-based).

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

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

    • bp_rounds is an integer, and specifies how many iterations of message passing should be performed during the execution of belief propagation. Note that bp_rounds in AC is different from max_bp_rounds in BP_OSD as early termination is not allowed. Typically, setting this equal to the distance of the code is sufficient. By default, this is 20.

    • ac_kappa_proportion is a float, between 0.0 and 1.0, and reflects the number of error mechanisms, in addition to those used to find a first solution, that should be used to grow clusters to search for additional solutions, expressed as a proportion of the total number of error mechanisms. Setting this number higher results in better accuracy at the cost of slower performance. Start with 0.0 and increase by 0.01 until the desired accuracy is reached. Reasonable values lie between 0 and 0.1, as larger values will typically lead to a significant slow down. By default, this is 0.01.

  • 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 Ambiguity Clustering (https://arxiv.org/abs/2406.14527).

Methods#

ACDecoder.decode_batch_to_full_correction

Decodes a batch of syndrome bitstrings to full correction.

ACDecoder.decode_batch_to_logical_flip

The method decodes the batch of syndromes to boolean values.

ACDecoder.decode_to_full_correction

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

ACDecoder.decode_to_logical_flip

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