Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.ignis.verification.InterleavedRBFitter

class InterleavedRBFitter(original_result, interleaved_result, cliff_lengths, rb_pattern=None)

GitHub

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.

__init__

__init__(original_result, interleaved_result, cliff_lengths, rb_pattern=None)

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.

Methods

__init__(original_result, …[, rb_pattern])param original_resultlist of results of the
add_data(new_original_result, …[, rerun_fit])Add a new result.
calc_data()Retrieve probabilities of success from execution results.
calc_statistics()Extract averages and std dev.
fit_data()Fit the interleaved RB results.
fit_data_pattern(patt_ind, fit_guess[, …])Fit the RB results of a particular pattern to an exponential curve.
plot_rb_data([pattern_index, ax, add_label, …])Plot interleaved randomized benchmarking data of a single pattern.

Attributes

cliff_lengthsReturn clifford lengths.
fitReturn fit as a 2 element list.
fit_intReturn interleaved fit parameters.
raw_dataReturn raw_data as a 2 element list.
rb_fit_funReturn the fit function rb_fit_fun.
rbfit_intReturn the interleaved RB fitter.
rbfit_stdReturn the original RB fitter.
resultsReturn all the results as a 2 element list.
seedsReturn the number of loaded seeds as a 2 element list.
ydataReturn ydata (means and std devs) as a 2 element list.

add_data

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

calc_data()

Retrieve probabilities of success from execution results.

Outputs results into an internal variables: _raw_original_data and _raw_interleaved_data

calc_statistics

calc_statistics()

Extract averages and std dev.

Output [ydata_original, ydata_interleaved]

cliff_lengths

Return clifford lengths.

fit

Return fit as a 2 element list.

fit_data

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

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.

fit_int

Return interleaved fit parameters.

plot_rb_data

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.

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.

Was this page helpful?
Report a bug or request content on GitHub.