pygsti.make_bootstrap_gatesets¶
-
pygsti.
make_bootstrap_gatesets
(numGateSets, inputDataSet, generationMethod, fiducialPrep, fiducialMeasure, germs, maxLengths, inputGateSet=None, targetGateSet=None, startSeed=0, spamLabels=None, constrainToTP=True, lsgstLists=None, returnData=False, verbosity=2)¶ Creates a series of “bootstrapped” GateSets form a single DataSet (and possibly GateSet) used for generating bootstrapped error bars. The resulting GateSets are obtained by performing MLGST on datasets generated by repeatedly calling make_bootstrap_dataset with consecutive integer seed values.
Parameters: - numGateSets (int) – The number of gate sets to create.
- inputDataSet (DataSet) – The data set to use for generating the “bootstrapped” data set.
- generationMethod ({ ‘nonparametric’, ‘parametric’ }) – The type of datasets to generate. ‘parametric’ generates DataSets with the same gate strings and sample counts as inputDataSet but using the probabilities in inputGateSet (which must be provided). ‘nonparametric’ generates DataSets with the same gate strings and sample counts as inputDataSet using the count frequencies of inputDataSet as probabilities.
- fiducialPrep (list of GateStrings) – The state preparation fiducial gate strings used by MLGST.
- fiducialMeasure (list of GateStrings) – The measurement fiducial gate strings used by MLGST.
- germs (list of GateStrings) – The germ gate strings used by MLGST.
- maxLengths (list of ints) – List of integers, one per MLGST iteration, which set truncation lengths for repeated germ strings. The list of gate strings for the i-th LSGST iteration includes the repeated germs truncated to the L-values up to and including the i-th one.
- inputGateSet (GateSet, optional) – The gate set used to compute the probabilities for gate strings when generationMethod is set to ‘parametric’. If ‘nonparametric’ is selected, this argument must be set to None (the default).
- targetGateSet (GateSet, optional) – Mandatory gate set to use for as the target gate set for MLGST when generationMethod is set to ‘nonparametric’. When ‘parametric’ is selected, inputGateSet is used as the target.
- startSeed (int, optional) – The initial seed value for numpy’s random number generator when generating data sets. For each succesive dataset (and gateset) that are generated, the seed is incremented by one.
- spamLabels (list, optional) – The list of SPAM labels to include in the output dataset. If None are specified, defaults to the spam labels of inputDataSet.
- constrainToTP (bool, optional) – Whether to constrain GST to trace-preserving gatesets.
- lsgstLists (list of gate string lists, optional) – Provides explicit list of gate string lists to be used in analysis; to be given if the dataset uses “incomplete” or “reduced” sets of gate string. Default is None.
- returnData (bool) – Whether generated data sets should be returned in addition to gate sets.
- verbosity (int) – Level of detail printed to stdout.
Returns: - gatesets (list) – The list of generated GateSet objects.
- datasets (list) – The list of generated DataSet objects, only returned when returnData == True.