-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Upgrade EstimatorResult dataclass #8105
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
I'm not involved in this module at all, so my view isn't especially important, I just wanted to point out that making breaking changes to an API is generally not something we allow within Qiskit. We have a complete deprecation policy, but extensible APIs that other people are meant to implement can't really be changed without some form of versioning, because there's not usually a way to make things valid for two different versions of Terra at the same time. But do note that I'm not involved with primitives at all, so I'm not a reviewer for this change, and welcome to the org! |
We put variance in |
Pull Request Test Coverage Report for Build 2385783224
💛 - Coveralls |
Has any decision been reached already @t-imamichi ? |
I'm afraid that we don't have discussion about metadata yet. |
Outdated, closing and starting anew. |
Summary
Upgrades the
EstimatorResult
dataclass.Breaking change*
Closes #8100
Changelog: New Feature
Details and comments
values
field toexpectation_values
.variances
field, pulling it out ofmetadata
.metadata
list type (mutable) in favor of tuple (immutable).*Assuming that these objects are meant to be consumed by the users, not instantiated, the only breaking change is the
metadata
type change from list to tuple; since we can aliasexpectation_values
to the old namevalues
with the appropriate type casting.To do
Estimator
class.