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.

CNOTDihedralRBFitter

class CNOTDihedralRBFitter(cnotdihedral_Z_result, cnotdihedral_X_result, elmnts_lengths, rb_pattern=None)

GitHub

Bases: qiskit.ignis.verification.randomized_benchmarking.fitters.RBFitterBase

Class for fitters for non-Clifford CNOT-Dihedral RB.

Derived from RBFitterBase class. Contains two RBFitter objects.

Parameters

  • cnotdihedral_Z_result (qiskit.Result) – list of results of the RB sequence that measures the ground state.
  • cnotdihedral_X_result (qiskit.Result) – list of results of the RB sequence that measures the +...+>|+...+> state.
  • elmnts_lengths (list) – the group elements lengths, 2D list i x j where i is the number of patterns, j is the number of elements lengths.
  • rb_pattern (list) – the pattern for the RB sequences.

Methods

add_data

CNOTDihedralRBFitter.add_data(new_cnotdihedral_Z_result, new_cnotdihedral_X_result, rerun_fit=True)

Add a new result.

Parameters

  • new_cnotdihedral_Z_result (list) – list of rb results of the cnot-dihedral Z circuits.
  • new_cnotdihedral_X_result (list) – list of rb results of the cnot-dihedral X 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

CNOTDihedralRBFitter.calc_data()

Retrieve probabilities of success from execution results. Outputs results into an internal variable: _raw_data .

calc_statistics

CNOTDihedralRBFitter.calc_statistics()

Extract averages and std dev. Outputs results into an internal variable: _ydata .

fit_data

CNOTDihedralRBFitter.fit_data()

Fit the non-Clifford cnot-dihedral RB results.

Fit each of the patterns. According to the paper:

Scalable randomized benchmarking of non-Clifford gates

Returns

A list of dictionaries where each dictionary corresponds to a pattern and has fields:

  • alpha - alpha parameter of the non-Clifford cnot-dihedral RB.
  • 'alpha_err - the error of the alpha parameter of the non-Clifford cnot-dihedral RB.
  • epg_est - the estimated error per a CNOT-dihedral element.
  • epg_est_error - the estimated error derived from the params_err.

Return type

list

fit_data_pattern

CNOTDihedralRBFitter.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 pattern 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

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

Plot non-Clifford cnot-dihedral 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 EPG label.
  • show_plt (bool) – display the plot.

Raises

ImportError – if matplotlib is not installed.


Attributes

cliff_lengths

Return group elements lengths.

fit

Return fit as a 2 element list.

fit_cnotdihedral

Return cnotdihedral fit parameters.

raw_data

Return raw_data as 2 element list.

rb_fit_fun

Return the fit function rb_fit_fun.

rbfit_X

Return the cnotdihedral X fitter.

rbfit_Z

Return the cnotdihedral Z 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.