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 opflow module, QuantumInstance and related utils #11111

Merged
merged 16 commits into from
Nov 24, 2023

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Oct 25, 2023

Summary

This PR partially addresses #10991 by removing qiskit.opflow, qiskit.utils.quantum_instance.py, and related utils:

  • qiskit/utils/backend_utils.py
  • qiskit/utils/measurement_error_mitigation.py
  • qiskit/utils/mitigation/*
  • qiskit/utils/run_circuits.py

As well as removing their unit tests, updating the related sphinx references, and removing the API reference entry.

Details and comments

This is PR # 3 of the "Opflow & Algorithms deprecation series", it is on hold until #11086 is merged.

@ElePT ElePT added Changelog: Removal Include in the Removed section of the changelog on hold Can not fix yet mod: opflow Related to the Opflow module labels Oct 25, 2023
@ElePT ElePT added this to the 1.0.0 milestone Oct 25, 2023
@ElePT ElePT marked this pull request as ready for review November 9, 2023 10:45
@qiskit-bot
Copy link
Collaborator

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

  • @Eric-Arellano
  • @javabster
  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia
  • @ikkoham
  • @levbishop
  • @mtreinish
  • @nkanazawa1989
  • @t-imamichi
  • @woodsp-ibm

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

FYI this will break some cross-references for the migration guides. That's fine because the migration guides are ported already to https://docs.quantum-computing.ibm.com/api/migration-guides and we're planning to switch the qisk.it short links this week to them. The IBM docs will update their links to use the 0.44 version of the API docs

@woodsp-ibm
Copy link
Member

woodsp-ibm commented Nov 9, 2023

FYI: A PR is updating backend_utils for Aer 0.13 compatibility and is designated to be backported #11172 so I imagine we will want that to merge before the module gets deleted by this PR

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

coveralls commented Nov 13, 2023

Pull Request Test Coverage Report for Build 6946461063

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.

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • 71 unchanged lines in 19 files lost coverage.
  • Overall coverage increased (+0.6%) to 86.966%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 1 92.42%
qiskit/circuit/library/evolved_operator_ansatz.py 1 83.96%
qiskit/circuit/library/generalized_gates/pauli.py 1 91.18%
qiskit/circuit/parametertable.py 1 87.4%
qiskit/providers/backend.py 1 81.08%
qiskit/providers/basicaer/basicaertools.py 1 91.23%
qiskit/providers/basicaer/qasm_simulator.py 1 85.42%
qiskit/providers/job.py 1 56.9%
qiskit/quantum_info/states/statevector.py 1 89.69%
qiskit/synthesis/evolution/product_formula.py 1 97.56%
Totals Coverage Status
Change from base Build 6944448524: 0.6%
Covered Lines: 60943
Relevant Lines: 70077

💛 - Coveralls

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 all this, Elena. It looks like we're on the verge of being ready to go, with overzealous type hints in Aer 0.13 being the only thing that prevents Neko from passing and this from merging.

With Qiskit/qiskit-aer#1996 now merged, we're just waiting on the 0.13.1 patch release of Aer, which at the time of writing, looks just about ready to go: Qiskit/qiskit-aer#1983.

qiskit/circuit/library/evolved_operator_ansatz.py Outdated Show resolved Hide resolved
Comment on lines 921 to +924
SPARSE_PAULI_OP_LIST_ELEM
-------------------------

This represents an instance of :class:`.PauliSumOp`.
This represents an instance of :class:`.SparsePauliOp`.
Copy link
Member

Choose a reason for hiding this comment

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

lol

test/python/circuit/library/test_evolution_gate.py Outdated Show resolved Hide resolved
test/python/result/test_sampled_expval.py Outdated Show resolved Hide resolved
Co-authored-by: Jake Lishman <jake@binhbar.com>
jakelishman
jakelishman previously approved these changes Nov 15, 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 all this! I think this PR is completely ready to merge from our side, we're just waiting for Aer 0.13.1 so Neko can pass.

@woodsp-ibm
Copy link
Member

From above, since its still not happened

FYI: A PR is updating backend_utils for Aer 0.13 compatibility and is designated to be backported #11172 so I imagine we will want that to merge before the module gets deleted by this PR

@ElePT
Copy link
Contributor Author

ElePT commented Nov 20, 2023

From above, since its still not happened

FYI: A PR is updating backend_utils for Aer 0.13 compatibility and is designated to be backported #11172 so I imagine we will want that to merge before the module gets deleted by this PR

Approved and added to the merge queue!

@1ucian0 1ucian0 added this pull request to the merge queue Nov 23, 2023
@jakelishman jakelishman removed this pull request from the merge queue due to a manual request Nov 23, 2023
@jakelishman jakelishman added the on hold Can not fix yet label Nov 23, 2023
@jakelishman
Copy link
Member

On hold until Aer 0.13.1 is released.

@ElePT ElePT removed the on hold Can not fix yet label Nov 24, 2023
@ElePT ElePT added this pull request to the merge queue Nov 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 24, 2023
@ElePT ElePT added this pull request to the merge queue Nov 24, 2023
Merged via the queue into Qiskit:main with commit 20839da Nov 24, 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.
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: opflow Related to the Opflow module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants