From da9455b33e943689a9863f89976c3adef9bfd9b3 Mon Sep 17 00:00:00 2001 From: Davide Bincoletto Date: Fri, 30 Aug 2024 15:43:37 +0200 Subject: [PATCH] create __init__ --- beh2_full.py | 2 +- h4.py | 2 +- h6.py | 2 +- src/qvalence/__init__.py | 1 + src/{qvalence.py => qvalence/utils.py} | 8 +------- test/test.py | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 src/qvalence/__init__.py rename src/{qvalence.py => qvalence/utils.py} (99%) diff --git a/beh2_full.py b/beh2_full.py index 5ffae8e..71691e6 100644 --- a/beh2_full.py +++ b/beh2_full.py @@ -1,6 +1,6 @@ import tequila as tq import numpy -from qvalence import Rot, Corr, GNM, gem_fast +from qvalence.utils import Rot, Corr, GNM, gem_fast import time start = time.time() diff --git a/h4.py b/h4.py index 2d4072b..3037a84 100644 --- a/h4.py +++ b/h4.py @@ -1,6 +1,6 @@ import tequila as tq import numpy -from qvalence import Rot, Corr, GNM, gem_fast +from qvalence.utils import Rot, Corr, GNM, gem_fast """ Compute the data from Fig.1 in the paper diff --git a/h6.py b/h6.py index 9c38868..725639e 100644 --- a/h6.py +++ b/h6.py @@ -14,7 +14,7 @@ import warnings warnings.filterwarnings("ignore", category=tq.TequilaWarning) -from qvalence import Rot, gem_fast, BigExpVal, GNM, Corr +from qvalence.utils import Rot, gem_fast, BigExpVal, GNM, Corr # plot data: error_g1=0.0 diff --git a/src/qvalence/__init__.py b/src/qvalence/__init__.py new file mode 100644 index 0000000..54d24e3 --- /dev/null +++ b/src/qvalence/__init__.py @@ -0,0 +1 @@ +from qvalence.utils import GNM \ No newline at end of file diff --git a/src/qvalence.py b/src/qvalence/utils.py similarity index 99% rename from src/qvalence.py rename to src/qvalence/utils.py index a6cfdf2..019ecff 100644 --- a/src/qvalence.py +++ b/src/qvalence/utils.py @@ -200,10 +200,4 @@ def callback(x): for k in vkeys: variables[k] = x0[k] - return v,vv,variables - - - - - - + return v,vv,variables \ No newline at end of file diff --git a/test/test.py b/test/test.py index 1bce153..2cf04fa 100644 --- a/test/test.py +++ b/test/test.py @@ -1,6 +1,6 @@ import tequila as tq import numpy as np -from qvalence import Rot, GNM, gem_fast, BigExpVal, BraKetQulacs +from qvalence.utils import Rot, GNM, gem_fast, BigExpVal, BraKetQulacs from tequila.objective.braket import make_overlap, make_transition from tequila.tools.random_generators import make_random_hamiltonian