Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

InterleavedRBFitter

InterleavedRBFitter(original_result, interleaved_result, cliff_lengths, rb_pattern=None) GitHub(opens in a new tab)

Class for fitters for interleaved RB, derived from RBFitterBase class.

Contains two RBFitter objects: the original RBFitter and the interleaved RBFitter.

Parameters

  • original_result (list) – list of results of the original RB sequence (qiskit.Result).
  • interleaved_result (list) – list of results of the interleaved RB sequence (qiskit.Result).
  • cliff_lengths (list) – the Clifford lengths, 2D list i x j where i is the number of patterns, j is the number of cliffords lengths.
  • rb_pattern (list) – the pattern for the RB sequences.

Attributes

cliff_lengths

Return clifford lengths.

fit

Return fit as a 2 element list.

fit_int

Return interleaved fit parameters.

raw_data

Return raw_data as a 2 element list.

rb_fit_fun

Return the fit function rb_fit_fun.

rbfit_int

Return the interleaved RB fitter.

rbfit_std

Return the original RB fitter.

results

Return all the results as a 2 element list.

seeds

Return the number of loaded seeds as a 2 element list.

ydata

Return ydata (means and std devs) as a 2 element list.


Methods

add_data

InterleavedRBFitter.add_data(new_original_result, new_interleaved_result, rerun_fit=True)

Add a new result.

Parameters

  • new_original_result (list) – list of RB results of the original circuits.
  • new_interleaved_result (list) – list of RB results of the interleaved circuits.
  • rerun_fit (bool) – re-calculate the means and fit the result.

Additional information:

Assumes that the executed ‘result’ is the output of circuits generated by randomized_benchmarking_seq.

calc_data

InterleavedRBFitter.calc_data()

Retrieve probabilities of success from execution results.

Outputs results into an internal variables: _raw_original_data and _raw_interleaved_data

calc_statistics

InterleavedRBFitter.calc_statistics()

Extract averages and std dev.

Output [ydata_original, ydata_interleaved]

fit_data

InterleavedRBFitter.fit_data()

Fit the interleaved RB results. Fit each of the patterns.

According to the paper: “Efficient measurement of quantum gate error by interleaved randomized benchmarking” (arXiv:1203.4550) - Equations (4) and (5).

Puts the results into a list of fit dictionaries: where each dictionary corresponds to a pattern and has fields:

  • ‘epc_est’ - the estimated error per the interleaved Clifford.
  • ‘epc_est_error’ - the estimated error derived from the params_err.
  • ‘systematic_err’ - systematic error bound of epc_est.
  • ‘systematic_err_L’ = epc_est - systematic_err (left error bound).
  • ‘systematic_err_R’ = epc_est + systematic_err (right error bound).

fit_data_pattern

InterleavedRBFitter.fit_data_pattern(patt_ind, fit_guess, fit_index=0)

Fit the RB results of a particular pattern to an exponential curve.

Parameters

  • patt_ind (int) – index of the data to fit.
  • fit_guess (list) – guess values for the fit.
  • fit_index (int) – 0 fit the standard data, 1 fit the interleaved data.

plot_rb_data

InterleavedRBFitter.plot_rb_data(pattern_index=0, ax=None, add_label=True, show_plt=True)

Plot interleaved randomized benchmarking data of a single pattern.

Parameters

  • pattern_index (int) – which RB pattern to plot.
  • ax (Axes) – plot axis (if passed in).
  • add_label (bool) – Add an EPC label.
  • show_plt (bool) – display the plot.

Raises

ImportError – if matplotlib is not installed.

Was this page helpful?