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

AdaptVQE threshold improvements #9921

Merged
merged 11 commits into from
Apr 14, 2023
Merged

Conversation

mrossinek
Copy link
Member

Summary

  • adds a new eigenvalue_threshold setting to the AdaptVQE which allows a more fine-tuned control of the convergence based on a minimal change of the eigenvalue with respect to an increasing ansatz
  • renames the previously existing threshold attribute of the AdaptVQE to be called gradient_threshold in order to disambiguate it from the other (new) threshold mentioned above (using the old attribute will now log a PendingDeprecationWarning)

Details and comments

@mrossinek mrossinek added Changelog: New Feature Include in the "Added" section of the changelog mod: algorithms Related to the Algorithms module labels Apr 6, 2023
@mrossinek mrossinek added this to the 0.24.0 milestone Apr 6, 2023
@mrossinek mrossinek requested review from a team, woodsp-ibm and ElePT as code owners April 6, 2023 13:29
@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:

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments below, otherwise the approach LGTM 👍🏻

@coveralls
Copy link

coveralls commented Apr 6, 2023

Pull Request Test Coverage Report for Build 4689430083

  • 30 of 32 (93.75%) changed or added relevant lines in 1 file are covered.
  • 107 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+0.3%) to 85.731%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/algorithms/minimum_eigensolvers/adapt_vqe.py 30 32 93.75%
Files with Coverage Reduction New Missed Lines %
qiskit/circuit/tools/pi_check.py 1 91.23%
qiskit/primitives/backend_sampler.py 1 98.81%
qiskit/primitives/sampler.py 2 97.1%
qiskit/circuit/quantumcircuit.py 3 93.98%
qiskit/primitives/base/base_sampler.py 3 92.68%
qiskit/primitives/estimator.py 3 96.05%
qiskit/pulse/library/waveform.py 3 91.67%
qiskit/algorithms/minimum_eigensolvers/diagonal_estimator.py 5 86.32%
qiskit/primitives/base/base_estimator.py 5 91.38%
qiskit/primitives/primitive_job.py 5 82.5%
Totals Coverage Status
Change from base Build 4678110396: 0.3%
Covered Lines: 70072
Relevant Lines: 81735

💛 - Coveralls

@mrossinek

This comment was marked as resolved.

@mrossinek

This comment was marked as resolved.

@Cryoris Cryoris added this pull request to the merge queue Apr 14, 2023
Merged via the queue into Qiskit:main with commit 714e521 Apr 14, 2023
@mrossinek mrossinek deleted the adapt-vqe-thresholds branch April 14, 2023 13:23
giacomoRanieri pushed a commit to giacomoRanieri/qiskit-terra that referenced this pull request Apr 16, 2023
* Pending-deprecate AdaptVQE.threshold in favor of gradient_threshold

* Adds the AdaptVQE.eigenvalue_threshold attribute

* Add release note

* Apply suggestions from code review

Co-authored-by: Julien Gacon <[email protected]>

* Leverage deprecate_func on AdaptVQE.threshold property

* Test pending deprecation of AdaptVQE.threshold

* Add missing deprecate_func decorator to property setter

* Improve documentation of AdaptVQE.eigenvalue_threshold w.r.t. final iteration

* Adds a unittest for SparsePauliOp support in AdaptVQE

* Attempt to fix test flakiness

* Pick better operator pool for gradients in flaky unittest

---------

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: ElePT <[email protected]>
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
* Pending-deprecate AdaptVQE.threshold in favor of gradient_threshold

* Adds the AdaptVQE.eigenvalue_threshold attribute

* Add release note

* Apply suggestions from code review

Co-authored-by: Julien Gacon <[email protected]>

* Leverage deprecate_func on AdaptVQE.threshold property

* Test pending deprecation of AdaptVQE.threshold

* Add missing deprecate_func decorator to property setter

* Improve documentation of AdaptVQE.eigenvalue_threshold w.r.t. final iteration

* Adds a unittest for SparsePauliOp support in AdaptVQE

* Attempt to fix test flakiness

* Pick better operator pool for gradients in flaky unittest

---------

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: ElePT <[email protected]>
ElePT added a commit to ElePT/qiskit that referenced this pull request Jun 27, 2023
* Pending-deprecate AdaptVQE.threshold in favor of gradient_threshold

* Adds the AdaptVQE.eigenvalue_threshold attribute

* Add release note

* Apply suggestions from code review

Co-authored-by: Julien Gacon <[email protected]>

* Leverage deprecate_func on AdaptVQE.threshold property

* Test pending deprecation of AdaptVQE.threshold

* Add missing deprecate_func decorator to property setter

* Improve documentation of AdaptVQE.eigenvalue_threshold w.r.t. final iteration

* Adds a unittest for SparsePauliOp support in AdaptVQE

* Attempt to fix test flakiness

* Pick better operator pool for gradients in flaky unittest

---------

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: ElePT <[email protected]>
ElePT added a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
* Pending-deprecate AdaptVQE.threshold in favor of gradient_threshold

* Adds the AdaptVQE.eigenvalue_threshold attribute

* Add release note

* Apply suggestions from code review

Co-authored-by: Julien Gacon <[email protected]>

* Leverage deprecate_func on AdaptVQE.threshold property

* Test pending deprecation of AdaptVQE.threshold

* Add missing deprecate_func decorator to property setter

* Improve documentation of AdaptVQE.eigenvalue_threshold w.r.t. final iteration

* Adds a unittest for SparsePauliOp support in AdaptVQE

* Attempt to fix test flakiness

* Pick better operator pool for gradients in flaky unittest

---------

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: ElePT <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog mod: algorithms Related to the Algorithms module priority: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants