pygsti.report.count_matrix¶
-
pygsti.report.
count_matrix
(gateString, dataset, spamlabel, strs, fidPairs=None)¶ Computes spamLabel’s count 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 the counts
- spamLabel (string) – The spam label to extract counts for, e.g. ‘plus’
- strs (2-tuple) – A (prepStrs,effectStrs) tuple usually generated by calling get_spam_strs(...)
- 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: count values corresponding to spamLabel and gate sequences where gateString is sandwiched between the each (effectStr,prepStr) pair.
Return type: numpy array of shape ( len(effectStrs), len(prepStrs) )