mirror of
https://github.com/vale981/two_qubit_model
synced 2025-03-04 17:21:43 -05:00
correct imports
This commit is contained in:
parent
f11d6a4311
commit
d0632409f7
6 changed files with 8 additions and 8 deletions
|
@ -4,14 +4,14 @@ import json
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from hops.core.hierarchy_data import HIData
|
from hops.core.hierarchy_data import HIData
|
||||||
from model_base import Model
|
from .model_base import Model
|
||||||
from hops.core.integration import HOPSSupervisor
|
from hops.core.integration import HOPSSupervisor
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from utility import JSONEncoder, object_hook
|
from utility import JSONEncoder, object_hook
|
||||||
from filelock import FileLock
|
from filelock import FileLock
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from one_qubit_model import QubitModel
|
from .one_qubit_model import QubitModel
|
||||||
from two_qubit_model import TwoQubitModel
|
from .two_qubit_model import TwoQubitModel
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Model(ABC):
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
"""Returns a json representation of the model configuration."""
|
"""Returns a json representation of the model configuration."""
|
||||||
|
|
||||||
return JSONEncoder.dumps(self.to_dict)
|
return JSONEncoder.dumps(self.to_dict())
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hashlib.sha256(self.to_json().encode("utf-8")).digest().__hash__()
|
return hashlib.sha256(self.to_json().encode("utf-8")).digest().__hash__()
|
||||||
|
|
|
@ -35,7 +35,7 @@ import stocproc as sp
|
||||||
|
|
||||||
from beartype import beartype
|
from beartype import beartype
|
||||||
from utility import StocProcTolerances
|
from utility import StocProcTolerances
|
||||||
from model_base import Model
|
from .model_base import Model
|
||||||
import scipy.special
|
import scipy.special
|
||||||
import hopsflow
|
import hopsflow
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ from hops.util.truncation_schemes import (
|
||||||
import stocproc as sp
|
import stocproc as sp
|
||||||
from beartype import beartype
|
from beartype import beartype
|
||||||
from utility import StocProcTolerances, operator_norm
|
from utility import StocProcTolerances, operator_norm
|
||||||
from model_base import Model
|
from .model_base import Model
|
||||||
import hops.core.hierarchy_parameters as params
|
import hops.core.hierarchy_parameters as params
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
import random
|
import random
|
||||||
from models.one_qubit_model import *
|
from hiro_models.one_qubit_model import *
|
||||||
from qutip import *
|
from qutip import *
|
||||||
from utility import assert_serializable
|
from utility import assert_serializable
|
||||||
import scipy.integrate
|
import scipy.integrate
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
import random
|
import random
|
||||||
from models.two_qubit_model import *
|
from hiro_models.two_qubit_model import *
|
||||||
from qutip import *
|
from qutip import *
|
||||||
from utility import assert_serializable
|
from utility import assert_serializable
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue