Skip to content

Commit

Permalink
test: fix imports after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanljones committed Feb 28, 2023
1 parent 219e2e3 commit 9c96980
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/test_greens.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pytest import mark
from numpy.testing import assert_allclose
import exactdiag as ed
from exactdiag.greens import gf0_resolvent, gf0_pole, gf_lehmann
from exactdiag.greens import gf0_resolvent, gf0_pole, gf_lehmann, gf_tevo


def tight_binding_hamiltonian(latt, eps=0.0, hop=1.0):
Expand Down Expand Up @@ -77,8 +77,8 @@ def test_gf_tevo_hubbard_non_interacting(num_sites, sigma):
for pos in range(num_sites):
gf0_z = gf0_z_diag[:, pos]

t, gf_tevo = ed.gf_tevo(model, start, stop, num, pos, sigma=sigma)
gf_z = gt.fourier.tt2z(t, gf_tevo, z)
t, gf_t = gf_tevo(model, start, stop, num, pos, sigma=sigma)
gf_z = gt.fourier.tt2z(t, gf_t, z)
assert_allclose(gf_z, gf0_z, rtol=1e-4, atol=1e-2)


Expand Down
5 changes: 3 additions & 2 deletions tests/test_models_hubbard.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from exactdiag.matrix import is_hermitian
from exactdiag.models import HubbardModel
import exactdiag as ed
from exactdiag import operators


def test_hubbard_sector_1_1():
Expand Down Expand Up @@ -64,8 +65,8 @@ def generate_operators(basis):
c_up, c_dn = list(), list()
sector = basis.get_sector()
for i in range(basis.num_sites):
_cdg_up = ed.CreationOperator(sector, sector, i, ed.UP).toarray()
_cdg_dn = ed.CreationOperator(sector, sector, i, ed.DN).toarray()
_cdg_up = operators.CreationOperator(sector, sector, i, ed.UP).toarray()
_cdg_dn = operators.CreationOperator(sector, sector, i, ed.DN).toarray()
cdg_up.append(_cdg_up)
cdg_dn.append(_cdg_dn)
c_up.append(_cdg_up.T.conj())
Expand Down

0 comments on commit 9c96980

Please sign in to comment.