pygsti.baseobjs.errorgenlabel.LocalElementaryErrorgenLabel#
- class LocalElementaryErrorgenLabel(errorgen_type, basis_element_labels)#
Bases:
ElementaryErrorgenLabelLabels an elementary error generator by simply a type and one or two basis element labels.
- Parameters:
errorgen_type (str) – A string corresponding to the error generator sector this error generator label is an element of. Allowed values are ‘H’, ‘S’, ‘C’ and ‘A’.
basis_element_labels (tuple or list) – A list or tuple of strings labeling basis elements used to label this error generator. This is either length-1 for ‘H’ and ‘S’ type error generators, or length-2 for ‘C’ and ‘A’ type.
Methods
__init__(errorgen_type, basis_element_labels)cast(obj[, sslbls, identity_label])Method for casting an object to an instance of LocalElementaryErrorgenLabel
support_indices([identity_label])Returns a sorted tuple of the elements of indices of the nontrivial basis element label entries for this label.
- classmethod cast(obj, sslbls=None, identity_label='I')#
Method for casting an object to an instance of LocalElementaryErrorgenLabel
- Parameters:
obj (LocalElementaryErrorgenLabel, GlobalElementaryErrorgenLabel, str, tuple or list) –
Object to cast. If a GlobalElementaryErrorgenLabel then a value for the sslbls argument should be passed with the full list of state space labels for the system. Other castable options include:
- -str: A string formatted as ‘<type>(<bel1>[,<bel2>])’. E.g. ‘H(XX)’ or
’C(X,Y)’
- -tuple/list: These can be specified either in ‘global-style’ or ‘local-style’.
local-style: format is (<type>, <bel1>[,<bel2>])
global-style:format is (<type>, (<bel1>,[<bel2>]), (<sslbls>)) Where sslbls above is specifically the subset of state space labels this error generator acts on nontrivially. When specifying global-style tuple labels the sslbls kwarg of this method which contains the complete set of state-space labels must also be specified.
sslbls (tuple or list, optional (default None)) – A complete set of state space labels. Used when casting from a GlobalElementaryErrorgenLabel or from a tuple of length 3 (wherein the final element is interpreted as the set of ssblbs the error generator acts upon).
identity_label (str, optional (default 'I')) – An optional string specifying the label used to denote the identity in basis element labels.
- Return type:
- support_indices(identity_label='I')#
Returns a sorted tuple of the elements of indices of the nontrivial basis element label entries for this label.