pygsti.tools.errgenproptools.magnus_expansion

pygsti.tools.errgenproptools.magnus_expansion#

magnus_expansion(errorgen_layers, magnus_order=1, truncation_threshold=1e-14)#

Function for computing the nth-order magnus expansion for a set of error generator layers. Please see https://arxiv.org/abs/0810.5488 or https://en.wikipedia.org/wiki/Magnus_expansion for more information on this approximation.

Parameters:
  • errorgen_layers (list of dicts) – List of dictionaries of the error generator coefficients and rates for a circuit layer. The error generator coefficients are represented using LocalStimErrorgenLabel.

  • magnus_order (int, optional (default 1)) – Order of the magnus expansion to apply. Currently supports up to third order.

  • truncation_threshold (float, optional (default 1e-14)) – Threshold for which any error generators with magnitudes below this value are truncated.

Returns:

magnus_expansion_dict – A dictionary with the same general structure as those in errorgen_layers, but with the rates combined according to the selected order of the magnus expansion.

Return type:

dict