iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common.fit_decay_lmfit

iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common.fit_decay_lmfit#

iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common.fit_decay_lmfit(func: Callable, qubit_set: List[int], data: List[List[float]] | List[List[List[float]]], rb_identifier: str, simultaneous_fit_vars: List[str] | None = None) Tuple[ndarray, Parameters]#

Perform a fitting routine for 0th-order (Ap^m+B) RB using lmfit

Parameters:
  • func (Callable) – the model function for fitting

  • qubit_set (List[int]) – the qubits entering the model

  • data (List[List[float]] | List[List[List[float]]]) – the data to be fitted

  • rb_identifier (str) – the RB identifier, either “stdrb”, “irb” or “mrb”

  • simultaneous_fit_vars (List[str], optional) – the list of variables used to fit simultaneously

Returns:

A tuple of fitting data (list of lists of average fidelities or polarizations) and MRB fit parameters

Return type:

Tuple[ndarray, Parameters]