pygsti.modelmembers.operations.depolarizeop
The DepolarizeOp class and supporting functionality.
Module Contents
Classes
A depolarizing channel. |
- class pygsti.modelmembers.operations.depolarizeop.DepolarizeOp(state_space, basis='PP', evotype='default', initial_rate=0, seed_or_state=None)
Bases:
pygsti.modelmembers.operations.stochasticop.StochasticNoiseOp
A depolarizing channel.
Parameters
- state_spaceStateSpace, optional
The state space for this operation.
- basisBasis or {‘pp’,’gm’,’qt’}, optional
The basis to use, defining the “principle axes” along which there is stochastic noise. While strictly unnecessary since all complete bases yield the same operator, this affects the underlying
StochasticNoiseOp
and so is given as an option to the user.- evotypeEvotype or str, optional
The evolution type. The special value “default” is equivalent to specifying the value of pygsti.evotypes.Evotype.default_evotype.
- initial_ratefloat, optional
the initial error rate.
- seed_or_statefloat or RandomState, optional
Random seed for RandomState (or directly provided RandomState) for sampling stochastic superoperators with the ‘chp’ evotype.
Initialize a new LinearOperator
- property total_term_magnitude_deriv
The derivative of the sum of all this operator’s terms.
Computes the derivative of the total (sum) of the magnitudes of all this operator’s terms with respect to the operators (local) parameters.
Returns
- numpy array
An array of length self.num_params
- to_memoized_dict(mmg_memo)
Create a serializable dict with references to other objects in the memo.
Parameters
- mmg_memo: dict
Memo dict from a ModelMemberGraph, i.e. keys are object ids and values are ModelMemberGraphNodes (which contain the serialize_id). This is NOT the same as other memos in ModelMember (e.g. copy, allocate_gpindices, etc.).
Returns
- mm_dict: dict
A dict representation of this ModelMember ready for serialization This must have at least the following fields: module, class, submembers, params, state_space, evotype Additional fields may be added by derived classes.