fit_t2_results¶
-
forest.benchmarking.qubit_spectroscopy.fit_t2_results(times: Sequence[float], y_expectations: Sequence[float], y_std_errs: Sequence[float] = None, detuning: float = 5000000.0, param_guesses: tuple = None) → lmfit.model.ModelResult¶ Wrapper for fitting the results of a ObservablesExperiment; simply extracts key parameters and passes on to the standard fit.
The estimate for T2 can be found in the returned fit.params[‘decay_constant’]
Parameters: - times – the times at which the y_expectations were measured. The units of the time determine the units of the T2 estimate, decay_constant. Here we set the default guess to O(10) which corresponds to the times being given in units of microseconds.
- y_expectations – expectation of Y measured at each time for a qubit
- y_std_errs – std_err of the Y expectation, optionally used to weight the fit.
- detuning – the detuning specified in creation of the experiment
- param_guesses – guesses for the (amplitude, decay_constant, offset, baseline, frequency) parameters. The default values assume time is provided in microseconds and detuning is provided in HZ, whereas the frequency is reported in MHZ.
Returns: a ModelResult fit with estimates of the Model parameters, including the T2 ‘decay_constant’