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

Don't use fake backend utility functions from Qiskit #2010

Closed
jyu00 opened this issue Oct 31, 2024 · 2 comments · Fixed by #2012
Closed

Don't use fake backend utility functions from Qiskit #2010

jyu00 opened this issue Oct 31, 2024 · 2 comments · Fixed by #2012
Assignees
Milestone

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Oct 31, 2024

User reported that importing a fake backend would trigger this deprecation warning:

venv/lib/python3.11/site-packages/qiskit_ibm_runtime/fake_provider/backends/algiers/__init__.py:15: in <module>
    from .fake_algiers import FakeAlgiers
venv/lib/python3.11/site-packages/qiskit_ibm_runtime/fake_provider/backends/algiers/fake_algiers.py:18: in <module>
    from qiskit_ibm_runtime.fake_provider import fake_backend
venv/lib/python3.11/site-packages/qiskit_ibm_runtime/fake_provider/fake_backend.py:34: in <module>
    from qiskit.providers.fake_provider.utils.json_decoder import (
venv/lib/python3.11/site-packages/qiskit/providers/fake_provider/__init__.py:94: in <module>
    from .fake_backend import FakeBackend
venv/lib/python3.11/site-packages/qiskit/providers/fake_provider/fake_backend.py:22: in <module>
    from qiskit.providers.models import BackendProperties
venv/lib/python3.11/site-packages/qiskit/providers/models/__init__.py:80: in __getattr__
    warnings.warn(
E   DeprecationWarning: qiskit.providers.models is deprecated since Qiskit 1.2 and will be removed in Qiskit 2.0. With the removal of Qobj, there is no need for these schema-conformant objects. If you still need to use them, it could be because you are using a BackendV1, which is also deprecated in favor of BackendV2.

Looks like when we ported the backend model classes we didn't also port the decoders:

from qiskit.providers.fake_provider.utils.json_decoder import (
decode_backend_configuration,
decode_backend_properties,
decode_pulse_defaults,
)

We should already have these decoders in qiskit-ibm-runtime, since we need to decode backend data from the server.

@yaelbh
Copy link
Collaborator

yaelbh commented Oct 31, 2024

We should have a way to catch such things in our CI.

@jyu00
Copy link
Collaborator Author

jyu00 commented Oct 31, 2024

Absolutely. We use to fail test cases that had deprecation warning.

@kt474 kt474 self-assigned this Nov 1, 2024
@kt474 kt474 added this to the 0.33.0 milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants