pygsti.drivers.bootstrap.create_bootstrap_models#
- create_bootstrap_models(num_models, input_data_set, generation_method, fiducial_prep, fiducial_measure, germs, max_lengths, input_model=None, target_model=None, start_seed=0, outcome_labels=None, lsgst_lists=None, return_data=False, verbosity=2)#
Creates a series of “bootstrapped” Models.
Models are created from a single DataSet (and possibly Model) and are typically used for generating bootstrapped error bars. The resulting Models are obtained by performing MLGST on data generated by repeatedly calling
create_bootstrap_dataset()with consecutive integer seed values.- Parameters:
num_models (int) – The number of models to create.
input_data_set (DataSet) – The data set to use for generating the “bootstrapped” data set.
generation_method ({ 'nonparametric', 'parametric' }) – The type of data to generate. ‘parametric’ generates DataSets with the same circuits and sample counts as input_data_set but using the probabilities in input_model (which must be provided). ‘nonparametric’ generates DataSets with the same circuits and sample counts as input_data_set using the count frequencies of input_data_set as probabilities.
fiducial_prep (list of Circuits) – The state preparation fiducial circuits used by MLGST.
fiducial_measure (list of Circuits) – The measurement fiducial circuits used by MLGST.
germs (list of Circuits) – The germ circuits used by MLGST.
max_lengths (list of ints) – List of integers, one per MLGST iteration, which set truncation lengths for repeated germ strings. The list of circuits for the i-th LSGST iteration includes the repeated germs truncated to the L-values up to and including the i-th one.
input_model (Model, optional) – The model used to compute the probabilities for circuits when generation_method is set to ‘parametric’. If ‘nonparametric’ is selected, this argument must be set to None (the default).
target_model (Model, optional) – Mandatory model to use for as the target model for MLGST when generation_method is set to ‘nonparametric’. When ‘parametric’ is selected, this should be the ideal version of input_model.
start_seed (int, optional) – The initial seed value for numpy’s random number generator when generating data sets. For each successive dataset (and model) that are generated, the seed is incremented by one.
outcome_labels (list, optional) – The list of Outcome labels to include in the output dataset. If None are specified, defaults to the effect labels of input_data_set.
lsgst_lists (list of circuit lists, optional) – Provides explicit list of circuit lists to be used in analysis; to be given if the dataset uses “incomplete” or “reduced” sets of circuit. Default is None.
return_data (bool) – Whether generated data sets should be returned in addition to models.
verbosity (int) – Level of detail printed to stdout.
- Returns:
models (list) – The list of generated Model objects.
data (list) – The list of generated DataSet objects, only returned when return_data == True.