pygsti.tools.errgenproptools.bch_approximation#
- bch_approximation(errgen_layer_1, errgen_layer_2, bch_order=1, truncation_threshold=1e-14)#
Apply the BCH approximation at the given order to combine the input dictionaries of error generator rates.
- Parameters:
errgen_layer_1 (dict) – Dictionary of the error generator coefficients and rates for a circuit layer. The error generator coefficients are represented using LocalStimErrorgenLabel.
errgen_layer_2 (list of dicts) – See errgen_layer_1.
bch_order (int, optional (default 1)) – Order of the BCH approximation to use. Currently support for up to fifth order.
truncation_threshold (float, optional (default 1e-14)) – Threshold for which any error generators with magnitudes below this value are truncated.
- Returns:
combined_errgen_layer – A dictionary with the same general structure as errgen_layer_1 and errgen_layer_2, but with the rates combined according to the selected order of the BCH approximation.
- Return type:
dict