pygsti.report.direct_logl_matrix¶
-
pygsti.report.
direct_logl_matrix
(sigma, dataset, directGateset, strs, minProbClip=1e-06, fidPairs=None)¶ - Computes the Direct-X log-likelihood matrix, containing the values
- of 2*( log(L)_upperbound - log(L) ) for a base gatestring sigma.
Similar to logl_matrix, except the probabilities used to compute LogL values come from using the “composite gate” of directGatesets[sigma], a GateSet assumed to contain some estimate of sigma stored under the gate label “GsigmaLbl”.
Parameters: - sigma (GateString or tuple of gate labels) – The gate sequence that is sandwiched between each prepStr and effectStr
- dataset (DataSet) – The data used to specify frequencies and counts
- directGateset (GateSet) – GateSet which contains an estimate of sigma stored under the gate label “GsigmaLbl”.
- strs (2-tuple) – A (prepStrs,effectStrs) tuple usually generated by calling get_spam_strs(...)
- minProbClip (float, optional) – defines the minimum probability clipping.
- fidPairs (list, optional) – A list of (iRhoStr,iEStr) tuples specifying a subset of all the prepStr,effectStr pairs to include in the matrix. Other elements are set to NaN.
Returns: Direct-X chi^2 values corresponding to gate sequences where gateString is sandwiched between the each (effectStr,prepStr) pair.
Return type: numpy array of shape ( len(effectStrs), len(prepStrs) )