From 660d9846ca7601f73d017fda9277af73807c5d9d Mon Sep 17 00:00:00 2001 From: William Galvin Date: Tue, 26 Dec 2023 16:18:38 -0800 Subject: [PATCH] fix pytest --- vcvqe/tests/test_givens.py | 2 +- vcvqe/tests/test_hamiltonian.py | 2 +- vcvqe/tests/test_utils.py | 2 +- vcvqe/vcvqe/main.py | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vcvqe/tests/test_givens.py b/vcvqe/tests/test_givens.py index ad17475..19ced01 100644 --- a/vcvqe/tests/test_givens.py +++ b/vcvqe/tests/test_givens.py @@ -1,7 +1,7 @@ import numpy as np import math -from src import givens +from vcvqe import givens def test_givens_shape(): for i in range(1, 5): diff --git a/vcvqe/tests/test_hamiltonian.py b/vcvqe/tests/test_hamiltonian.py index 0980633..0a8294f 100644 --- a/vcvqe/tests/test_hamiltonian.py +++ b/vcvqe/tests/test_hamiltonian.py @@ -1,7 +1,7 @@ import numpy as np import os -from src import hamiltonian +from vcvqe import hamiltonian root = "." if os.path.isdir("data") else ".." print(root) diff --git a/vcvqe/tests/test_utils.py b/vcvqe/tests/test_utils.py index 20b2069..e234c79 100644 --- a/vcvqe/tests/test_utils.py +++ b/vcvqe/tests/test_utils.py @@ -1,7 +1,7 @@ import tempfile import os -from src import utils +from vcvqe import utils root = "." if os.path.isdir("data") else ".." diff --git a/vcvqe/vcvqe/main.py b/vcvqe/vcvqe/main.py index a6e895c..063c595 100644 --- a/vcvqe/vcvqe/main.py +++ b/vcvqe/vcvqe/main.py @@ -11,14 +11,14 @@ from jax import numpy as jnp from jax import value_and_grad -from src.givens import givens -from src.givens import hf_ground -from src.givens import full_wavefunction -from src.givens import excitations -from src.hamiltonian import expectation -from src.hamiltonian import hamiltonian -from src.utils import get_electrons_qubits -from src.utils import random_xyz +from vcvqe.givens import givens +from vcvqe.givens import hf_ground +from vcvqe.givens import full_wavefunction +from vcvqe.givens import excitations +from vcvqe.hamiltonian import expectation +from vcvqe.hamiltonian import hamiltonian +from vcvqe.utils import get_electrons_qubits +from vcvqe.utils import random_xyz def energy(H: np.ndarray, electrons: int, qubits: int, thetas: np.ndarray) -> float: