-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Ensure aux_operator eigenvalues are normalized #5496
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
Merged
mergify
merged 5 commits into
Qiskit:master
from
mrossinek:ensure-normalized-aux-op-values-in-vqe
Dec 28, 2020
Merged
Ensure aux_operator eigenvalues are normalized #5496
mergify
merged 5 commits into
Qiskit:master
from
mrossinek:ensure-normalized-aux-op-values-in-vqe
Dec 28, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As reported on multiple occasions in Qiskit Aqua ([1], [2]), the eigenvalues of the auxiliary operators are not correctly normalized when the QASM backend is used. This commit fixes this short-coming by applying the same normalization to the VQE's eigenstate when obtained from a QASM backend (in which case this is a dictionary) as done by the `CircuitSampler` in its `sample_circuits` function. The case of the statevector backend is unaffected by this change, as it will return the eigenstate as a list. A unittest is added which asserts this behavior. [1]: https://github.com/Qiskit/qiskit-aqua/issues/1460 [2]: qiskit-community/qiskit-aqua#1467 Co-authored-by: Julien Gacon <gaconju@gmail.com>
ikkoham
approved these changes
Dec 11, 2020
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.
Thank you for the previous PR. LGTM.
Cryoris
approved these changes
Dec 28, 2020
molar-volume
pushed a commit
to molar-volume/qiskit-terra
that referenced
this pull request
Dec 29, 2020
As reported on multiple occasions in Qiskit Aqua ([1], [2]), the eigenvalues of the auxiliary operators are not correctly normalized when the QASM backend is used. This commit fixes this short-coming by applying the same normalization to the VQE's eigenstate when obtained from a QASM backend (in which case this is a dictionary) as done by the `CircuitSampler` in its `sample_circuits` function. The case of the statevector backend is unaffected by this change, as it will return the eigenstate as a list. A unittest is added which asserts this behavior. [1]: https://github.com/Qiskit/qiskit-aqua/issues/1460 [2]: qiskit-community/qiskit-aqua#1467 Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot
added a commit
that referenced
this pull request
Jan 13, 2021
* 1. params are required in convert method in GradientBased and HessianBased subclasses 2. fix on handling params of type ParameterExpression * Update qiskit/opflow/gradients/gradient.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * passmanager(..., callback=...) parameter removed (#5522) * passmanager callback removal * unused-import * reno * better initial_layout validation (#5526) Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com> * 1) unit tests modified to test ParameterVector input for Gradient, NaturalGradient, QFI and Hessian 2) index method added to ParameterVector 3) handling of ParameterVector changed for Hessian to be consistent with list params * Hessian with respect to vector-like params returns matrix, unit test modified accordingly * Add PiecewiseChebyshev arithmetic circuit (#5364) * general polynomial approximation * release notes * fix qubit re-allocation * fix re-calling build * Update qiskit/circuit/library/arithmetic/piecewise_chebyshev.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update qiskit/circuit/library/arithmetic/piecewise_chebyshev.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update qiskit/circuit/library/arithmetic/piecewise_chebyshev.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * fix indentation lint error * move tests to library module * Add suggestions from code review Co-authored-by: Julien Gacon <gaconju@gmail.com> * Ensure aux_operator eigenvalues are normalized (#5496) As reported on multiple occasions in Qiskit Aqua ([1], [2]), the eigenvalues of the auxiliary operators are not correctly normalized when the QASM backend is used. This commit fixes this short-coming by applying the same normalization to the VQE's eigenstate when obtained from a QASM backend (in which case this is a dictionary) as done by the `CircuitSampler` in its `sample_circuits` function. The case of the statevector backend is unaffected by this change, as it will return the eigenstate as a list. A unittest is added which asserts this behavior. [1]: https://github.com/Qiskit/qiskit-aqua/issues/1460 [2]: qiskit-community/qiskit-aqua#1467 Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * Hessian with respect to vector-like param returns matrix, unit test modified accordingly Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Luciano Bello <luciano.bello@ibm.com> Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com> Co-authored-by: Almudena Carrera Vazquez <almudenacarreravazquez@hotmail.com> Co-authored-by: Max Rossmannek <oss@zurich.ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this pull request
Jun 27, 2023
As reported on multiple occasions in Qiskit Aqua ([1], [2]), the eigenvalues of the auxiliary operators are not correctly normalized when the QASM backend is used. This commit fixes this short-coming by applying the same normalization to the VQE's eigenstate when obtained from a QASM backend (in which case this is a dictionary) as done by the `CircuitSampler` in its `sample_circuits` function. The case of the statevector backend is unaffected by this change, as it will return the eigenstate as a list. A unittest is added which asserts this behavior. [1]: https://github.com/Qiskit/qiskit-aqua/issues/1460 [2]: qiskit-community/qiskit-aqua#1467 Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms-test
that referenced
this pull request
Jul 17, 2023
As reported on multiple occasions in Qiskit Aqua ([1], [2]), the eigenvalues of the auxiliary operators are not correctly normalized when the QASM backend is used. This commit fixes this short-coming by applying the same normalization to the VQE's eigenstate when obtained from a QASM backend (in which case this is a dictionary) as done by the `CircuitSampler` in its `sample_circuits` function. The case of the statevector backend is unaffected by this change, as it will return the eigenstate as a list. A unittest is added which asserts this behavior. [1]: https://github.com/Qiskit/qiskit-aqua/issues/1460 [2]: qiskit-community/qiskit-aqua#1467 Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Julien Gacon <gaconju@gmail.com> 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This migrates qiskit-community/qiskit-aqua#1473 to Terra, now that the Aqua core has been merged.
As reported on multiple occasions in Qiskit Aqua (https://github.com/Qiskit/qiskit-aqua/issues/1460, qiskit-community/qiskit-aqua#1467), the
eigenvalues of the auxiliary operators are not correctly normalized when
the QASM backend is used.
Details and comments
This commit fixes this short-coming by applying the same normalization
to the VQE's eigenstate when obtained from a QASM backend (in which case
this is a dictionary) as done by the
CircuitSampler
in itssample_circuits
function.The case of the statevector backend is unaffected by this change, as it
will return the eigenstate as a list.
A unittest is added which asserts this behavior.
Co-authored-by: Julien Gacon gaconju@gmail.com