-
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
Fixing and documenting how the Estimator
calculates stds
#12670
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 following people are relevant to this code:
|
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 following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9681788876Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9715313071Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Thank you for fixing the issue. Could you write a release note of bugfix? |
Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Estimator
calculates stdsEstimator
calculates stds
compatible with Pauli-based observables. | ||
compatible with Pauli-based observables. More formally, given an observable of the type | ||
:math:`O=\sum_{i=1}^Na_iP_i`, where :math:`a_i` is a complex number and :math:`P_i` is a | ||
Pauli operator, the estimator calculates the expectation :math:`E(P_i)` of each :math:`P_i` |
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.
mathbb or rn for the E's?
|
||
.. math:: | ||
|
||
\frac{\sum_{i=1}^{n}|a_i|\sqrt{\textrm{Var}\big(P_i\big)}}{\sqrt{N}}\:, |
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.
what is \:
? I've never used that
\frac{\sum_{i=1}^{n}|a_i|\sqrt{\textrm{Var}\big(P_i\big)}}{\sqrt{N}}\:, | |
\frac{\sum_{i=1}^{n}|a_i|\sqrt{\textrm{Var}\big(P_i\big)}}{\sqrt{N}}, |
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.
what's the link to that paper which suggests this? it's not intuitive to me.
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.
Eq. 5 of https://arxiv.org/abs/1908.06942. I added a reference to it in the docstring
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.
\:
leaves a blank space. I normally use it when I have a comma or a break at the end of a full-line equation
Pull Request Test Coverage Report for Build 9809468048Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Pull Request Test Coverage Report for Build 9810207246Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9810752069Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9811721107Details
💛 - Coveralls |
releasenotes/notes/backend-estimator-v2-variance-905c953415ad0e29.yaml
Outdated
Show resolved
Hide resolved
In improving the backend_estimator_v2.py documentation, (unrelated to stds, sorry), there is this comment under
but the lines following the comment don't actually calculate the expectation values.
|
Good catch, @jsaroni. We will update the comment when we update the method. |
…e29.yaml Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Pull Request Test Coverage Report for Build 9994949577Details
💛 - Coveralls |
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.
LGTM
) * riverlane paper * docs * improvement * empty * fix linting and add abs * Update qiskit/primitives/backend_estimator_v2.py Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com> * CR * Update qiskit/primitives/backend_estimator_v2.py Co-authored-by: Ian Hincks <ian.hincks@gmail.com> * CR * indent * Update releasenotes/notes/backend-estimator-v2-variance-905c953415ad0e29.yaml Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com> --------- Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com> Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Summary
This PR slightly modifies the formula used by the
Estimator
to calculatestd
s, and adds details on how thestd
s are computed.Details and comments
Addresses issue 1751.