deltakit.decode.analysis.DecoderManager#

class deltakit.decode.analysis.DecoderManager(number_of_observables: int, reporters: list[BaseReporter] | None = None, metadata: dict[str, Any] | None = None, batch_size: int = 10000)#

Bases: ABC

Class for the abstract DecoderManger, objects that manage the running of a decoder for multiple shots, whilst reporting on the failure rate and running other reporters.

Generally this class contains all the information to generate errors, convert to syndromes, decode the result and work out if the decoding was a success. Along with support for reporters to log different types of analysis throughout.

Parameters:
  • reporters (Optional[List[BaseReporter]], optional) – Optional list of reporters to run alongside the decoder, by default None.

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

  • reporters – Optional list of reporters to run alongside the decoder, by default None.

  • metadata – Optional metadata to associate with this decoder manager, by default None.

  • batch_size (int) – The size of batches to run decoding experiments on, by default 10,000.

  • number_of_observables (int) – The number of observables to track decoding statistics on, by default 1 which defines the experiment shot/fail counters.

Methods#

DecoderManager.clear_pool_manager

Configure pool workers to state of this decoder manager.

DecoderManager.configure_pool

Configure pool workers to state of this decoder manager.

DecoderManager.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.

DecoderManager.reset

Reset all reporters and their aggregations.

DecoderManager.run_batch_shots

Run multiple shots of decoding.

DecoderManager.run_batch_shots_parallel

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

DecoderManager.run_single_shot

Run a single shot of decoding.