pygsti.tools.logl_hessian¶
-
pygsti.tools.
logl_hessian
(gateset, dataset, gatestring_list=None, minProbClip=1e-06, probClipInterval=(-1000000.0, 1000000.0), radius=0.0001, evalTree=None, countVecMx=None, poissonPicture=True, check=False, comm=None, memLimit=None)¶ The hessian of the log-likelihood function.
Parameters: - gateset (GateSet) – Gateset of parameterized gates (including SPAM)
- dataset (DataSet) – Probability data
- gatestring_list (list of (tuples or GateStrings), optional) – Each element specifies a gate string to include in the log-likelihood sum. Default value of None implies all the gate strings in dataset should be used.
- minProbClip (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).
- probClipInterval (2-tuple or None, optional) – (min,max) values used to clip the probabilities predicted by gatesets during MLEGST’s search for an optimal gateset (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.
- evalTree (evaluation tree, optional) – given by a prior call to bulk_evaltree for the same gatestring_list. Significantly speeds up evaluation of log-likelihood derivatives, even more so when accompanied by countVecMx (see below). Defaults to None.
- countVecMx (numpy array, optional) – Two-dimensional numpy array whose rows correspond to the gate’s spam labels (i.e. gateset.get_spam_labels()). Each row is contains the dataset counts for that spam label for each gate string in gatestring_list. Use fill_count_vecs(...) to generate this quantity once for multiple evaluations of the log-likelihood function which use the same dataset.
- poissonPicture (boolean, optional) – Whether the Poisson-picutre log-likelihood should be differentiated.
- check (boolean, optional) – If True, perform extra checks within code to verify correctness. Used for testing, and runs much slower when True.
- comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.
- memLimit (int, optional) – A rough memory limit in bytes which restricts the amount of intermediate values that are computed and stored.
Returns: array of shape (M,M), where M is the length of the vectorized gateset.
Return type: numpy array