pygsti.forwardsims.successfailfwdsim

Defines the OplessForwardSimulator calculator class

Module Contents

Classes

SuccessFailForwardSimulator

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

Parameters

circuitslist

The circuits whose outcome probabilities should be computed.

datasetDataSet

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_allocResourceAllocation

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

array_typestuple, optional

A tuple of string-valued array types. See ForwardSimulator.create_layout().

derivative_dimensionint, 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.

verbosityint or VerbosityPrinter

Determines how much output to send to stdout. 0 means no output, higher integers mean more output.

Returns

CachedCOPALayout