pygsti.tools.errgenproptools.error_generator_composition_numerical#
- error_generator_composition_numerical(errorgen1, errorgen2, errorgen_matrix_dict=None, num_qubits=None)#
Numerically compute the composition of the two specified elementary error generators.
- Parameters:
errorgen1 (LocalElementaryErrorgenLabel or LocalStimErrorgenLabel) – First error generator.
errorgen2 (ElementaryErrorgenLabel or LocalStimErrorgenLabel) – Second error generator.
errorgen_matrix_dict (dict, optional (default None)) – An optional dictionary mapping `ElementaryErrorgenLabel`s to numpy arrays for their dense representation. If not specified this will be constructed from scratch each call, so specifying this can provide a performance benefit.
num_qubits (int, optional (default None)) – Number of qubits for the error generator commutator being computed. Only required if errorgen_matrix_dict is None.
- Returns:
Numpy array corresponding to the dense representation of the composition of the input error generators in the standard basis.
- Return type:
ndarray