:py:mod:`pygsti.errorgenpropagation.localstimerrorgen` ====================================================== .. py:module:: pygsti.errorgenpropagation.localstimerrorgen Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pygsti.errorgenpropagation.localstimerrorgen.LocalStimErrorgenLabel .. py:class:: LocalStimErrorgenLabel(errorgen_type, basis_element_labels, circuit_time=None, initial_label=None, label=None, pauli_str_reps=None) Bases: :py:obj:`pygsti.baseobjs.errorgenlabel.ElementaryErrorgenLabel` `LocalStimErrorgenLabel` is a specialized `ElementaryErrorgenLabel` designed to manage the propagation of error generator using Stim primitives for fast Pauli and Clifford operations, storing propagation related metadata, and storing metadata relevant to the evaluation of non-Markovian error propagators using cumulant expansion based techniques. Create a new instance of `LocalStimErrorgenLabel` 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 stim.PauliString 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. circuit_time : float, optional (default None) An optional value which associates this error generator with a particular circuit time at which it arose. This is primarily utilized in the context of non-Markovian simulations and estimation where an error generator may notionally be associated with a stochastic process. initial_label : `ElementaryErrorgenLabel`, optional (default None) If not None, then this `ElementaryErrorgenLabel` is stored within this label and is interpreted as being the 'initial' value of this error generator, prior to any propagation or transformation during the course of its use. If None, then this is initialized to a `LocalElementaryErrorgenLabel` matching the `errorgen_type` and `basis_element_labels` of this label. label : str, optional (default None) An optional label string which is included when printing the string representation of this label. pauli_str_reps : tuple of str, optional (default None) Optional tuple of python strings corresponding to the stim.PauliStrings in basis_element_labels. When specified can speed up construction of hashable label representations. .. py:attribute:: errorgen_type .. py:attribute:: basis_element_labels .. py:attribute:: label :value: 'None' .. py:attribute:: circuit_time :value: 'None' .. py:method:: cast(obj, sslbls=None) :classmethod: Method for casting objects to instances of LocalStimErrorgenLabel. Parameters ---------- obj : `LocalStimErrorgenLabel`, ``LocalElementaryErrorgenLabel`, `GlobalElementaryErrorgenLabel`, tuple or list 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). Returns ------- `LocalStimErrorgenLabel` .. py:method:: bel_to_strings() Convert the elements of `basis_element_labels` to python strings (from stim.PauliString(s)) and return as a tuple. .. py:method:: propagate_error_gen_tableau(slayer, weight) Parameters ---------- slayer : `stim.Tableau` `stim.Tableau` object corresponding to an ideal Clifford operations for a circuit layer which we will be propagating this error generator through. weight : float Current weight of this error generator. Returns ------- tuple of consisting of an `LocalStimErrorgenLabel` and an updated error generator weight, which may have changed by a sign. .. py:method:: to_global_eel(sslbls=None) Returns a `GlobalElementaryErrorgenLabel` equivalent to this `LocalStimErrorgenLabel`. sslbls : list (optional, default None) A list of state space labels corresponding to the qubits corresponding to each of the paulis in the local basis element label. If None this defaults a list of integers ranging from 0 to N where N is the number of paulis in the basis element labels. .. py:method:: to_local_eel() Returns a `LocalElementaryErrorgenLabel` equivalent to this `LocalStimErrorgenLabel`. Returns ------- `LocalElementaryErrorgenLabel`