-
Notifications
You must be signed in to change notification settings - Fork 131
Add fit model to curve analysis #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fit model to curve analysis #238
Conversation
| @@ -1,158 +1,159 @@ | |||
| # This code is part of Qiskit. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why GitHub is showing this entire file as changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is it's different newline characters (windows vs unix)
| y = {\rm amp} \sin\left(2 \pi {\fm freq} x + {\rm phase}\right) + {\rm baseline} | ||
| """ | ||
| return amp * np.cos(2 * np.pi * freq * x + phase) + baseline | ||
| return amp * np.sin(2 * np.pi * freq * x + phase) + baseline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
blakejohnson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a nice enhancement.
…ade/math_model # Conflicts: # qiskit_experiments/curve_analysis/curve_analysis.py # qiskit_experiments/curve_analysis/curve_data.py # qiskit_experiments/library/calibration/analysis/drag_analysis.py # qiskit_experiments/library/calibration/analysis/fine_amplitude_analysis.py # test/curve_analysis/test_curve_fit.py # test/randomized_benchmarking/test_rb_analysis.py
* add fit model metadata * update curve fit test * update ub test * black * fit model description defaults to None * fix descriptions * update rb test cache files * add reno * fix typo * update reno
Summary
This adds a fit model information to analysis result generated by a
CurveAnalysissubclass.Requested by @blakejohnson
Details and comments
The latex curve description is attached to
SeriesDef, which is loaded by theCurveAnalysisand attached to the analysis result. User can directly find fit model without reading analysis class API docs. Thefit_modelsfield is a dictionary with a key of curve series name (defaults to'Series-0').