pygsti.report.direct_chi2_matrix¶
-
pygsti.report.
direct_chi2_matrix
(sigma, dataset, directGateset, strs, minProbClipForWeighting=0.0001, fidPairs=None)¶ Computes the Direct-X chi^2 matrix for a base gatestring sigma.
Similar to chi2_matrix, except the probabilities used to compute chi^2 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(...)
- minProbClipForWeighting (float, optional) – defines the clipping interval for the statistical weight (see chi2fn).
- 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) )