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

Switch to primitive support in QNSPSA #8682

Merged
merged 12 commits into from
Sep 30, 2022
Merged

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Sep 5, 2022

Summary

Use the Sampler and Fidelity subroutines in QNSPSA.get_fidelity instead of the backend and opflow expectation converter. Using the latter now yields a pending deprecation warning.

Details and comments

The code also became a lot cleaner since we can now just use the ComputeUncompute fidelity instead of computing the overlap manually.

I'm not quite sure if this counts as "New Feature" so feel free to untag!

@Cryoris Cryoris added Changelog: Deprecation Include in "Deprecated" section of changelog Changelog: New Feature Include in the "Added" section of the changelog mod: algorithms Related to the Algorithms module labels Sep 5, 2022
@Cryoris Cryoris requested review from a team, manoelmarques and woodsp-ibm as code owners September 5, 2022 11:50
@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 Sep 5, 2022

Pull Request Test Coverage Report for Build 3156403740

  • 21 of 21 (100.0%) changed or added relevant lines in 1 file are covered.
  • 93 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.1%) to 84.52%

Files with Coverage Reduction New Missed Lines %
qiskit/algorithms/optimizers/qnspsa.py 3 87.8%
src/dense_layout.rs 4 91.89%
src/sabre_swap/neighbor_table.rs 7 69.23%
src/results/marginalization.rs 20 77.01%
src/sabre_swap/mod.rs 59 80.94%
Totals Coverage Status
Change from base Build 3156398177: -0.1%
Covered Lines: 61328
Relevant Lines: 72560

💛 - Coveralls

@woodsp-ibm woodsp-ibm added this to the 0.22 milestone Sep 12, 2022
woodsp-ibm
woodsp-ibm previously approved these changes Sep 29, 2022
Copy link
Member

@woodsp-ibm woodsp-ibm left a comment

Choose a reason for hiding this comment

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

@Cryoris @ElePT Thanks! LGTM

@Cryoris
Copy link
Contributor Author

Cryoris commented Sep 29, 2022

Thank you @ElePT and @woodsp-ibm for pushing this over the finish line! 🙂

@woodsp-ibm
Copy link
Member

@Mergifyio requeue

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2022

requeue

❌ This pull request head commit has not been previously disembarked from queue.

@mergify mergify bot merged commit 259e14e into Qiskit:main Sep 30, 2022
ElePT added a commit to ElePT/qiskit that referenced this pull request Jun 27, 2023
* switch to primitive support in QNSPSA

* attempt to fix sphinx & cyclic import

* add comment about sampler passed positionally

* Update typehints

* revert import

* Apply suggestions from code review

Co-authored-by: ElePT <[email protected]>
Co-authored-by: ElePT <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Steve Wood <[email protected]>
ElePT added a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
* switch to primitive support in QNSPSA

* attempt to fix sphinx & cyclic import

* add comment about sampler passed positionally

* Update typehints

* revert import

* Apply suggestions from code review

Co-authored-by: ElePT <[email protected]>
Co-authored-by: ElePT <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Steve Wood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Deprecation Include in "Deprecated" section of changelog Changelog: New Feature Include in the "Added" section of the changelog mod: algorithms Related to the Algorithms module priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants