From 25e4df16505a31922961851306c3ca0b4cc94a3a Mon Sep 17 00:00:00 2001 From: kevin-tian Date: Wed, 16 Oct 2024 10:37:05 -0400 Subject: [PATCH 1/2] Use FakeProviderForBackendV2() --- qiskit_neko/aer_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiskit_neko/aer_plugin.py b/qiskit_neko/aer_plugin.py index 981795a..0e5d090 100644 --- a/qiskit_neko/aer_plugin.py +++ b/qiskit_neko/aer_plugin.py @@ -13,7 +13,7 @@ """Qiskit Aer default backend plugin.""" import qiskit_aer as aer -from qiskit_ibm_runtime import fake_provider +from qiskit_ibm_runtime.fake_provider import FakeProviderForBackendV2 from qiskit_neko import backend_plugin @@ -23,7 +23,7 @@ class AerBackendPlugin(backend_plugin.BackendPlugin): def __init__(self): super().__init__() - self.mock_provider = fake_provider.FakeProvider() + self.mock_provider = FakeProviderForBackendV2() self.mock_provider_backend_names = set() for backend in self.mock_provider.backends(): if backend.version == 1: From 0130659ad9cd0fefbe261c0617dcf924ccb9cd1a Mon Sep 17 00:00:00 2001 From: kevin-tian Date: Wed, 16 Oct 2024 10:51:42 -0400 Subject: [PATCH 2/2] Fix lint --- qiskit_neko/aer_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiskit_neko/aer_plugin.py b/qiskit_neko/aer_plugin.py index 0e5d090..5e86239 100644 --- a/qiskit_neko/aer_plugin.py +++ b/qiskit_neko/aer_plugin.py @@ -52,5 +52,5 @@ def get_backend(self, backend_selection=None): method = backend_selection.split("=")[1] return aer.AerSimulator(method=method) if backend_selection in self.mock_provider_backend_names: - return self.mock_provider.get_backend(backend_selection) + return self.mock_provider.backend(backend_selection) raise ValueError(f"Invalid selection string {backend_selection}.")