pygsti.tools.errgenproptools.approximate_stabilizer_pauli_expectation

pygsti.tools.errgenproptools.approximate_stabilizer_pauli_expectation#

approximate_stabilizer_pauli_expectation(errorgen_dict, circuit, pauli, order=1, truncation_threshold=1e-14)#

Calculate the approximate probability of a desired bit string using a first-order 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.

  • pauli (str or stim.PauliString) – Pauli operator to compute expectation value for.

  • 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:

expectation_value – Approximate expectation value for desired pauli.

Return type:

float