Skip to content
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

Fix the aggregation argument of SamplingVQE #9221

Merged
merged 4 commits into from
Dec 5, 2022

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Dec 1, 2022

Summary

In the SamplingVQE the aggregation was not passed to the _DiagonalEstimator and therefore had no effect!
Also fixed a bug in the CVaR aggregation function, which overshot the expected value and improved the docs to include an explanation how a custom aggregation should look like.

Thanks @t-imamichi for finding the bug!

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>
@Cryoris Cryoris added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Dec 1, 2022
@qiskit-bot
Copy link
Collaborator

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:

@coveralls
Copy link

coveralls commented Dec 1, 2022

Pull Request Test Coverage Report for Build 3618073711

  • 1 of 2 (50.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 84.559%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 91.49%
Totals Coverage Status
Change from base Build 3617609084: -0.04%
Covered Lines: 62957
Relevant Lines: 74453

💛 - Coveralls

@t-imamichi
Copy link
Member

Thank you for the fix!

@woodsp-ibm woodsp-ibm mentioned this pull request Dec 4, 2022
@mergify mergify bot merged commit 0fe47d2 into Qiskit:main Dec 5, 2022
mergify bot pushed a commit that referenced this pull request Dec 5, 2022
* Fix the ``aggregation`` argument of ``SamplingVQE``

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>

* Update qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py

Co-authored-by: Takashi Imamichi <[email protected]>

Co-authored-by: Takashi Imamichi <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 0fe47d2)
Cryoris added a commit to Cryoris/qiskit-terra that referenced this pull request Jan 12, 2023
* Fix the ``aggregation`` argument of ``SamplingVQE``

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>

* Update qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py

Co-authored-by: Takashi Imamichi <[email protected]>

Co-authored-by: Takashi Imamichi <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Jan 13, 2023
* Fix the ``aggregation`` argument of ``SamplingVQE``

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>

* Update qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py

Co-authored-by: Takashi Imamichi <[email protected]>

Co-authored-by: Takashi Imamichi <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 0fe47d2)

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
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
* Fix the ``aggregation`` argument of ``SamplingVQE``

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>

* Update qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py

Co-authored-by: Takashi Imamichi <[email protected]>

Co-authored-by: Takashi Imamichi <[email protected]>
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
* Fix the ``aggregation`` argument of ``SamplingVQE``

The aggregation was not passed to the DiagonalEstimator and had no effect. Also fixed  a bug in the CVaR aggregation function, which overshot the expected value and improved the docs.

Co-authored-by: Takashi Imamichi <[email protected]>

* Update qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py

Co-authored-by: Takashi Imamichi <[email protected]>

Co-authored-by: Takashi Imamichi <[email protected]>
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
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: algorithms Related to the Algorithms module stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants