pygsti.algorithms.germselection.find_germs_depthfirst#
- find_germs_depthfirst(model_list, germs_list, randomize=True, randomization_strength=0.001, num_copies=None, seed=0, op_penalty=0, score_func='all', tol=1e-06, threshold=1000000.0, check=False, force='singletons', verbosity=0, float_type=None)#
Greedy germ selection algorithm starting with 0 germs.
Tries to minimize the number of germs needed to achieve amplificational completeness (AC). Begins with 0 germs and adds the germ that increases the score used to check for AC by the largest amount at each step, stopping when the threshold for AC is achieved.
- Parameters:
model_list (Model or list) – The model or list of Models to select germs for.
germs_list (list of Circuit) – The list of germs to construct a germ set from.
randomize (bool, optional) – Whether or not to randomize model_list (usually just a single Model) with small (see randomization_strength) unitary maps in order to avoid “accidental” symmetries which could allow for fewer germs but only for that particular model. Setting this to True will increase the run time by a factor equal to the number of randomized copies (num_copies).
randomization_strength (float, optional) – The strength of the unitary noise used to randomize input Model(s); is passed to
randomize_with_unitary().num_copies (int, optional) – The number of randomized models to create when only a single gate set is passed via model_list. Otherwise, num_copies must be set to None.
seed (int, optional) – Seed for generating random unitary perturbations to models.
op_penalty (float, optional) – Coefficient for a penalty linear in the sum of the germ lengths.
score_func ({'all', 'worst'}, optional) – Sets the objective function for scoring the eigenvalues. If ‘all’, score is
sum(1/eigenvalues). If ‘worst’, score is1/min(eiganvalues).tol (float, optional) – Tolerance (eps arg) for
_compute_bulk_twirled_ddd(), which sets the difference between eigenvalues below which they’re treated as degenerate.threshold (float, optional) – Value which the score (before penalties are applied) must be lower than for a germ set to be considered AC.
check (bool, optional) – Whether to perform internal checks (will slow down run time substantially).
force (list of Circuits) – A list of Circuit objects which must be included in the final germ set. If the special string “singletons” is given, then all of the single gates (length-1 sequences) must be included.
verbosity (int, optional) – Level of detail printed to stdout.
float_type (numpy dtype object, optional) – 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.
- Returns:
A list of the built-up germ set (a list of
Circuitobjects).- Return type:
list