pygsti.forbidden_prob

pygsti.forbidden_prob(gateset, dataset)

Compute the sum of the out-of-range probabilities generated by gateset, using only those gate strings contained in dataset. Non-zero value indicates that gateset is not in XP for the supplied dataset.

Parameters:
  • gateset (GateSet) – gate set to generate probabilities.
  • dataset (DataSet) – data set to obtain gate strings. Dataset counts are used to check for zero or all counts being under a single spam label, in which case out-of-bounds probabilities are ignored because they contribute zero to the logl sum.
Returns:

sum of the out-of-range probabilities.

Return type:

float