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 FakeBackendV2 import deprecated in Qiskit 0.46 #1420

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion qiskit_experiments/framework/backend_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,24 @@ class unifies data access for various data fields.
from qiskit.providers.models import PulseBackendConfiguration
from qiskit.providers import BackendV1, BackendV2
from qiskit.providers.fake_provider import FakeBackend
from qiskit.providers.fake_provider.fake_backend import FakeBackendV2
from qiskit.utils.deprecation import deprecate_func

try:
# Removed in Qiskit 1.0.
from qiskit.providers.fake_provider.fake_backend import FakeBackendV2
except ImportError:

class FakeBackendV2:
"""Dummy class for when FakeBackendV2 import fails

This class is only used in isinstance checks. If the import fails, then
there won't be an instance of the class either so any dummy class is
fine.
"""

pass


try:
# Removed in Qiskit 1.0. Different from the other FakeBackendV2's
from qiskit.providers.fake_provider import QiskitFakeBackendV2
Expand Down