pygsti.layouts.prefixtable.PrefixTableJacobian

pygsti.layouts.prefixtable.PrefixTableJacobian#

class PrefixTableJacobian(circuits_to_evaluate, max_cache_size, parameter_circuit_dependencies=None)#

Bases: object

An ordered list (“table”) of circuits to evaluate, where common prefixes can be cached. Specialized for purposes of jacobian calculations.

Creates a “prefix table” for evaluating a set of circuits.

The table is list of tuples, where each element contains instructions for evaluating a particular operation sequence:

(iDest, iStart, tuple_of_following_items, iCache)

Means that circuit[iDest] = cached_circuit[iStart] + tuple_of_following_items, and that the resulting state should be stored at cache index iCache (for later reference as an iStart value). The ordering of the returned list specifies the evaluation order.

iDest is always in the range [0,len(circuits_to_evaluate)-1], and indexes the result computed for each of the circuits.

Parameters:

circuit_parameter_sensitivities – A map between the circuits in circuits_to_evaluate and the indices of the model parameters to which these circuits depend.

Returns:

A tuple of (table_contents, cache_size) where table_contents is a list of tuples as given above and cache_size is the total size of the state cache used to hold intermediate results.

Return type:

tuple

Methods

__init__(circuits_to_evaluate, max_cache_size)

Creates a "prefix table" for evaluating a set of circuits.