pygsti.algorithms.germselection.test_germ_set_infl#
- test_germ_set_infl(model, germs_to_test, score_func='all', weights=None, return_spectrum=False, threshold=1000000.0, check=False, float_type=None, comm=None, nGaugeParams=None)#
Test whether a set of germs is able to amplify all non-gauge parameters.
- Parameters:
model (Model) – The Model (associates operation matrices with operation labels).
germs_to_test (list of Circuit) – List of germ circuits to test for completeness.
score_func (string) – Label to indicate how a germ set is scored. See
list_score()for details.weights (numpy array, optional) – A 1-D array of weights with length equal len(germs_to_test), which multiply the contribution of each germ to the total jacobian matrix determining parameter amplification. If None, a uniform weighting of 1.0/len(germs_to_test) is applied.
return_spectrum (bool, optional) – If
True, return the jacobian^T*jacobian spectrum in addition to the success flag.threshold (float, optional) – An eigenvalue of jacobian^T*jacobian is considered zero and thus a parameter un-amplified when its reciprocal is greater than threshold. Also used for eigenvector degeneracy testing in twirling operation.
check (bool, optional) – Whether to perform internal consistency checks, at the expense of making the function slower.
float_type (numpy dtype object, optional) – Optional numpy data type to use for internal numpy array calculations.
comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.
float_type – Numpy data type to use for floating point arrays. Automatically resolved based on whether the model’s basis is real-valued. Can be manually specified by user, which can be useful for controlling memory footprint.
nGaugeParams (int, optional (default None)) – A optional kwarg for specifying the number of gauge parameters. Specifying this if already precomputed can save on computation.
- Returns:
success (bool) – Whether all non-gauge parameters were amplified.
spectrum (numpy array) – Only returned when return_spectrum is
True. Sorted array of eigenvalues (from small to large) of the jacobian^T * jacobian matrix used to determine parameter amplification.