From b125468cb961a27d90677c368b81634946609bb2 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Sat, 3 Feb 2024 01:35:36 -0500 Subject: [PATCH] Use internal FakeProvider in place of one removed in Qiskit 1.0 --- qiskit_experiments/test/fake_backend.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qiskit_experiments/test/fake_backend.py b/qiskit_experiments/test/fake_backend.py index 3918cca70b..1ffdae45f7 100644 --- a/qiskit_experiments/test/fake_backend.py +++ b/qiskit_experiments/test/fake_backend.py @@ -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 @@ -23,6 +23,12 @@ from qiskit_experiments.test.utils import FakeJob +class FakeProvider(ProviderV1): + def backends(self, name=None, **kwargs): + """List of available backends. Empty in this case""" + return [] + + class FakeBackend(BackendV2): """ Fake backend for test purposes only.