Skip to content

Commit

Permalink
Use internal FakeProvider in place of one removed in Qiskit 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Feb 3, 2024
1 parent f958426 commit 5d6505c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion qiskit_experiments/test/fake_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"""Fake backend class for tests."""
import uuid
from qiskit.circuit.library import Measure
from qiskit.providers import ProviderV1
from qiskit.providers.backend import BackendV2
from qiskit.providers.fake_provider import FakeProvider
from qiskit.providers.options import Options
from qiskit.transpiler import Target

Expand All @@ -23,6 +23,14 @@
from qiskit_experiments.test.utils import FakeJob


class FakeProvider(ProviderV1):
"""Fake provider with no backends for testing"""

def backends(self, name=None, **kwargs):
"""List of available backends. Empty in this case"""
return []


class FakeBackend(BackendV2):
"""
Fake backend for test purposes only.
Expand Down

0 comments on commit 5d6505c

Please sign in to comment.