pygsti.report.frequency_matrix¶
-
pygsti.report.
frequency_matrix
(gateString, dataset, spamlabel, strs, fidPairs=None)¶ Computes spamLabel’s frequency 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 frequencies
- spamLabel (string) – The spam label to extract frequencies 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: frequency 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) )