pygsti.tools.errgenproptools.approximate_stabilizer_pauli_expectation_numerical

pygsti.tools.errgenproptools.approximate_stabilizer_pauli_expectation_numerical#

approximate_stabilizer_pauli_expectation_numerical(errorgen_dict, errorgen_propagator, circuit, pauli, order=1)#

Calculate the approximate probability of a desired bit string using a first-order approximation. This function performs the corrections numerically and so it primarily intended for testing infrastructure.

Parameters:
  • errorgen_dict (dict) – Dictionary whose keys are ElementaryErrorgenLabel and whose values are corresponding rates.

  • errorgen_propagator (ErrorGeneratorPropagator) – Error generator propagator used for constructing dense representation of the error generator dictionary.

  • circuit (Circuit) – A pygsti Circuit or a stim.Tableau to compute the output pauli expectation value for.

  • pauli (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