PurityRBFitter

class PurityRBFitter(purity_result, npurity, cliff_lengths, rb_pattern=None)[source]

Class for fitter for purity RB.

Derived from RBFitterBase class.

Parameters
  • purity_result (list) – list of results of the 3^n purity RB sequences per seed (qiskit.Result).

  • npurity (int) – equals 3^n (where n is the dimension).

  • 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

PurityRBFitter.cliff_lengths

Return clifford lengths.

PurityRBFitter.fit

Return the purity fit parameters.

PurityRBFitter.raw_data

Return raw data.

PurityRBFitter.rb_fit_fun

Return the fit function rb_fit_fun.

PurityRBFitter.rbfit_pur

Return the purity RB fitter.

PurityRBFitter.results

Return all the results.

PurityRBFitter.seeds

Return the number of loaded seeds.

PurityRBFitter.ydata

Return ydata (means and std devs).

Methods

PurityRBFitter.F234(n, a, b)

Function than maps: 2^n x 3^n –> 4^n , namely: (a,b) –> c where a in 2^n, b in 3^n, c in 4^n

PurityRBFitter.add_data(new_purity_result[, …])

Add a new result.

PurityRBFitter.add_zdict_ops()

Creating all Z-correlators in order to compute the expectation values.

PurityRBFitter.calc_data()

Retrieve probabilities of success from execution results.

PurityRBFitter.calc_statistics()

Extract averages and std dev from the raw data (self._raw_data).

PurityRBFitter.fit_data()

Fit the Purity RB results to an exponential curve.

PurityRBFitter.fit_data_pattern(patt_ind, …)

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

PurityRBFitter.plot_rb_data([pattern_index, …])

Plot purity RB data of a single pattern.