pygsti.tools.errgenproptools.error_generator_composition#
- error_generator_composition(errorgen_1, errorgen_2, weight=1.0, identity=None)#
Returns the composition of two error generators. I.e. errorgen_1[errorgen_2[cdot]].
- Parameters:
errorgen1 (LocalStimErrorgenLabel) – First error generator.
errorgen2 (LocalStimErrorgenLabel) – Second error generator
weight (float, optional (default 1.0)) – An optional weighting value to apply to the value of the composition.
identity (stim.PauliString, optional (default None)) – An optional stim.PauliString to use for comparisons to the identity. Passing in this kwarg isn’t necessary, but can allow for reduced stim.PauliString creation when calling this function many times for improved efficiency.
- Returns:
list of tuples. The first element of each tuple is a `LocalStimErrorgenLabel`s
corresponding to a component of the composition of the two input error generators.
The second element is the weight of that term, additionally weighted by the specified
value of weight.