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.IBMQ alias object #10525

Closed

Conversation

mtreinish
Copy link
Member

Summary

This commit removes the depercated qiskit.IBMQ alias object. It was marked as deprecated in 0.23.0 and now that the qiskit-ibmq-provider package has been retired and is no longer supported it truly has no more meaning. Realistically it probably should have been removed as part of 0.25.0 which corresponded with the retirement of the qiskit-ibmq-provider library, but this was forgotten as part of the 0.25.0 release so we'll have to do it as part of 0.45.0.

Details and comments

This commit removes the depercated qiskit.IBMQ alias object. It was
marked as deprecated in 0.23.0 and now that the qiskit-ibmq-provider
package has been retired and is no longer supported it truly has no more
meaning. Realistically it probably should have been removed as part of
0.25.0 which corresponded with the retirement of the
qiskit-ibmq-provider library, but this was forgotten as part of the
0.25.0 release so we'll have to do it as part of 0.45.0.
@mtreinish mtreinish added the Changelog: Removal Include in the Removed section of the changelog label Jul 28, 2023
@mtreinish mtreinish added this to the 0.45.0 milestone Jul 28, 2023
@mtreinish mtreinish requested a review from a team as a code owner July 28, 2023 13:55
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

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.

On a quick scan through the codebase, we still set this a little in qiskit/test/mock and test/python/tools/jupyter/test_notebooks, and it's mentioned in the algorithms migration guide. We maybe should squash those at the same time.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5692752694

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

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 5 90.89%
Totals Coverage Status
Change from base Build 5684162640: 0.04%
Covered Lines: 73071
Relevant Lines: 85039

💛 - Coveralls

@jakelishman jakelishman self-assigned this Oct 10, 2023
Copy link
Member

@1ucian0 1ucian0 left a comment

Choose a reason for hiding this comment

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

Shall we remove all the references to qiskit.providers.ibmq?

$ grep "qiskit.providers.ibmq" -r qiskit
qiskit/tools/monitor/overview.py:31:        from qiskit.providers.ibmq import IBMQ
qiskit/tools/monitor/overview.py:65:       from qiskit.providers.ibmq import IBMQ
qiskit/tools/monitor/overview.py:71:        from qiskit.providers.ibmq import IBMQBackend
qiskit/tools/monitor/overview.py:178:            from qiskit.providers.ibmq import IBMQ
qiskit/tools/jupyter/backend_monitor.py:27:    from qiskit.providers.ibmq import IBMQBackend
qiskit/tools/jupyter/job_watcher.py:99:        from qiskit.providers.ibmq.job.exceptions import (  # pylint: disable=no-name-in-module
qiskit/tools/jupyter/__init__.py:28:    from qiskit.providers.ibmq import IBMQ
qiskit/tools/jupyter/__init__.py:42:    from qiskit.providers.ibmq import IBMQ
qiskit/tools/jupyter/__init__.py:125:            from qiskit.providers.ibmq import IBMQBackend  # pylint: disable=no-name-in-module
qiskit/test/ibmq_mock.py:28:    value to qiskit.providers.ibmq.IBMQ after you finish using your mock.
qiskit/test/decorators.py:113:        from qiskit.providers.ibmq.credentials import Credentials, discover_credentials
qiskit/providers/fake_provider/__init__.py:73:        from qiskit.providers.ibmq import IBMQ
qiskit/utils/run_circuits.py:339:                    from qiskit.providers.ibmq import IBMQBackendJobLimitError
qiskit/utils/backend_utils.py:61:            from qiskit.providers.ibmq import IBMQFactory
qiskit/utils/backend_utils.py:62:            from qiskit.providers.ibmq.accountprovider import AccountProvider
qiskit/utils/backend_utils.py:148:        from qiskit.providers.ibmq.accountprovider import AccountProvider
qiskit/utils/optionals.py:36:      - The :mod:`Qiskit IBMQ Provider <qiskit.providers.ibmq>` is used for accessing IBM Quantum
qiskit/utils/optionals.py:223:    "qiskit.providers.ibmq",

Copy link
Member

Choose a reason for hiding this comment

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

Those the comment on the top still applies?

# Moved to after IBMQ and Aer imports due to import issues
# with other modules that check for IBMQ (tools)

Aer = AerWrapper()
IBMQ = IBMQWrapper()

__all__ = [
Copy link
Member

Choose a reason for hiding this comment

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

I think "IBMQ", needs to be removed from this list

@1ucian0 1ucian0 requested a review from jyu00 as a code owner October 11, 2023 12:44
@mtreinish
Copy link
Member Author

mtreinish commented Oct 16, 2023

So looking at the list of what @1ucian0 highlighted, I think the path forward here is a bit more expansive than I realized at first. There are chunks of qiskit in dark corners that still have a hard dependency on qiskit-ibmq-provider. Mainly the backend overview, most of the juypter widgets, and some of the algorithms/quantum instance helpers. I'm going to defer this from 0.45 and then we can just remove all of those en masse early in the next release cycle.

@mtreinish mtreinish modified the milestones: 0.45.0, 1.0.0 Oct 16, 2023
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Jan 8, 2024
This commit removes all the functionality in Qiskit that depended on the
legacy qiskit-ibmq-provider package. This process was started in Qiskit#10525
which removed the qiskit.IBMQ alias object but as was discovered in that
PR there were many other places in qiskit that were relying on the
qiskit-ibmq-provider package. This commit removes all of these places,
which primarily include qiskit.test.decorators's online_test decorator,
qiskit.tools.jupyter, qiskit.tools.monitor, qiskit.test.ibmq_mock, and
qiskit.test.mock (which just referenced IBMQ and didn't actually use
it). With these removals we're also no longer optionally dependent on
ipywidgets, jupyter, or ipython and those are removed from the optional
and development requirements lists.
@mtreinish
Copy link
Member Author

This is superseded by: #11513

@mtreinish mtreinish closed this Jan 8, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 11, 2024
* Remove deprecate IBMQ dependent functionality

This commit removes all the functionality in Qiskit that depended on the
legacy qiskit-ibmq-provider package. This process was started in #10525
which removed the qiskit.IBMQ alias object but as was discovered in that
PR there were many other places in qiskit that were relying on the
qiskit-ibmq-provider package. This commit removes all of these places,
which primarily include qiskit.test.decorators's online_test decorator,
qiskit.tools.jupyter, qiskit.tools.monitor, qiskit.test.ibmq_mock, and
qiskit.test.mock (which just referenced IBMQ and didn't actually use
it). With these removals we're also no longer optionally dependent on
ipywidgets, jupyter, or ipython and those are removed from the optional
and development requirements lists.

* Remove stale api docs

* Remove ibmq usage in fake backend update script

* Preserve circuit library visualizations

* Remove apidocs from index

* Remove unused import

* Update docs
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
* Remove deprecate IBMQ dependent functionality

This commit removes all the functionality in Qiskit that depended on the
legacy qiskit-ibmq-provider package. This process was started in Qiskit#10525
which removed the qiskit.IBMQ alias object but as was discovered in that
PR there were many other places in qiskit that were relying on the
qiskit-ibmq-provider package. This commit removes all of these places,
which primarily include qiskit.test.decorators's online_test decorator,
qiskit.tools.jupyter, qiskit.tools.monitor, qiskit.test.ibmq_mock, and
qiskit.test.mock (which just referenced IBMQ and didn't actually use
it). With these removals we're also no longer optionally dependent on
ipywidgets, jupyter, or ipython and those are removed from the optional
and development requirements lists.

* Remove stale api docs

* Remove ibmq usage in fake backend update script

* Preserve circuit library visualizations

* Remove apidocs from index

* Remove unused import

* Update docs
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants