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

Improve the qiskit.algorithms docs: clearly show legacy vs. primitive algorithms #9382

Merged
merged 15 commits into from
Jan 23, 2023

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Jan 18, 2023

Emphasize the split in primitive-based and legacy algorithms more clearly

Summary

More clearly emphasize that for the (minimum) eigensolvers there is currently a duplication of algorithms: the legacy, QuantumInstance-based algorithms that are pending deprecation and the new, primitive-based ones.

Details and comments

An alternative would be to keep the separate headings and link to the non-deprecated one, like in the screenshot for the time evolvers below. However since the headings are "Eigensolvers" vs. "Eigen Solvers" I think it would be nice to merge them.
image

Emphasize the split in primitive-based and legacy algorithms more clearly
@Cryoris Cryoris added documentation Something is not clear or an error documentation Changelog: None Do not include in changelog labels Jan 18, 2023
@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 Jan 18, 2023

Pull Request Test Coverage Report for Build 3984526255

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 84.89%

Totals Coverage Status
Change from base Build 3971839797: -0.03%
Covered Lines: 66517
Relevant Lines: 78357

💛 - Coveralls

qiskit/algorithms/__init__.py Outdated Show resolved Hide resolved
qiskit/algorithms/__init__.py Outdated Show resolved Hide resolved
qiskit/algorithms/__init__.py Show resolved Hide resolved
qiskit/algorithms/__init__.py Outdated Show resolved Hide resolved
Cryoris and others added 2 commits January 19, 2023 14:22
Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>
@mtreinish mtreinish added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jan 19, 2023
@mtreinish mtreinish added this to the 0.23.0 milestone Jan 19, 2023
ElePT
ElePT previously approved these changes Jan 19, 2023
Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

LGTM! I will wait to see the rendered docs before merging, just in case.

@mtreinish mtreinish added the on hold Can not fix yet label Jan 19, 2023
@mtreinish
Copy link
Member

I've marked this on hold to preserve the CI bandwidth. We can merge this after rc1 is tagged since it's a bugfix release. After rc1 is tagged lets remove the on hold label

@woodsp-ibm
Copy link
Member

In the future, primitive-based Minimum Eigensolvers should be used in place of the legacy :class:.QuantumInstance-based ones.

Ideally we would like people to start using these new ones now (not in the future) for any new code (and maybe even update existing code), as the the legacy ones ones, while they continue to work, will soon be deprecated and later removed. Hence the "In the future, " bit seems like it could be improved (I just quoted one example above). In the future you will only be able to use these. Now you can too and indeed we recommend you do use these rather than the legacy versions.

@mtreinish mtreinish removed the on hold Can not fix yet label Jan 19, 2023
@Cryoris
Copy link
Contributor Author

Cryoris commented Jan 20, 2023

That's a good point, how about something like

These algorithms are based on the Qiskit Primitives, a new execution paradigm that replaces the use
of :class:`.QuantumInstance` in algorithms. To ensure continued support and development, we recommend 
using the primitive-based Eigensolvers in place of the legacy :class:`.QuantumInstance`-based ones.

?

@woodsp-ibm
Copy link
Member

That's a good point, how about something like

Looks much better to me thx!

@Cryoris
Copy link
Contributor Author

Cryoris commented Jan 22, 2023

Done in bf1f6cc 👍🏻

@mergify mergify bot merged commit e58ac56 into Qiskit:main Jan 23, 2023
mergify bot pushed a commit that referenced this pull request Jan 23, 2023
…tive algorithms (#9382)

* Algorithms init cleanup

Emphasize the split in primitive-based and legacy algorithms more clearly

* add "pending deprecation" in heading

* apply same layout to time evolvers

* temporarily pin to get CI done, merge from main later

* pin to 1.23.1

* remove "pending deprecation"

* add missing TrotterQRTE import

* Apply suggestions from code review

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>

* trailing whitespaces

* more trailing whitespace -- this time at front

* reword

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e58ac56)
mergify bot added a commit that referenced this pull request Jan 23, 2023
…tive algorithms (#9382) (#9415)

* Algorithms init cleanup

Emphasize the split in primitive-based and legacy algorithms more clearly

* add "pending deprecation" in heading

* apply same layout to time evolvers

* temporarily pin to get CI done, merge from main later

* pin to 1.23.1

* remove "pending deprecation"

* add missing TrotterQRTE import

* Apply suggestions from code review

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>

* trailing whitespaces

* more trailing whitespace -- this time at front

* reword

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e58ac56)

Co-authored-by: Julien Gacon <gaconju@gmail.com>
ElePT added a commit to ElePT/qiskit that referenced this pull request Jun 27, 2023
…tive algorithms (Qiskit#9382)

* Algorithms init cleanup

Emphasize the split in primitive-based and legacy algorithms more clearly

* add "pending deprecation" in heading

* apply same layout to time evolvers

* temporarily pin to get CI done, merge from main later

* pin to 1.23.1

* remove "pending deprecation"

* add missing TrotterQRTE import

* Apply suggestions from code review

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>

* trailing whitespaces

* more trailing whitespace -- this time at front

* reword

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT added a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
…tive algorithms (Qiskit/qiskit#9382)

* Algorithms init cleanup

Emphasize the split in primitive-based and legacy algorithms more clearly

* add "pending deprecation" in heading

* apply same layout to time evolvers

* temporarily pin to get CI done, merge from main later

* pin to 1.23.1

* remove "pending deprecation"

* add missing TrotterQRTE import

* Apply suggestions from code review

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>

* trailing whitespaces

* more trailing whitespace -- this time at front

* reword

Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.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
Labels
Changelog: None Do not include in changelog documentation Something is not clear or an error documentation 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.

6 participants