pygsti.construction.make_elgst_lists¶
-
pygsti.construction.
make_elgst_lists
(gateLabels, germList, maxLengthList, truncScheme='whole germ powers', nest=True)¶ Create a set of gate string lists for eLGST based on germs and max-lengths
Constructs a series (a list) of gate string lists used by the extended LGST (eLGST) algorithm. If maxLengthList[0] == 0 then the starting list is the list of length-1 gate label strings, otherwise the starting list is empty. For each nonzero element of maxLengthList, call it L, a list of gate strings is created with the form:
- Case: truncScheme == ‘whole germ powers’:
- pygsti.construction.repeat_with_max_length(germ,L)
- Case: truncScheme == ‘truncated germ powers’:
- pygsti.construction.repeat_and_truncate(germ,L)
- Case: truncScheme == ‘length as exponent’:
- germ^L
If nest == True, the above list is iteratively added (w/duplicates removed) to the current list of gate strings to form a final list for the given L. This results in successively larger lists, each of which contains all the elements of previous-L lists. If nest == False then the above list is the final list for the given L.
Parameters: - gateLabels (list or tuple) – List of gate labels. Only relevant when maxLengthList[0] == 0.
- germList (list of GateStrings) – List of the germ gate strings.
- maxLengthList (list of ints) – List of the maximum lengths. If maxLengthList[0] == 0 this results in special behavior where the length-1 gate label strings are included as the first returned list.
- truncScheme (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).
- nest (boolean, optional) – If Frue, the returned gate string lists are “nested”, meaning that each successive list of gate strings contains all the gate strings found in previous lists (and usually some additional new ones). If False, then the returned string list for maximum length == L contains only those gate strings specified in the description above, and not those for previous values of L.
Returns: The i-th list corresponds to a gate string list containing repeated germs limited to length maxLengthList[i]. If nest == True, then repeated germs limited to previous max-lengths are also included. Note that a “0” maximum-length corresponds to the gate label strings.
Return type: list of (lists of GateStrings)