pygsti.extras.paritybenchmarking.disturbancecalc.compute_disturbances_from_bootstrap_rawdata#
- compute_disturbances_from_bootstrap_rawdata(ml_disturbances, bootstrap_disturbances, num_bootstrap_samples='all')#
Compute 1-sigma error bars for a set of disturbances (given by ml_disturbances) using boostrap data.
- Parameters:
ml_disturbances (numpy.ndarray) – The disturbances by weight (length max_weight) for the maximum-likelhood (ML) distribution of some set of data.
bootstrap_disturbances (numpy.ndarray) – A (max_weight, num_bootstrap_samples) sized array where each column is the set of by-weight disturbances for a distribution corresponding to a re-sampled bootstrap data set.
num_bootstrap_samples (int or tuple or 'all') – How many bootstrap samples to use when computing the boostrap error bars. This number can be less than the total number of bootstrap samples to test how using fewer boostrap samples would have performed. ‘all’ means to use all available bootstrap samples. If a tuple, then each entry should be an integer and a series of error bars is returned (instead of a single one) corresponding to using each number of samples.
- Returns:
A list of the disturbances by weight. The lists i-th element is a (disturbance, errorbar_length) tuple for the weight (i+1) disturbance. That is, the weight (i+1) disturbance = disturbance +/- errorbar_length. If num_bootstrap_samples is a tuple, then elements are instead (disturbance, errorbar_length1, errorbar_length2, …) where error bar lengths correspond to entries in num_bootstrap_samples.
- Return type:
list