iqm.benchmarks.compressive_gst.mgst.reporting.reporting.bootstrap_errors

iqm.benchmarks.compressive_gst.mgst.reporting.reporting.bootstrap_errors#

iqm.benchmarks.compressive_gst.mgst.reporting.reporting.bootstrap_errors(K: ndarray, X: ndarray, E: ndarray, rho: ndarray, mGST_args: dict, bootstrap_samples: int, weights: list[float], gate_labels: dict[int, str], X_t: ndarray, E_t: ndarray, rho_t: ndarray, parametric: bool = False) tuple[ndarray, ndarray, ndarray, ndarray, ndarray]#

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:
  • K (ndarray) – Each subarray along the first axis contains a set of Kraus operators. The second axis enumerates Kraus operators for a gate specified by the first axis.

  • X (ndarray) – Array where reconstructed CPT superoperators in standard basis are stacked along the first axis.

  • E (ndarray) – Current POVM estimate

  • rho (ndarray) – Current initial state estimate

  • mGST_args (dict) – Arguments with which the run_mGST function was called

  • bootstrap_samples (int) – Number of bootstrapping repretitions

  • weights (list[float]) – Gate weights used for gauge optimization

  • gate_labels (dict[int, str]) – The names of gates in the gate set

  • X_t (ndarray) – Target gate set

  • E_t (ndarray) – Target POVM

  • rho_t (ndarray) – Target initial state

  • parametric (bool) – If set to True, parametric bootstrapping is used, else non-parametric bootstrapping.

Returns:

Array containing all estimated gate tensors of different bootstrapping repretitions along first axis E_array: Array containing all estimated POVM tensors of different bootstrapping repretitions along first axis rho_array: Array containing all estimated initial states of different bootstrapping repretitions 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