pygsti.tools.errgenproptools.approximate_stabilizer_probability#
- approximate_stabilizer_probability(errorgen_dict, circuit, desired_bitstring, order=1, truncation_threshold=1e-14)#
Calculate the approximate probability of a desired bit string using an nth-order taylor series approximation.
- Parameters:
errorgen_dict (dict) – Dictionary whose keys are ElementaryErrorgenLabel and whose values are corresponding rates.
circuit (Circuit or stim.Tableau) – A pygsti Circuit or a stim.Tableau to compute the output probability for. In either case this should be a Clifford circuit and convertible to a stim.Tableau.
desired_bitstring (str) – String of 0’s and 1’s corresponding to the output bitstring being measured.
order (int, optional (default 1)) – Order of the correction (i.e. order of the taylor series expansion for the exponentiated error generator) to compute.
truncation_threshold (float, optional (default 1e-14)) – Optional threshold used to truncate corrections whose corresponding error generator rates are below this value. (Used internally in computation of probability corrections)
- Returns:
p – Approximate output probability for desired bitstring.
- Return type:
float