pygsti.algorithms.test_fiducial_list

pygsti.algorithms.test_fiducial_list(gateset, fidList, prepOrMeas, scoreFunc='all', returnAll=False, threshold=1000000.0)

Tests a prep or measure fiducial list for informational completeness.

Parameters:
  • gateset (GateSet) – The gate set (associates gate matrices with gate labels).
  • fidList (list of GateStrings) – List of fiducial gate sequences to test.
  • prepOrMeas (string (“prep” or “meas”)) – Are we testing preparation or measurement fiducials?
  • scoreFunc (str (‘all’ or ‘worst’), optional (default is ‘all’)) – Sets the objective function for scoring a fiducial set. If ‘all’, score is (number of fiducials) * sum(1/Eigenvalues of score matrix). If ‘worst’, score is (number of fiducials) * 1/min(Eigenvalues of score matrix). Note: Choosing ‘worst’ corresponds to trying to make the optimizer make the “worst” direction (the one we are least sensitive to in Hilbert-Schmidt space) as minimally bad as possible. Choosing ‘all’ corresponds to trying to make the optimizer make us as sensitive as possible to all directions in Hilbert-Schmidt space. (Also note- because we are using a simple integer program to choose fiducials, it is possible to get stuck in a local minimum, and choosing one or the other objective function can help avoid such minima in different circumstances.)
  • returnAll (bool, optional (default is False)) – If true, function returns reciprocals of eigenvalues of fiducial score matrix, and the score of the fiducial set as specified by scoreFunc, in addition to a boolean specifying whether or not the fiducial set is informationally complete
  • threshold (float, optional (default is 1e6)) – Specifies a maximum score for the score matrix, above which the fiducial set is rejected as informationally incomplete.
Returns:

  • testResult (bool) – Whether or not the specified fiducial list is informationally complete for the provided gate set, to within the tolerance specified by threshold.
  • spectrum (array, optional) – The number of fiducials times the reciprocal of the spectrum of the score matrix. Only returned if returnAll == True.
  • score (float, optional) – The score for the fiducial set; only returned if returnAll == True.