deltakit.explorer.Client.decode_measurements#
- Client.decode_measurements(measurements: Measurements, decoder: Decoder, ideal_stim_circuit: str | Circuit, noise_model: PhysicalNoiseModel, leakage_flags: LeakageFlags | None = None, sweep_bits: BinaryDataType | None = None) DecodingResult#
Accept raw measurement file and a clean stim circuit and return decoding results with a requested decoder.
- Parameters:
measurements (Measurements) – Measurements object.
decoder (Decoder) –
Predefined decoder object.
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).
ideal_stim_circuit – (str | stim.Circuit): clean stim circuit.
noise_model (PhysicalNoiseModel) – Noise model used to generate a circuit, or a noise model close to hardware, which has generated the measurements data.
leakage_flags (Optional[LeakageFlags]) – Heralded leakage events, if available.
sweep_bits (Optional[BinaryDataType]) – Initialisation bits, if were used in experiments.
- Returns:
server response.
- Return type:
Examples
Decoding using experimental graph method:
decoder = Decoder( decoder_type=DecoderType.MWPM, use_experimental_graph=True ) client.decode_measurements( measurements=measurements, decoder=decoder, ideal_stim_circuit=circuit, noise_model=PhysicalNoiseModel.get_floor_superconducting_noise(), sweep_bits=sweep_bits, )Decoding with AC with additional parameters:
decoder = types.Decoder( decoder_type=types.DecoderType.AC, parallel_jobs=8, parameters={ "decompose_errors": False, "bp_rounds": 99, "ac_kappa_proportion": 0.02, }, ) client.decode_measurements( measurements=measurements, decoder=decoder, ideal_stim_circuit=compiled_circuit, noise_model=noise_model, )