Skip to content

Commit 500c2ef

Browse files
committed
Move conflictive imports to the aer backend plugin
1 parent ec04fcb commit 500c2ef

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

qiskit_neko/aer_plugin.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212

1313
"""Qiskit Aer default backend plugin."""
1414

15-
import qiskit_aer as aer
16-
from qiskit_ibm_runtime.fake_provider import FakeProviderForBackendV2
17-
1815
from qiskit_neko import backend_plugin
1916

2017

2118
class AerBackendPlugin(backend_plugin.BackendPlugin):
2219
"""A backend plugin for using qiskit-aer as the backend."""
2320

2421
def __init__(self):
22+
from qiskit_ibm_runtime.fake_provider import FakeProviderForBackendV2
23+
2524
super().__init__()
2625
self.mock_provider = FakeProviderForBackendV2()
2726
self.mock_provider_backend_names = set()
@@ -46,6 +45,8 @@ def get_backend(self, backend_selection=None):
4645
the defailt settings.
4746
:raises ValueError: If an invalid backend selection string is passed in
4847
"""
48+
import qiskit_aer as aer
49+
4950
if backend_selection is None:
5051
return aer.AerSimulator()
5152
if backend_selection.startswith("method="):

0 commit comments

Comments
 (0)