# Time evolution Green's Function on 1D tight binding model

**URL:** <https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199>\
**Category:** ITensor Julia Questions\
**Tags:** julia\
**Created:** [October 9, 2023, 1:30pm UTC](https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199 "2023-10-09T13:30:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HELLNO](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@HELLNO](https://itensor.discourse.group/u/HELLNO)\
**Post date:** [October 9, 2023, 1:30pm UTC](https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199/1 "2023-10-09T13:30:28Z")

</div>

I was tried simple tight binding calculation of green’s function by using TEBD

but it was failed.

H = -tcos(ka)(c^{\dagger}\_{k\uparrow}c\_{k\uparrow} + c^{\dagger}\_{k\downarrow}c\_{k\downarrow} )

G^{0}(t) = \langle\psi | c\_{k\downarrow}(t)c^{\dagger}\_ {k\downarrow}| \psi\rangle

= \langle\psi|e^{itH} c\_{k\downarrow}e^{-itH}c^{\dagger}\_ {k\downarrow}| \psi\rangle

\langle\phi| \equiv c^{\dagger}\_ {k\downarrow}| \psi\rangle \quad\quad\quad\quad\quad\quad\quad\quad\quad |\phi(\tau)\rangle = e^{-i\tau h\_{j}}| \phi\rangle 

e^{-i\tau h}|\psi\rangle = |\psi(\tau)\rangle \quad\quad\quad\quad\quad\quad\quad\quad\quad\quad |\alpha(t)\rangle \equiv c^{\dagger}\_ {k\downarrow}|\psi(t)\rangle \

so,

G^{0}(\tau) = \langle\psi | c\_{k\downarrow}(\tau)c^{\dagger}\_ {k\downarrow}| \psi\rangle = \langle\alpha(\tau)|\phi(\tau)\rangle

(I think this equation is wrong)

```julia
tau = 0.01
N = 20
sites = siteinds("Electron",N,conserve_nf = false,conserve_sz = false)
os = OpSum()
k = LinRange(0,pi,N)
t = 0.5
U = 1

for i = 1:N
    T = -2*t*cos(k[i])
    os += T,"Cdagup",i,"Cup",i
    os += T,"Cdagdn",i,"Cdn",i    
end

H = MPO(os,sites)
Rpsi = randomMPS(sites)

nsweeps = 20
maxdim = [10,20,30,40,50,1000,1500,2000,3000]
cutoff = 1E-18
energy,psi = dmrg(H,Rpsi;nsweeps,maxdim,cutoff,outputlevel = 1)

gates = ITensor[]
for i in 1:N
    T = -2*t*cos(k[i])
    s1 = sites[i]
    hj = 
    T*op("Nup",s1)+T*op("Ndn",s1)
    #+U*op("Nup",s1)*op("Ndn",s1) 
    
    Gj = exp(-im * tau / 2 * hj)
    push!(gates, Gj)
end

append!(gates, reverse(gates))

Glst = []

site_num = 1

cdn = op("Cdagdn",sites[site_num])
cn = op("Cdn",sites[site_num])

phi = apply(cn,psi)
phi_t = phi

alpha_t = psi

@showprogress for t = LinRange(0,5,500)
    phi_t = apply(gates,phi_t; cutoff=1e-13)
    
    alpha_t = apply(gates,alpha_t)
    normalize!(alpha_t)
    normalize!(phi_t)
    ksi_t = apply(cn,alpha_t)
    G = inner(ksi_t',phi_t)
    
    
    
    push!(Glst,G) 

end

```

please let me know what I wrong

thank you

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [October 9, 2023, 1:39pm UTC](https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199/2 "2023-10-09T13:39:59Z")

</div>

What went wrong?

---

<div class="post-metadata">

**Author:** ![HELLNO](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@HELLNO](https://itensor.discourse.group/u/HELLNO)\
**Post date:** [October 9, 2023, 1:48pm UTC](https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199/3 "2023-10-09T13:48:39Z")

</div>

Sorry for not telling what was wrong

After i got green’s function and i did fourier transform to domain ⍵, and then I was checked my spectral function, but there’s negative value.

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [October 9, 2023, 1:51pm UTC](https://itensor.discourse.group/t/time-evolution-greens-function-on-1d-tight-binding-model/1199/4 "2023-10-09T13:51:04Z")

</div>

A starting point could be to check that the evolution matches what you expect from a free fermion calculation, before you perform the Fourier transform.
