pygsti.algorithms.fiducialpairreduction.find_sufficient_fiducial_pairs_per_germ_power#
- find_sufficient_fiducial_pairs_per_germ_power(target_model, prep_fiducials, meas_fiducials, germs, max_lengths, prep_povm_tuples='first', search_mode='random', constrain_to_tp=True, trunc_scheme='whole germ powers', n_random=100, min_iterations=None, base_loweig_tol=0.1, seed=None, verbosity=0, mem_limit=None, per_germ_candidate_set=None)#
Finds a per-germ set of fiducial pairs that are amplificationally complete.
A “standard” set of GST circuits consists of all circuits of the form:
- Case: trunc_scheme == ‘whole germ powers’:
state_prep + prep_fiducial + pygsti.circuits.repeat_with_max_length(germ,L) + meas_fiducial + meas
- Case: trunc_scheme == ‘truncated germ powers’:
state_prep + prep_fiducial + pygsti.circuits.repeat_and_truncate(germ,L) + meas_fiducial + meas
- Case: trunc_scheme == ‘length as exponent’:
state_prep + prep_fiducial + germ^L + meas_fiducial + meas
This set is typically over-complete, and it is possible to restrict the (prepFiducial, measureFiducial) pairs to a subset of all the possible pairs given the separate prep_fiducials and meas_fiducials lists. This function attempts to find sets of fiducial pairs, one set per germ, that still amplify all of the model’s parameters (i.e. is “amplificationally complete”). For each germ, a fiducial pair set is found that amplifies all of the “parameters” (really linear combinations of them) that the particular germ amplifies.
To test whether a set of fiducial pairs satisfies this condition, the sum of projectors P_i = dot(J_i,J_i^T), where J_i is a matrix of the derivatives of each of the selected (prepFiducial+germ+effectFiducial) sequence probabilities with respect to the i-th germ eigenvalue (or more generally, amplified parameter), is computed. If the fiducial-pair set is sufficient, the rank of the resulting sum (an operator) will be equal to the total (maximal) number of parameters the germ can amplify.
- Parameters:
target_model (Model) – The target model used to determine amplificational completeness.
prep_fiducials (list of Circuits) – Fiducial circuits used to construct an informationally complete effective preparation.
meas_fiducials (list of Circuits) – Fiducial circuits used to construct an informationally complete effective measurement.
germs (list of Circuits) – The germ circuits that are repeated to amplify errors.
max_lengths (list of int) – The germ powers (number of repetitions) to be used to amplify errors.
prep_povm_tuples (list or "first", optional) – A list of (prepLabel, povmLabel) tuples to consider when checking for completeness. Usually this should be left as the special (and default) value “first”, which considers the first prep and POVM contained in target_model.
search_mode ({"sequential","random"}, optional) – If “sequential”, then all potential fiducial pair sets of a given length are considered in sequence (per germ) before moving to sets of a larger size. This can take a long time when there are many possible fiducial pairs. If “random”, then only n_random randomly chosen fiducial pair sets are considered for each set size before the set is enlarged.
constrain_to_tp (bool, optional) – Whether or not to consider non-TP parameters the the germs amplify. If the fiducal pairs will be used in a GST estimation where the model is constrained to being trace-preserving (TP), this should be set to True.
n_random (int, optional) – The number of random-pair-sets to consider for a given set size.
min_iterations (int, optional) – The number of random-pair-sets to consider before we allow the algorithm to terminate early if it has found an acceptable candidate fiducial set. If left with the default value of None then this is 1/2 the value of n_random.
base_loweig_tol (float, optional) – A relative tolerance to apply to candidate fiducial pair sets. Gives the multiplicative reduction in the magnitude of the minimum eigenvalue relative to the value for the full fiducial set the user is willing to tolerate.
seed (int, optional) – The seed to use for generating random-pair-sets.
verbosity (int, optional) – How much detail to print to stdout.
mem_limit (int, optional) – A memory limit in bytes.
per_germ_candidate_set (dict, optional) – If specified, this is a dictionary with keys given by the germ set. This dictionary is a previously found candidate set of fiducials output from the per-germ FPR function find_sufficient_fiducial_pairs_per_germ.
- Returns:
A dictionary whose keys are the germ circuits and whose values are lists of (iRhoFid,iMeasFid) tuples of integers, each specifying the list of fiducial pairs for a particular germ (indices are into prep_fiducials and meas_fiducials).
- Return type:
dict