pygsti.circuits.gstcircuits.create_lsgst_circuits#
- create_lsgst_circuits(op_label_src, prep_strs, effect_strs, germ_list, max_length_list, fid_pairs=None, trunc_scheme='whole germ powers', keep_fraction=1, keep_seed=None, include_lgst=True)#
List all the circuits (i.e. experiments) required for long-sequence GST (LSGST).
Returns a single list containing, without duplicates, all the gate strings required throughout all the iterations of LSGST given by max_length_list. Thus, the returned list is equivalently the list of the experiments required to run LSGST using the supplied parameters, and so commonly used when constructing data set templates or simulated data sets. The breakdown of which circuits are used for which iteration(s) of LSGST is given by create_lsgst_circuit_lists(…).
- Parameters:
op_label_src (list or Model) – List of operation labels to determine needed LGST strings. If a Model, then the model’s gate and instrument labels are used. Only relevant when include_lgst == True.
prep_strs (list of Circuits) – List of the preparation fiducial circuits, which follow state preparation.
effect_strs (list of Circuits) – List of the measurement fiducial circuits, which precede measurement.
germ_list (list of Circuits) – List of the germ circuits.
max_length_list (list of ints) – List of maximum lengths.
fid_pairs (list of 2-tuples, optional) – Specifies a subset of all fiducial string pairs (prepStr, effectStr) to be used in the circuit lists. If a list, each element of fid_pairs is a (iPrepStr, iEffectStr) 2-tuple of integers, each indexing a string within prep_strs and effect_strs, respectively, so that prepStr = prep_strs[iPrepStr] and effectStr = effect_strs[iEffectStr]. If a dictionary, keys are germs (elements of germ_list) and values are lists of 2-tuples specifying the pairs to use for that germ.
trunc_scheme (str, optional) –
Truncation scheme used to interpret what the list of maximum lengths means. If unsure, leave as default. Allowed values are:
’whole germ powers’ – germs are repeated an integer number of times such that the length is less than or equal to the max.
’truncated germ powers’ – repeated germ string is truncated to be exactly equal to the max (partial germ at end is ok).
’length as exponent’ – max. length is instead interpreted as the germ exponent (the number of germ repetitions).
keep_fraction (float, optional) – The fraction of fiducial pairs selected for each germ-power base string. The default includes all fiducial pairs. Note that for each germ-power the selected pairs are different random sets of all possible pairs (unlike fid_pairs, which specifies the same fiduicial pairs for all same-germ base strings). If fid_pairs is used in conjunction with keep_fraction, the pairs specified by fid_pairs are always selected, and any additional pairs are randomly selected.
keep_seed (int, optional) – The seed used for random fiducial pair selection (only relevant when keep_fraction < 1).
include_lgst (boolean, optional) – If true, then ensure that LGST sequences are included in the returned list.
- Return type: