Skip to content

Commit

Permalink
Move conflictive imports to the aer backend plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Mar 5, 2025
1 parent ec04fcb commit 500c2ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qiskit_neko/aer_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@

"""Qiskit Aer default backend plugin."""

import qiskit_aer as aer
from qiskit_ibm_runtime.fake_provider import FakeProviderForBackendV2

from qiskit_neko import backend_plugin


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

def __init__(self):
from qiskit_ibm_runtime.fake_provider import FakeProviderForBackendV2

super().__init__()
self.mock_provider = FakeProviderForBackendV2()
self.mock_provider_backend_names = set()
Expand All @@ -46,6 +45,8 @@ def get_backend(self, backend_selection=None):
the defailt settings.
:raises ValueError: If an invalid backend selection string is passed in
"""
import qiskit_aer as aer

if backend_selection is None:
return aer.AerSimulator()
if backend_selection.startswith("method="):
Expand Down

0 comments on commit 500c2ef

Please sign in to comment.