Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
convert_lmfit_result¶
- convert_lmfit_result(result, models, xdata, ydata)[source]¶
A helper function to convert LMFIT
MinimizerResult
intoCurveFitResult
.CurveFitResult
is a dataclass that can be serialized with the experiment JSON decoder. In addition, this class converts LMFITParameter
objects into ufloats so that extra parameter computation in the analysis post-processing can perform accurate error propagation with parameter correlation.- Parameters:
result (
MinimizerResult
) – Output from LMFITminimize
.models (
List
[Model
]) – Model used for the fitting. Function description is extracted.xdata (
ndarray
) – X values used for the fitting.ydata (
ndarray
) – Y values used for the fitting.
- Return type:
- Returns:
QiskitExperiments
CurveFitResult
object.