deltakit.decode.analysis.B8DecoderManager#

class deltakit.decode.analysis.B8DecoderManager(syndrome_b8_input: Path | bytes, logical_flip_b8_input: Path | bytes, decoder: GraphDecoder, reporters: list[BaseReporter] | None = None, metadata: dict[str, Any] | None = None)#

Bases: DecoderManager

Decoder manager to run experiments defined by a b8 input for syndromes and target logical flips.

The b8 data formats were proposed by Google Quantum AI and can be read about here: https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8

Parameters:
  • syndrome_b8_file (Path | bytes) – Path to the file containing input syndromes in b8 format or a bytes object that stores b8 data

  • logical_flip_b8_file (Path | bytes) – Path to the file containing input logical flips in b8 format or a bytes object that stores b8 data

  • decoder (GraphDecoder) – Decoder to use for decoding.

  • reporters (Optional[List[BaseReporter]], optional) – Reporters are not supported by this decoder manager, by default None.

  • metadata (Optional[Dict[str, Any]], optional) – Metadata to associate with this experiment, by default None.

Methods#

B8DecoderManager.clear_pool_manager

Configure pool workers to state of this decoder manager.

B8DecoderManager.configure_pool

Configure pool workers to state of this decoder manager.

B8DecoderManager.get_reporter_results

Get aggregated data from the manager's internal state and all available reporters as a dict from string of data identifier to data.

B8DecoderManager.reset

Reset all reporters and their aggregations.

B8DecoderManager.run_batch_shots

Run multiple shots of decoding.

B8DecoderManager.run_batch_shots_parallel

Run batch of shots in parallel using processes number of runners from pool.

B8DecoderManager.run_single_shot

Run a single shot of decoding.