-
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
API Regression: VQE aux_op_eigenvalues
return type
#7142
Labels
Milestone
Comments
mrossinek
added a commit
to mrossinek/qiskit
that referenced
this issue
Oct 15, 2021
Ensures a unified API of the `aux_operator_eigenvalues`. Prior to this commit, the returned types of the `NumPyEigensolver` and `VQE` were mismatched. Furthermore, the documented type hint in the `EigensolverResult` was yet another value. This commit unifies the API, documents the expected type properly and adds unittests which assert that this bug remains fixed.
Merged
mergify bot
added a commit
that referenced
this issue
Oct 21, 2021
* Fix #7142 Ensures a unified API of the `aux_operator_eigenvalues`. Prior to this commit, the returned types of the `NumPyEigensolver` and `VQE` were mismatched. Furthermore, the documented type hint in the `EigensolverResult` was yet another value. This commit unifies the API, documents the expected type properly and adds unittests which assert that this bug remains fixed. * Do not map expectation value to real * Compute aux operator standard deviations during VQE * Assert standard deviations in EigensolverResult objects * Improve aux_operator_eigenvalues docstring * Fix NumPyEigensolver threshold check * Run black * Update release note * Avoid ambiguous truth value of numpy arrays * Add aux_op test for qasm-based VQE (non-trivial std dev) * Remove erroneous nesting This was accidentally copied from the `EigensolverResult` case. * Remove release note This fixes a bug in an unreleased feature so this release note is actually not needed (in fact its more confusing than helpful). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this issue
Jun 27, 2023
* Fix Qiskit#7142 Ensures a unified API of the `aux_operator_eigenvalues`. Prior to this commit, the returned types of the `NumPyEigensolver` and `VQE` were mismatched. Furthermore, the documented type hint in the `EigensolverResult` was yet another value. This commit unifies the API, documents the expected type properly and adds unittests which assert that this bug remains fixed. * Do not map expectation value to real * Compute aux operator standard deviations during VQE * Assert standard deviations in EigensolverResult objects * Improve aux_operator_eigenvalues docstring * Fix NumPyEigensolver threshold check * Run black * Update release note * Avoid ambiguous truth value of numpy arrays * Add aux_op test for qasm-based VQE (non-trivial std dev) * Remove erroneous nesting This was accidentally copied from the `EigensolverResult` case. * Remove release note This fixes a bug in an unreleased feature so this release note is actually not needed (in fact its more confusing than helpful). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms-test
that referenced
this issue
Jul 17, 2023
* Fix Qiskit/qiskit#7142 Ensures a unified API of the `aux_operator_eigenvalues`. Prior to this commit, the returned types of the `NumPyEigensolver` and `VQE` were mismatched. Furthermore, the documented type hint in the `EigensolverResult` was yet another value. This commit unifies the API, documents the expected type properly and adds unittests which assert that this bug remains fixed. * Do not map expectation value to real * Compute aux operator standard deviations during VQE * Assert standard deviations in EigensolverResult objects * Improve aux_operator_eigenvalues docstring * Fix NumPyEigensolver threshold check * Run black * Update release note * Avoid ambiguous truth value of numpy arrays * Add aux_op test for qasm-based VQE (non-trivial std dev) * Remove erroneous nesting This was accidentally copied from the `EigensolverResult` case. * Remove release note This fixes a bug in an unreleased feature so this release note is actually not needed (in fact its more confusing than helpful). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Information
main
What is the current behavior?
#6870 changed the returned type of
aux_op_eigenvalues
in theVQE
such that it mismatches that of theNumPyEigensolver
.Steps to reproduce the problem
See any of the
VQE
-based unittests in the Qiskit Nature CI: https://github.com/Qiskit/qiskit-nature/actions/runs/1344253728What is the expected behavior?
The API needs to be fixed.
Suggested solutions
I outlined some observations in an issue comment over at Nature: qiskit-community/qiskit-nature#396 (comment).
I suggest that we:
VQE
to again wrap eachaux_op_eigenvalue
0
NumPyEigensolver
doesaux_op_eigenvalues
(into the_eval_aux_ops
method and theResult
objects which expose these eigenvalues as properties)I will create a PR later today 👍
The text was updated successfully, but these errors were encountered: