iqm.benchmarks.compressive_gst.gst_analysis.bootstrap_errors

iqm.benchmarks.compressive_gst.gst_analysis.bootstrap_errors#

iqm.benchmarks.compressive_gst.gst_analysis.bootstrap_errors(dataset: Dataset, y: ndarray, K: ndarray, X: ndarray, E: ndarray, rho: ndarray, target_mdl: Model, identifier: str, parametric: bool = False) 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 (xarray.Dataset) – A dataset containing counts from the experiment and configurations

  • qubit_layout (List[int]) – The list of qubits for the current GST experiment

  • y (ndarray) – The circuit outcome probabilities as a num_povm x num_circuits array

  • 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 (3D 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

  • target_mdl (pygsti model object) – The target gate set

  • 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:

  • X_array (ndarray) – Array containing all estimated gate tensors of different bootstrapping repetitions along first axis

  • E_array (ndarray) – Array containing all estimated POVM tensors of different bootstrapping repetitions along first axis

  • rho_array (ndarray) – Array containing all estimated initial states of different bootstrapping repetitions along first axis

  • df_g_array (ndarray) – Contains gate quality measures of bootstrapping repetitions

  • df_o_array (ndarray) – Contains SPAM and other quality measures of bootstrapping repetitions

Return type:

tuple[Any, Any, Any, Any, Any]