pygsti.tools.chi2fns.chialpha#
- chialpha(alpha, model, dataset, circuits=None, pfratio_stitchpt=0.01, pfratio_derivpt=0.01, prob_clip_interval=(-10000, 10000), radius=None, op_label_aliases=None, mdc_store=None, comm=None, mem_limit=None)#
Compute the chi-alpha objective function.
- Parameters:
alpha (float) – The alpha parameter, which lies in the interval (0,1].
model (Model) – The model used to specify the probabilities and SPAM labels
dataset (DataSet) – The data used to specify frequencies and counts
circuits (list of Circuits or tuples, optional) – List of circuits whose terms will be included in chi-alpha sum. Default value (None) means “all strings in dataset”.
pfratio_stitchpt (float, optional) – The x-value (x = probility/frequency ratio) below which the chi-alpha function is replaced with it second-order Taylor expansion.
pfratio_derivpt (float, optional) – The x-value at which the Taylor expansion derivatives are evaluated at.
prob_clip_interval (tuple, optional) – A (min, max) tuple that specifies the minimum (possibly negative) and maximum values allowed for probabilities generated by model. If the model gives probabilities outside this range they are clipped to min or max. These values can be quite generous, as the optimizers are quite tolerant of badly behaved probabilities.
radius (float, optional) – If radius is not None then a “harsh” method of regularizing the zero-frequency terms (where the local function = N*p) is used. If radius is None, then fmin is used to handle the zero-frequency terms.
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’)
mdc_store (ModelDatasetCircuitsStore, optional) – An object that bundles cached quantities along with a given model, dataset, and circuit list. If given, model and dataset and circuits should be set to None.
comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.
mem_limit (int, optional) – A rough memory limit in bytes which restricts the amount of intermediate values that are computed and stored.
- Return type:
float