-
Notifications
You must be signed in to change notification settings - Fork 34
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
Refactor reconstruct_expectation_values #391
Conversation
…toolbox into reconstruct
…toolbox into reconstruct
This reverts commit cd95e28.
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.
Thanks, this is looking pretty great already. Right now, it's a net loss of 13 lines 🎉. I will comb through it more carefully shortly.
Co-authored-by: Jim Garrison <garrison@ibm.com>
Yes, and most of the added lines are documentation and tests; whereas, most of the removed lines are source code. Hooray |
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
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.
Thanks -- this looks great. Final tally: net addition of 23 lines, even when counting docstrings, new tests, and the release notes 🎉.
As a follow-up to #385 and in the larger effort associated with #363 , this PR refactors
reconstruct_expectation_values
to accept the outputs from the Sampler primitives directly (with the assumption that the metadata contains QPD bit information).This PR will also refactor
execute_experiments
to output a data structure which can also be consumed byreconstruct_expectation_values
. While this will be a breaking change, it will allow us to prevent an abrupt removal of a core function. Additionally, this breaking change actually results in returning more info to the user fromexecute_experiments
. The user will now have the entire SamplerResult object(s), including the QPD bit information; whereas, before they only got the output quasi-dists and qpd bit info.