Skip to content

Commit

Permalink
Migrating QuantumHardwareInterface to Core
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaborala committed Jun 21, 2024
1 parent 78f6f02 commit 1868266
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
10 changes: 2 additions & 8 deletions abstract_classes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from abc import ABC, abstractmethod
import asyncio

class QuantumHardwareInterface(ABC):
class QuantumHardwareInterfaceOld(ABC):

@abstractmethod
def __init__(self, n):
Expand Down Expand Up @@ -55,19 +55,13 @@ def build_operator(self, **kwargs):



class SonificationInterface(ABC):
class SonificationInterfaceOld():

def __init__(self, n):
self.platform = None

# @abstractmethod
# async def map_data(self):
# pass
def map_data(self, method, data, **kwargs):
getattr(self, method)(data, **kwargs)


# @abstractmethod
# async def play(self):
# pass

2 changes: 1 addition & 1 deletion hardware/hardware_library.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from abstract_classes import QuantumHardwareInterface
from core.vqh_interfaces import QuantumHardwareInterface
from hardware.local import LocalSimulatorInterface
from hardware.iqm import IQMHardwareInterface, IQMRealHardwareInterface

Expand Down
3 changes: 1 addition & 2 deletions hardware/iqm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

from abstract_classes import QuantumHardwareInterface
from core.vqh_interfaces import QuantumHardwareInterface
from iqm.qiskit_iqm import IQMProvider
from qiskit import execute
#from qiskit_ibm_provider import IBMProvider
Expand Down
2 changes: 1 addition & 1 deletion hardware/local.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from abstract_classes import QuantumHardwareInterface
from core.vqh_interfaces import QuantumHardwareInterface
from qiskit_aer import AerProvider
from qiskit import execute
#from qiskit_ibm_provider import IBMProvider
Expand Down
4 changes: 2 additions & 2 deletions protocols/amplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import config
from shutil import copy2

from abstract_classes import VQHProtocol, QuantumHardwareInterface
from abstract_classes import VQHProtocol, QuantumHardwareInterfaceOld
from vqe.vqe_experiments import SamplingVQE

mpl.rcParams['toolbar'] = 'None'
Expand All @@ -43,7 +43,7 @@

global PATH

from abstract_classes import VQHProtocol, QuantumHardwareInterface
from abstract_classes import VQHProtocol, QuantumHardwareInterfaceOld


# -------- FUNCTION DECLARATIONS --------
Expand Down
2 changes: 1 addition & 1 deletion protocols/harp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import config
from shutil import copy2

from abstract_classes import VQHProtocol, QuantumHardwareInterface
from abstract_classes import VQHProtocol, QuantumHardwareInterfaceOld
from vqe.vqe_experiments import SamplingVQE

mpl.rcParams['toolbar'] = 'None'
Expand Down
3 changes: 2 additions & 1 deletion vqe/vqe_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
import config
from shutil import copy2

from abstract_classes import VQHProtocol, QuantumHardwareInterface
from abstract_classes import VQHProtocol

from core.vqh_interfaces import QuantumHardwareInterface


mpl.rcParams['toolbar'] = 'None'
Expand Down

0 comments on commit 1868266

Please sign in to comment.