deltakit.explorer.Client.decode#
- Client.decode(detectors: DetectionEvents, observables: ObservableFlips, decoder: Decoder, noisy_stim_circuit: str | Circuit, leakage_flags: LeakageFlags | None = None) DecodingResult#
Accepts detectors, observables and a stim circuit with integrated noise and returns decoding results for a requested decoder.
- Parameters:
detectors (DetectionEvents) – Syndrome data object.
observables (ObservableFlips) – Observables data.
decoder (Decoder) –
Definition of decoder and its features.
MWPM for Minimum-Weight Perfect Matching (https://arxiv.org/abs/2303.15933),
CC for Collision Clustering (https://arxiv.org/abs/2309.05558), or
BELIEF_MATCHING for Belief Matching (https://arxiv.org/abs/2203.04948).
BP_OSD for Belief Propagation - Ordered Statistics Decoding (BP-OSD) (https://quantum-journal.org/papers/q-2021-11-22-585/),
AC for Ambiguity Clustering (https://arxiv.org/abs/2406.14527).
LCD for Local Clustering Decoder (https://arxiv.org/abs/2411.10343).
noisy_stim_circuit (str | stim.Circuit) – STIM circuit with defined noise terms. Used to derive detector error model.
leakage_flags (Optional[LeakageFlags]) – Leakage information may be used by Local Clustering Decoder (LCD) to improve decoding quality.
- Returns:
Server decoding response.
- Return type:
Examples
Decoding simulated data:
measurements, leakage = client.simulate_stim_circuit( stim_circuit=noisy_circuit, shots=10000, ) detectors, observables = measurements.to_detectors_and_observables( stim_circuit=noisy_circuit, ) decoding_result = client.decode( detectors=detectors, observables=observables, decoder=types.Decoder(types.DecoderType.AC), noisy_stim_circuit=noisy_circuit, )