pygsti.report.chi2_matrix¶
-
pygsti.report.
chi2_matrix
(gateString, dataset, gateset, strs, minProbClipForWeighting=0.0001, fidPairs=None)¶ Computes the chi^2 matrix for a base gatestring.
Parameters: - gateString (tuple of gate labels) – The gate sequence that is sandwiched between each effectStr and prepStr
- dataset (DataSet) – The data used to specify frequencies and counts
- gateset (GateSet) – The gate set used to specify the probabilities and SPAM labels
- 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 values are set to NaN.
Returns: chi^2 values corresponding to gate sequences where gateString is sandwiched between the each (effectStr,prepStr) pair. (i.e. element_ij = gate_string_chi2( prepStrs[j] + gateString + effectStrs[i])
Return type: numpy array of shape ( len(effectStrs), len(prepStrs) )