pygsti.tools.likelihoodfns.two_delta_logl_nsigma#
- two_delta_logl_nsigma(model, dataset, circuits=None, min_prob_clip=1e-06, prob_clip_interval=(-1000000.0, 1000000.0), radius=0.0001, poisson_picture=True, op_label_aliases=None, dof_calc_method='modeltest', wildcard=None)#
See docstring for
pygsti.tools.two_delta_logl()- Parameters:
model (Model) – Model of parameterized gates
dataset (DataSet) – Probability data
circuits (list of (tuples or Circuits), optional) – Each element specifies a circuit to include in the log-likelihood sum. Default value of None implies all the circuits in dataset should be used.
min_prob_clip (float, optional) – The minimum probability treated normally in the evaluation of the log-likelihood. A penalty function replaces the true log-likelihood for probabilities that lie below this threshold so that the log-likelihood never becomes undefined (which improves optimizer performance).
prob_clip_interval (2-tuple or None, optional) – (min,max) values used to clip the probabilities predicted by models during MLEGST’s search for an optimal model (if not None). if None, no clipping is performed.
radius (float, optional) – Specifies the severity of rounding used to “patch” the zero-frequency terms of the log-likelihood.
poisson_picture (boolean, optional) – Whether the log-likelihood-in-the-Poisson-picture terms should be included in the returned logl value.
op_label_aliases (dictionary, optional) – Dictionary whose keys are operation label “aliases” and whose values are tuples corresponding to what that operation label should be expanded into before querying the dataset. Defaults to the empty dictionary (no aliases defined) e.g. op_label_aliases[‘Gx^3’] = (‘Gx’,’Gx’,’Gx’)
dof_calc_method ({"all", "modeltest"}) – How model’s number of degrees of freedom (parameters) are obtained when computing the number of standard deviations and p-value relative to a chi2_k distribution, where k is additional degrees of freedom possessed by the maximal model. “all” uses model.num_params whereas “modeltest” uses model.num_modeltest_params (the number of non-gauge parameters by default).
wildcard (WildcardBudget) – A wildcard budget to apply to this log-likelihood computation. This increases the returned log-likelihood value by adjusting (by a maximal amount measured in TVD, given by the budget) the probabilities produced by model to optimially match the data (within the bugetary constraints) evaluating the log-likelihood.
- Return type:
float