pygsti.objects.ConfidenceRegion.get_spam_fn_confidence_interval

ConfidenceRegion.get_spam_fn_confidence_interval(fnOfSpamVecs, eps=1e-07, returnFnVal=False, verbosity=0)

Compute the confidence interval for a function of spam vectors.

Parameters:
  • fnOfSpamVecs (function) – A function which takes two arguments, rhoVecs and EVecs, each of which is a list of column vectors. Note that the EVecs list will include all the effect vectors, including the a “compliment” vector. The returned confidence interval is based on linearizing this function and propagating the gateset-space confidence region.
  • eps (float, optional) – Step size used when taking finite-difference derivatives of fnOfSpamVecs.
  • returnFnVal (bool, optional) – If True, return the value of fnOfSpamVecs along with it’s confidence region half-widths.
  • verbosity (int, optional) – Specifies level of detail in standard output.
Returns:

  • df (float or numpy array) – Half-widths of confidence intervals for each of the elements in the float or array returned by fnOfSpamVecs. Thus, shape of df matches that returned by fnOfSpamVecs.
  • f0 (float or numpy array) – Only returned when returnFnVal == True. Value of fnOfSpamVecs.