pygsti.errorgenpropagation.localstimerrorgen

Module Contents

Classes

LocalStimErrorgenLabel

LocalStimErrorgenLabel is a specialized ElementaryErrorgenLabel

class pygsti.errorgenpropagation.localstimerrorgen.LocalStimErrorgenLabel(errorgen_type, basis_element_labels, circuit_time=None, initial_label=None, label=None, pauli_str_reps=None)

Bases: 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_typestr

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_labelstuple 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_timefloat, 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_labelElementaryErrorgenLabel, 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.

labelstr, optional (default None)

An optional label string which is included when printing the string representation of this label.

pauli_str_repstuple 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.

errorgen_type
basis_element_labels
label = 'None'
circuit_time = 'None'
classmethod cast(obj, sslbls=None)

Method for casting objects to instances of LocalStimErrorgenLabel.

Parameters

obj : LocalStimErrorgenLabel, ``LocalElementaryErrorgenLabel`, GlobalElementaryErrorgenLabel, tuple or list

sslblstuple 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

bel_to_strings()

Convert the elements of basis_element_labels to python strings (from stim.PauliString(s)) and return as a tuple.

propagate_error_gen_tableau(slayer, weight)
Parameters
slayerstim.Tableau

stim.Tableau object corresponding to an ideal Clifford operations for a circuit layer which we will be propagating this error generator through.

weightfloat

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.

to_global_eel(sslbls=None)

Returns a GlobalElementaryErrorgenLabel equivalent to this LocalStimErrorgenLabel.

sslblslist (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.

to_local_eel()

Returns a LocalElementaryErrorgenLabel equivalent to this LocalStimErrorgenLabel.

Returns

LocalElementaryErrorgenLabel