pygsti.tools.errgenproptools.approximate_stabilizer_probabilities#
- approximate_stabilizer_probabilities(errorgen_dict, circuit, order=1, truncation_threshold=1e-14)#
Calculate the approximate probability distribution over all bitstrings using a first-order approximation. Note the size of this distribution scales exponentially in the qubit count, so this is very inefficient for any more than a few qubits.
- 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.
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