Defines the OplessForwardSimulator calculator class

Module Contents



A forward simulator that works with non-distributed CachedCOPALayout layouts.

class pygsti.forwardsims.successfailfwdsim.SuccessFailForwardSimulator(model=None)

Bases: pygsti.forwardsims.forwardsim.CacheForwardSimulator

A forward simulator that works with non-distributed CachedCOPALayout layouts.

This is just a small addition to ForwardSimulator, adding a persistent cache passed to new derived-class-overridable compute routines.

create_layout(self, circuits, dataset=None, resource_alloc=None, array_types=('E',), derivative_dimension=None, verbosity=0)

Constructs an circuit-outcome-probability-array (COPA) layout for circuits and dataset.

  • circuits (list) – The circuits whose outcome probabilities should be computed.

  • dataset (DataSet) – The source of data counts that will be compared to the circuit outcome probabilities. The computed outcome probabilities are limited to those with counts present in dataset.

  • resource_alloc (ResourceAllocation) – A available resources and allocation information. These factors influence how the layout (evaluation strategy) is constructed.

  • array_types (tuple, optional) – A tuple of string-valued array types. See :method:`ForwardSimulator.create_layout`.

  • derivative_dimension (int, optional) – Optionally, the parameter-space dimension used when taking first and second derivatives with respect to the cirucit outcome probabilities. This must be non-None when array_types contains ‘ep’ or ‘epp’ types.

  • verbosity (int or VerbosityPrinter) – Determines how much output to send to stdout. 0 means no output, higher integers mean more output.



_compute_circuit_outcome_probabilities_with_cache(self, array_to_fill, circuit, outcomes, resource_alloc, cache, time=None)
_compute_circuit_outcome_probability_derivatives_with_cache(self, array_to_fill, circuit, outcomes, param_slice, resource_alloc, cache)