pygsti.report.probability_matrix

pygsti.report.probability_matrix(gateString, gateset, spamlabel, strs, fidPairs=None)

Computes spamLabel’s probability matrix for a base gatestring.

Parameters:
  • gateString (tuple of gate labels) – The gate sequence that is sandwiched between each effectStr and prepStr
  • gateset (GateSet) – The gate set used to specify the probabilities
  • spamLabel (string) – The spam label to extract probabilities 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:

probability 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) )