# qiskit.ignis.verification.CNOTDihedralRBFitter¶

class CNOTDihedralRBFitter(cnotdihedral_Z_result, cnotdihedral_X_result, elmnts_lengths, rb_pattern=None)[Quellcode]

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

Derived from RBFitterBase class. Contains two RBFitter objects.

Parameter
• 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.

__init__(cnotdihedral_Z_result, cnotdihedral_X_result, elmnts_lengths, rb_pattern=None)[Quellcode]
Parameter
• 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

 __init__(cnotdihedral_Z_result, …[, …]) param cnotdihedral_Z_result list of results of the add_data(new_cnotdihedral_Z_result, …[, …]) Add a new result. Retrieve probabilities of success from execution results. Extract averages and std dev. Fit the non-Clifford cnot-dihedral 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 non-Clifford cnot-dihedral randomized benchmarking data of a single pattern.

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.
add_data(new_cnotdihedral_Z_result, new_cnotdihedral_X_result, rerun_fit=True)[Quellcode]

Parameter
• 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.

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

calc_data()[Quellcode]

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

calc_statistics()[Quellcode]

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

property cliff_lengths

Return group elements lengths.

property fit

Return fit as a 2 element list.

property fit_cnotdihedral

Return cnotdihedral fit parameters.

fit_data()[Quellcode]

Fit the non-Clifford cnot-dihedral RB results.

Fit each of the patterns. According to the paper:

Scalable randomized benchmarking of non-Clifford gates

Rückgabe

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.

Rückgabetyp

list

fit_data_pattern(patt_ind, fit_guess, fit_index=0)[Quellcode]

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

Parameter
• 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(pattern_index=0, ax=None, add_label=True, show_plt=True)[Quellcode]

Plot non-Clifford cnot-dihedral randomized benchmarking data of a single pattern.

Parameter
• pattern_index (int) – which RB pattern to plot.

• ax (Axes) – plot axis (if passed in).

• show_plt (bool) – display the plot.

Verursacht

ImportError – if matplotlib is not installed.

property raw_data

Return raw_data as 2 element list.

property rb_fit_fun

Return the fit function rb_fit_fun.

property rbfit_X

Return the cnotdihedral X fitter.

property rbfit_Z

Return the cnotdihedral Z fitter.

property results

Return all the results as a 2 element list.

property seeds

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

property ydata

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