pygsti.evotypes.evotype
Module Contents
Classes
The base class for all other evotype classes. |
- class pygsti.evotypes.evotype.Evotype(name, prefer_dense_reps=False)
Bases:
object
The base class for all other evotype classes.
Provides an interface for creating representations. The create_* methods specify an API used by the operation classes so they can create the representation they need.
Parameters
- namestr
The (module) name of the evolution type
- prefer_dense_repsbool, optional
Whether the dense representation provided by this evolution type should be preferred over more specific types, such as those for composed, embedded, and exponentiated operations. Most often this is set to True when using a
MatrixForwardSimulator
in order to get a performance gain.
- property minimal_space
- default_evotype = 'None'
- name
- module
- prefer_dense_reps = 'False'
- classmethod cast(obj, default_prefer_dense_reps=None, state_space=None)
Cast the specified object to an Evotype with options for default Evotype handling.
Parameters
- objEvotype or str
Object to cast to an Evotype. If already an Evotype the object is simply returned. Otherwise if a string we attempt to cast it to a recognized evotype option. If the string “default” is passed in then we determine the type of evotype used in conjunction with the two optional kwargs below.
- default_prefer_dense_repsNone or bool, optional (default None)
Flag to indicate preference for dense representation types when casting a string. If None then there is no preference and this will be determined by the optional state_space kwarg, if present. Otherwise if a boolean value this selection overrides any logic based on the state space.
- state_spaceStateSpace, optional (default None)
If not None then the dimension of the state space is used to determine whether or not to prefer the use of dense representation types when not already specified by the default_prefer_dense_reps kwarg.
Returns
Evotype
- minimal_dim(state_space)
- supported_reptypes()
- supports(reptype)
- create_dense_superop_rep(mx, super_basis, state_space)
- create_dense_unitary_rep(mx, super_basis, state_space)
- create_composed_rep(factor_op_reps, state_space)
- create_embedded_rep(state_space, targetLabels, embedded_rep)
- create_experrorgen_rep(errorgen_rep)
- create_identitypluserrorgen_rep(errorgen_rep)
- create_stochastic_rep(stochastic_basis, basis, initial_rates, seed_or_state, state_space)
- create_kraus_rep(basis, kraus_reps, state_space)
- create_sum_rep(factor_reps, state_space)
- create_clifford_rep(unitarymx, symplecticrep, super_basis, state_space)
- create_repeated_rep(rep_to_repeat, num_repetitions, state_space)
- create_standard_rep(standard_name, super_basis, state_space)
- create_sparse_rep(data, indices, indptr, state_space)
- create_lindblad_errorgen_rep(lindblad_coefficient_blocks, state_space)
- create_dense_state_rep(vec, super_basis, state_space)
- create_pure_state_rep(purevec, super_basis, state_space)
- create_computational_state_rep(zvals, super_basis, state_space)
- create_composed_state_rep(state_rep, op_rep, state_space)
- create_tensorproduct_state_rep(factor_state_reps, state_space)
- create_conjugatedstate_effect_rep(state_rep)
- create_computational_effect_rep(zvals, super_basis, state_space)
- create_tensorproduct_effect_rep(povm_factors, effect_labels, state_space)
- create_composed_effect_rep(errmap_rep, effect_rep, errmap_name, state_space)
- create_composed_povm_rep(errmap_rep, base_povm_rep, state_space)
- create_computational_povm_rep(nqubits, qubit_filter)
- create_term_rep(coeff, mag, logmag, pre_state, post_state, pre_effect, post_effect, pre_ops, post_ops)
- create_direct_term_rep(coeff, mag, logmag, pre_state, post_state, pre_effect, post_effect, pre_ops, post_ops)
- conjugate_state_term_rep(term_rep)
Turns a state term => effect term via conjugation of the state