iqm.benchmarks.compressive_gst.gst_analysis.bootstrap_errors#
- iqm.benchmarks.compressive_gst.gst_analysis.bootstrap_errors(dataset: Dataset, y: ndarray, gate_set: list[ndarray], target_gate_set: list[ndarray], identifier: str, parametric: bool = True) tuple[Any, Any, Any, Any, Any]#
Resamples circuit outcomes a number of times and computes GST estimates for each repetition.
All results are then returned in order to compute bootstrap-error bars for GST estimates. Parametric bootstrapping uses the estimated gate set to create a newly sampled data set. Non-parametric bootstrapping uses the initial dataset and resamples according to the corresp. outcome probabilities. Each bootstrap run is initialized with the estimated gate set in order to save processing time.
- Parameters:
dataset (Dataset) – A dataset containing counts from the experiment and configurations
y (ndarray) – The circuit outcome probabilities as a num_povm x num_circuits array
gate_set (list[ndarray]) – The estimated gate set in format [K, X, E, rho]
target_gate_set (list[ndarray]) – The target gate set in format [X_target, E_target, rho_target]
identifier (str) – The string identifier of the current benchmark
parametric (bool) – If set to True, parametric bootstrapping is used, else non-parametric bootstrapping. Default: False
- Returns:
Array containing all estimated gate tensors of different bootstrapping repetitions along first axis E_array:
Array containing all estimated POVM tensors of different bootstrapping repetitions along first axis
- rho_array:
Array containing all estimated initial states of different bootstrapping repetitions along first axis
- df_g_array:
Contains gate quality measures of bootstrapping repetitions
- df_o_array:
Contains SPAM and other quality measures of bootstrapping repetitions
- Return type:
X_array