pygsti.tools.likelihoodfns.two_delta_logl_term

pygsti.tools.likelihoodfns.two_delta_logl_term#

two_delta_logl_term(n, p, f, min_prob_clip=1e-06, poisson_picture=True)#

Term of the 2*[log(L)-upper-bound - log(L)] sum corresponding to a single circuit and spam label.

Parameters:
  • n (float or numpy array) – Number of samples.

  • p (float or numpy array) – Probability of 1st outcome (typically computed).

  • f (float or numpy array) – Frequency of 1st outcome (typically observed).

  • min_prob_clip (float, optional) – Minimum probability clip point to avoid evaluating log(number <= zero)

  • poisson_picture (boolean, optional) – Whether the log-likelihood-in-the-Poisson-picture terms should be included in the returned logl value.

Return type:

float or numpy array