pygsti.models.implicitmodel
Defines the ImplicitOpModel class and supporting functionality.
Module Contents
Classes
A model that stores the building blocks for layer operations and build circuit-layer operations on-demand. |
- class pygsti.models.implicitmodel.ImplicitOpModel(state_space, layer_rules, basis='pp', simulator='auto', evotype='densitymx')
Bases:
pygsti.models.model.OpModel
A model that stores the building blocks for layer operations and build circuit-layer operations on-demand.
An ImplicitOpModel represents a flexible QIP model whereby only the building blocks for layer operations are stored, and custom layer-lizard logic is used to construct layer operations from these blocks on an on-demand basis.
Parameters
- state_spaceStateSpace
The state space for this model.
- layer_rulesLayerRules
The “layer rules” used for constructing operators for circuit layers. This functionality is essential to using this model to simulate ciruits, and is typically supplied by derived classes.
- basisBasis
The basis used for the state space by dense operator representations.
- simulatorForwardSimulator or {“auto”, “matrix”, “map”}
The circuit simulator used to compute any requested probabilities, e.g. from
probs()
or- evotype{“densitymx”, “statevec”, “stabilizer”, “svterm”, “cterm”}
The evolution type of this model, describing how states are represented, allowing compatibility checks with (super)operator objects.
Creates a new OpModel. Rarely used except from derived classes __init__ functions.
- prep_blks
- povm_blks
- operation_blks
- instrument_blks
- factories
- compute_clifford_symplectic_reps(oplabel_filter=None)
Constructs a dictionary of the symplectic representations for all the Clifford gates in this model.
Non-
StaticCliffordOp
gates will be ignored and their entries omitted from the returned dictionary.Parameters
- oplabel_filteriterable, optional
A list, tuple, or set of operation labels whose symplectic representations should be returned (if they exist).
Returns
- dict
keys are operation labels and/or just the root names of gates (without any state space indices/labels). Values are (symplectic_matrix, phase_vector) tuples.