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
EstimatorResultdataclass.Breaking change*
Closes #8100
Changelog: New Feature
Details and comments
valuesfield toexpectation_values.variancesfield, pulling it out ofmetadata.metadatalist 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
metadatatype change from list to tuple; since we can aliasexpectation_valuesto the old namevalueswith the appropriate type casting.To do
Estimatorclass.