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

Add deprecation warning on use of qiskit.IBMQ #8080

Merged
merged 14 commits into from
Jan 18, 2023

Conversation

mtreinish
Copy link
Member

Summary

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.

Details and comments

This is on hold until the qiskit-ibm-provider package has its first release

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.
@mtreinish mtreinish added on hold Can not fix yet Changelog: Deprecation Include in "Deprecated" section of changelog labels May 17, 2022
@mtreinish mtreinish added this to the 0.21 milestone May 17, 2022
@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:

qiskit/tools/monitor/overview.py Outdated Show resolved Hide resolved
qiskit/tools/monitor/overview.py Outdated Show resolved Hide resolved
qiskit/__init__.py Outdated Show resolved Hide resolved
qiskit/__init__.py Outdated Show resolved Hide resolved
Comment on lines 138 to 139
"which is accesible from 'qiskit_ibm_provider'. Just replace 'qiskit.IBMQ' "
"with 'qiskit_ibm_provider.IBMProvider'",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This part has an additional sentence "Just replace 'qiskit.IBMQ' with 'qiskit_ibm_provider.IBMProvider'" Is this intended?

qiskit/__init__.py Outdated Show resolved Hide resolved
@mtreinish mtreinish removed the on hold Can not fix yet label Jan 9, 2023
@coveralls
Copy link

coveralls commented Jan 9, 2023

Pull Request Test Coverage Report for Build 3951291056

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 84.874%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/init.py 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/sabre_swap/layer.rs 2 98.95%
qiskit/pulse/library/waveform.py 3 91.67%
Totals Coverage Status
Change from base Build 3951289784: 0.03%
Covered Lines: 66095
Relevant Lines: 77874

💛 - Coveralls

Copy link
Collaborator

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

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

@mtreinish mtreinish requested a review from jyu00 as a code owner January 10, 2023 19:39
@mtreinish
Copy link
Member Author

Overall looks good to me. I did a quick search in the whole repo, and found a few places still need update the new import path. Can you please make those changes?

* https://github.com/Qiskit/qiskit-terra/blob/3241978340f534b76e4cf0e5e25ed16e2af5cf78/tools/update_fake_backends.py#L22

* https://github.com/Qiskit/qiskit-terra/blob/95a97ec53caddc885d02fd353e8d0c745328fd39/qiskit/tools/jupyter/__init__.py#L28

* https://github.com/Qiskit/qiskit-terra/blob/95a97ec53caddc885d02fd353e8d0c745328fd39/qiskit/tools/jupyter/__init__.py#L42

* https://github.com/Qiskit/qiskit-terra/blob/d3243e9e1d0e916e1d2c4af442011605204598b0/qiskit/providers/fake_provider/__init__.py#L73

Done in: e4ed253

I am not sure whether we should also update the path in this line in ibmq_mock.py,

I just dropped that module in: e4ed253 it was only there for legacy reasons in the docs. It's sole usage was for jupyter execute docs to be able to use qiskit.IBMQ and mock the calls to return a fake backend. Since we don't care about pretending that the ibm provider is part of the qiskit namespace anymore and we're no longer using jupyter execute this had no relevance so it was easier to just remove it as I don't think anything externally should have been using it.

* https://github.com/Qiskit/qiskit-terra/blob/95a97ec53caddc885d02fd353e8d0c745328fd39/qiskit/test/ibmq_mock.py#L45

Do you need to add a test for deprecation and a release note as well?

I added a release note in 7ec28f4 tests for this are a bit weird as they require the ibmq provider to be installed which we purposely don't install in tests. All we'd be testing is that a deprecation warning is emitted as we can't really test anything functional about the alias without having credentials and ibmq installed.

@mtreinish
Copy link
Member Author

as I don't think anything externally should have been using it.

Sigh, I stand corrected the ibmq provider was using it for it's jupyter-execute docs which were copied over from terra when that split out (because of course why would it be simple): https://github.com/Qiskit/qiskit-ibmq-provider/search?q=mock_get_backend let me add the function back in for now. We can just drop it when we drop qiskit.IBMQ

Copy link
Collaborator

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

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

Just one small comment for the release note.

Copy link
Collaborator

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

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

LGTM!

@jakelishman jakelishman self-assigned this Jan 17, 2023
@mergify mergify bot merged commit 0257c95 into Qiskit:main Jan 18, 2023
ElePT pushed a commit to ElePT/qiskit-ibm-provider that referenced this pull request Oct 4, 2023
* Add deprecation warning on use of qiskit.IBMQ

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.

* Fix typos

Co-authored-by: Jim Garrison <[email protected]>

* Remove superfluous warnings

* Add pip to warning message

* Fix lint

* Update references to qiskit.IBMQ

* Add release note

* Add back ibmq_mock.py file

* Add link to the migration guide in release note

Co-authored-by: Jim Garrison <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-runtime that referenced this pull request Oct 10, 2023
* Add deprecation warning on use of qiskit.IBMQ

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.

* Fix typos

Co-authored-by: Jim Garrison <[email protected]>

* Remove superfluous warnings

* Add pip to warning message

* Fix lint

* Update references to qiskit.IBMQ

* Add release note

* Add back ibmq_mock.py file

* Add link to the migration guide in release note

Co-authored-by: Jim Garrison <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Oct 12, 2023
* Add deprecation warning on use of qiskit.IBMQ

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.

* Fix typos

Co-authored-by: Jim Garrison <[email protected]>

* Remove superfluous warnings

* Add pip to warning message

* Fix lint

* Update references to qiskit.IBMQ

* Add release note

* Add back ibmq_mock.py file

* Add link to the migration guide in release note

Co-authored-by: Jim Garrison <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-runtime that referenced this pull request Dec 8, 2023
* Add deprecation warning on use of qiskit.IBMQ

With the pending release of the qiskit-ibm-provider that superscedes the
qiskit-ibmq-provider package. The qiskit-ibmq-provider is now deprecated
and will be retired/archived in the future. In coordination with that
this commit deprecates the lazy loading fixture qiskit.IBMQ and removes
documentation references to qiskit-ibmq-provider in the repo.

* Fix typos

Co-authored-by: Jim Garrison <[email protected]>

* Remove superfluous warnings

* Add pip to warning message

* Fix lint

* Update references to qiskit.IBMQ

* Add release note

* Add back ibmq_mock.py file

* Add link to the migration guide in release note

Co-authored-by: Jim Garrison <[email protected]>
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: Deprecation Include in "Deprecated" section of changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants