fit_t1_results¶
-
forest.benchmarking.qubit_spectroscopy.
fit_t1_results
(times: Sequence[float], z_expectations: Sequence[float], z_std_errs: Sequence[float] = None, param_guesses: tuple = (1.0, 15, 0.0)) → lmfit.model.ModelResult¶ Wrapper for fitting the results of a T1 experiment for a single qubit; simply extracts key parameters and passes on to the standard fit.
The estimate for T1 can be found in the returned fit.params[‘decay_constant’]
Parameters: - times – the times at which the z_expectations were measured. The units of the time determine the units of the T1 estimate, decay_constant. Here we set the default guess to O(10) which corresponds to the times being given in units of microseconds.
- z_expectations – expectation of Z at each time for a qubit initialized to 1
- z_std_errs – std_err of the Z expectation, optionally used to weight the fit.
- param_guesses – guesses for the (amplitude, decay_constant, offset) parameters. Here the default decay_constant of 15 assumes that times are given in units of microseconds.
Returns: a ModelResult fit with estimates of the Model parameters, including the T1 ‘decay_constant’