-
Notifications
You must be signed in to change notification settings - Fork 131
RB experiment #25
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
Merged
Merged
RB experiment #25
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eliarbel
reviewed
Apr 13, 2021
yaelbh
reviewed
Apr 18, 2021
yaelbh
reviewed
Apr 18, 2021
yaelbh
reviewed
Apr 18, 2021
yaelbh
reviewed
Apr 18, 2021
yaelbh
reviewed
Apr 18, 2021
* Add CurveFitAnalysis class * Get outcome label from metadata * Fix import error message if no matplotlib * Add option for fitting means of batched data sets * Reorganize helper functions into separate file * Add curve_fit, multi_curve_fit, and plotting functions for xy data * Refactor example CurveFitAnalysis class to use library functions * Add curve fitting data * Remove CurveFitAnalysis class and leave as library functions * Linting * Clean up curve_fit_data * Remove unneeded check for meas level now that data processor function is an arg * Add optional kwargs for x and series metadata keys for extracting data * Run black * Add filters to curve fit data * Reorganize files * Move curve_fit_data and mutli_curve_fit_data to curve_fitting.py * Move other processing functions to `data_processing.py` * Remove unneeded init import * Initial review edits * Separate x and series data for multi curve fit Rename curve_fit_data to process_curve_data Rename multi_curve_fit_data to process_multi_curve_data * Allow passing p0, and bounds as dict to curve fit * Add sigma to mean_xy_data If sigma is provided the mean and variance is computed using inverse-variance weighting, otherwise it is computed as the sample mean and biased sample variance. * Set default absolute_sigma = True * Fix logical check on np array * Use reduced chi-squared calculation * fixup data processing * Fix error in level2_probabilities multiplying by shots instead of dividing * Add explicit method kwarg for mean_xy_data * Add basic tests for curve fitting * More review edits * Change chisq -> reduced_chisq in result and docs * add dof (degrees of freedom) to returned results * add documentation about sigma by default being absolute sigma. Co-authored-by: Helena Zhang <helena@astbb.com>
yaelbh
approved these changes
Apr 20, 2021
ShellyGarion
approved these changes
Apr 20, 2021
coruscating
approved these changes
Apr 20, 2021
paco-ri
pushed a commit
to paco-ri/qiskit-experiments
that referenced
this pull request
Jul 11, 2022
* RB experiment class based on Chris' draft * Unifying sampling procedures * Some more unification * Style * Style fixes * Analysis now works directly with curve_fit functions * Added plotting (ad-hoc solution for now) * Linting * Adding error bars to plots * fixed link in readme (qiskit-community#15) * Curve fitting analysis helper functions (qiskit-community#19) * Add CurveFitAnalysis class * Get outcome label from metadata * Fix import error message if no matplotlib * Add option for fitting means of batched data sets * Reorganize helper functions into separate file * Add curve_fit, multi_curve_fit, and plotting functions for xy data * Refactor example CurveFitAnalysis class to use library functions * Add curve fitting data * Remove CurveFitAnalysis class and leave as library functions * Linting * Clean up curve_fit_data * Remove unneeded check for meas level now that data processor function is an arg * Add optional kwargs for x and series metadata keys for extracting data * Run black * Add filters to curve fit data * Reorganize files * Move curve_fit_data and mutli_curve_fit_data to curve_fitting.py * Move other processing functions to `data_processing.py` * Remove unneeded init import * Initial review edits * Separate x and series data for multi curve fit Rename curve_fit_data to process_curve_data Rename multi_curve_fit_data to process_multi_curve_data * Allow passing p0, and bounds as dict to curve fit * Add sigma to mean_xy_data If sigma is provided the mean and variance is computed using inverse-variance weighting, otherwise it is computed as the sample mean and biased sample variance. * Set default absolute_sigma = True * Fix logical check on np array * Use reduced chi-squared calculation * fixup data processing * Fix error in level2_probabilities multiplying by shots instead of dividing * Add explicit method kwarg for mean_xy_data * Add basic tests for curve fitting * More review edits * Change chisq -> reduced_chisq in result and docs * add dof (degrees of freedom) to returned results * add documentation about sigma by default being absolute sigma. Co-authored-by: Helena Zhang <helena@astbb.com> * Example notebook * Linting and documentation * Some more linting * Small change * Linting Co-authored-by: Yael Ben-Haim <yaelbh@il.ibm.com> Co-authored-by: Christopher J. Wood <cjwood@us.ibm.com> Co-authored-by: Helena Zhang <helena@astbb.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR build upon Chris' RB proposal, slightly modifying it to enable easy extension to other types of RB (interleaved, purity, CNOT-dihedral).
Details and comments