fit_rb_results

forest.benchmarking.randomized_benchmarking.fit_rb_results(depths: Sequence[int], z_expectations: Sequence[Sequence[float]], z_std_errs: Sequence[Sequence[float]], num_shots: int = None, param_guesses: tuple = None) → lmfit.model.ModelResult

Fits the results of a standard RB or IRB experiment by converting expectations into survival probabilities (probability of measuring zero) and passing these on to the standard fit.

The estimate for the rb decay can be found in the returned fit.params[‘decay’]

First for each sequence we calculate the mean and variance of the estimated probability of the zeros state given the expectation of all operators with Z terms. We note that the sum of all Z/I operators divided by the dimension is the projector onto the all zeros state, so the sum of all corresponding expectations (including one for all I operator) divided by the dimension is the probability of the all zeros state.

Parameters:
  • depths – the depth of each sequence over which a decay will be fitted
  • z_expectations – the groups of 2**(num_qubits) - 1 expectations estimated for each sequence, where each group of observables has all traceless tensor products of I and Z.
  • z_std_errs – the groups of std_errs for each expectation estimate
  • num_shots
  • param_guesses – guesses for the (amplitude, decay, baseline) parameters
Returns:

a ModelResult fit with estimates of the Model parameters, including the rb ‘decay’