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

Remove deprecated qiskit.algorithms module #11086

Merged
merged 14 commits into from
Nov 11, 2023

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Oct 23, 2023

Summary

This PR partially addresses #10991 by removing qiskit.algorithms and test.python.algorithms, updating the related sphinx references, and removing the API reference entry.

Details and comments

This is PR # 2 of the "Opflow & Algorithms deprecation series", it is on hold until #11099 is merged, and blocks the opflow removal PR (#11111).

@ElePT ElePT added Changelog: Removal Include in the Removed section of the changelog mod: algorithms Related to the Algorithms module labels Oct 23, 2023
@ElePT ElePT added this to the 1.0.0 milestone Oct 23, 2023
@coveralls
Copy link

coveralls commented Oct 23, 2023

Pull Request Test Coverage Report for Build 6787737163

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 454 unchanged lines in 38 files lost coverage.
  • Overall coverage decreased (-1.0%) to 85.906%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/library/blueprintcircuit.py 1 92.24%
qiskit/circuit/library/evolved_operator_ansatz.py 1 85.12%
qiskit/opflow/state_fns/operator_state_fn.py 1 80.22%
qiskit/opflow/state_fns/state_fn.py 1 81.88%
qiskit/primitives/utils.py 1 87.8%
qiskit/providers/backend.py 1 81.76%
qiskit/providers/basicaer/basicaerprovider.py 1 94.34%
qiskit/quantum_info/operators/symplectic/pauli_list.py 1 83.16%
qiskit/quantum_info/operators/symplectic/pauli.py 1 83.47%
qiskit/quantum_info/operators/symplectic/random.py 1 96.97%
Totals Coverage Status
Change from base Build 6751909510: -1.0%
Covered Lines: 65906
Relevant Lines: 76719

💛 - Coveralls

@kdk kdk modified the milestones: 1.0.0, 1.0.0pre1 Oct 30, 2023
@ElePT ElePT marked this pull request as ready for review November 6, 2023 12:29
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

@ElePT ElePT removed the on hold Can not fix yet label Nov 6, 2023
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, Elena. Do you know how much work is needed to fix Neko in all the relevant places before we merge this? Technically Neko isn't part of the branch protections (iirc), but it'd still be better to have all downstream projects migrated to qiskit_algorithms before we remove this.

at the level of circuits, pulses, and algorithms.
at the level of circuits and pulses.
Copy link
Member

Choose a reason for hiding this comment

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

😢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "fix" was merged 10 mins ago Qiskit/qiskit-neko#34. I've re-triggered the CI to see if it passes now.

and can be found on PyPi or `GitHub <https://github.com/qiskit-community/qiskit-algorithms>`_.
The decision to migrate the algorithms module to a separate package
was made to clarify the purpose Qiskit and make a distinction between the tools
and libraries built on top of it.
Copy link
Member

Choose a reason for hiding this comment

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

Not all qiskit.algorithms was migrated. Only the algorithm code that uses primitives. I think it was mentioned in prior release notes that if any of opflow/Quantum instance based algorithm function was still being used a user would first need to migrate to the primitive based algorithms. Should we briefly mention this aspect again here? Or perhaps minimally change The code has been migrated... to The primitive based algorithms from this code have been migrated... or something like that? though perhaps that's less clear if you had not been paying attention and things still worked!

@woodsp-ibm
Copy link
Member

What is the intent to deal with qiskit/utils/validation.py. That was used by algorithms and some apps (not sure about opflow). Maybe it needs to stay for 0.46 given it was overlooked when the algorithms&opflow were initially deprecated. It presumably does vanish for 1.0 which this PR is labelled for.

@ElePT
Copy link
Contributor Author

ElePT commented Nov 7, 2023

What is the intent to deal with qiskit/utils/validation.py. That was used by algorithms and some apps (not sure about opflow). Maybe it needs to stay for 0.46 given it was overlooked when the algorithms&opflow were initially deprecated. It presumably does vanish for 1.0 which this PR is labelled for.

I was planning to remove the deprecated utils (validation and algorithm globals) in a follow-up PR, I don't remember the exact reason why I didn't do it all at once, but I remember trying and concluding that it would be difficult before the opflow removal. So the plan is to merge this PR, then #11111 and finally the PR deleting these utils you mentioned. These removals are targeted for 1.0, and the deprecated code will remain issuing a warning in0.46

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks for shepherding everything else through this, Elena!

@jakelishman jakelishman added this pull request to the merge queue Nov 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 10, 2023
@ElePT ElePT added this pull request to the merge queue Nov 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 10, 2023
@jakelishman jakelishman added this pull request to the merge queue Nov 11, 2023
Merged via the queue into Qiskit:main with commit 7ef9547 Nov 11, 2023
14 checks passed
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Dec 3, 2023
With the removal of algorithms and opflow in Qiskit#11324, Qiskit#11111, and Qiskit#11086
several optional test dependencies are no longer used in the code base.
This commit removes them from requirements-optional.txt as several have
compatibility issues with Python 3.12 and are causing failures in the
nightly builds. Since they're no longer used we shouldn't bother
installing them anymore.
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Dec 3, 2023
With the removal of algorithms and opflow in Qiskit#11324, Qiskit#11111, and Qiskit#11086
along with the removal of the BIPMapping transpiler pass in Qiskit#10526
several optional test dependencies are no longer used in the code base.
This commit removes them from requirements-optional.txt as several have
compatibility issues with Python 3.12 and are causing failures in the
nightly builds. Since they're no longer used we shouldn't bother
installing them anymore.
github-merge-queue bot pushed a commit that referenced this pull request Dec 3, 2023
With the removal of algorithms and opflow in #11324, #11111, and #11086
along with the removal of the BIPMapping transpiler pass in #10526
several optional test dependencies are no longer used in the code base.
This commit removes them from requirements-optional.txt as several have
compatibility issues with Python 3.12 and are causing failures in the
nightly builds. Since they're no longer used we shouldn't bother
installing them anymore.
jakelishman added a commit to jakelishman/qiskit-terra that referenced this pull request Dec 20, 2023
This seems to have been missed during Qiskitgh-11086, which removed all the
other test files.  It hasn't been causing test-collection failures
because the `test/python/algorithms/__init__.py` file was correctly
removed, so this directory did not count as a package.
github-merge-queue bot pushed a commit that referenced this pull request Dec 21, 2023
This seems to have been missed during gh-11086, which removed all the
other test files.  It hasn't been causing test-collection failures
because the `test/python/algorithms/__init__.py` file was correctly
removed, so this directory did not count as a package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog mod: algorithms Related to the Algorithms module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants