pygsti.gate_string_chi2¶
-
pygsti.
gate_string_chi2
(gatestring, dataset, gateset, useFreqWeightedChiSq=False, minProbClipForWeighting=0.0001)¶ Computes the chi-squared term for a single gate string.
The sum of the chi-squared terms for each of the possible outcomes (the SPAM labels in gateset).
Parameters: - gatestring (GateString or tuple) – The gate string to compute chi-squared for.
- dataset (Dataset) – The object from which frequencies are extracted.
- gateset (GateSet) – The object from which probabilities and SPAM labels are extracted.
- useFreqWeightedChiSq (bool, optional) – Whether or not frequencies (instead of probabilities) should be used in statistical weight factors.
- minProbClipForWeighting (float, optional) – If useFreqWeightedChiSq == False, defines the clipping interval for the statistical weight (see chi2fn).
Returns: The sum of chi^2 terms for corresponding to gatestring (one term per SPAM label).
Return type: float