# time dependent correlators with electrons

**URL:** <https://itensor.discourse.group/t/time-dependent-correlators-with-electrons/2630>\
**Category:** General Discussion\
**Tags:** tdvp\
**Created:** [July 23, 2026, 5:58pm UTC](https://itensor.discourse.group/t/time-dependent-correlators-with-electrons/2630 "2026-07-23T17:58:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@Leon](https://itensor.discourse.group/u/Leon)\
**Post date:** [July 23, 2026, 5:58pm UTC](https://itensor.discourse.group/t/time-dependent-correlators-with-electrons/2630/1 "2026-07-23T17:58:21Z")

</div>

Hello there,

I did post a related question to this one trying to solve a subsidiary problem. Here I would like to present on what I am failing to implement i.e. to use ITensor properly. I suspect this to be a rather generic usecase, as time dependent correlators should not be rare to be found.

What I am trying to do is to calculate the single particles Green’s function via this method:

\begin{align\*} iG\_{i,j} &= \braket{0|e^{iHt} c\_i e^{-iHt}c\_j^\dag |0}\\ &= e^{iE\_0t} \braket{0| c\_i e^{-iHt}c\_j^\dag |0} \\ &= e^{iE\_0t} \braket{\phi\_i(0) | e^{-iHt}|\phi\_j(0)} \\ &= e^{iE\_0t} \braket{\phi\_i(0) | \phi\_j(t)} \\ \end{align\*}

Here \ket{\phi\_i(t)} := e^{-iHt}c\_i^\dag\ket{0}. I tried to implement this by finding the ground state via `DMRG`, act with `"Cdagup"`-Operators on all sites and evolve a copy in time and take the inner product. Below a Code example is provided by truncating the unecessary parts:

```julia
using ITensors, ITensorMPS

#some hamiltonias like Hubbard or else 
include("MyMPOOperators")

#sites 
N = 8
#tried with both: wiht/without conserve_qns!
sites = siteinds("Electron",N; conserve_qns=true)

#get ground state
H = my_mpo_hamiltonian(params...)
E_0, psi0 = dmrg(H,psi0, --proper cutoff--)

#produce c_i^\dag stats
phi = [apply(op(sites, "Cdagup", i), psi0) for i in 1:N]

#evolve middle index in time
phit = copy(phi[cld(N,2)])
green = Array{ComplexF64}(undef, N,100)

for n in 1:100 #some time domain
     phit = tdvp(H, -1im * .1,
             phit,
             nsite=2,
             maxdim = 300,#some dimensions tried 30-1000 for small site numbers
             cutoff = 1.0e-16,
             )
    #calc green
    for i in 1:N
        green[i,n] = inner(phi[i], phit)  
    end
end

```

now what went wrong:

1. **Jordan Wigner (`JW`)handling?:**  
Plotting results from that kind of implementation results in every other site having zero amplitude for all time. Thats how I learned that ITensor may not handle `JW` properly either when using `apply`, or `inner`.

2. Handling them manually by attaching `"F"` for 1 up to `site-1` beforehand of `"Cdagup"` results in an checkerboard like overlap:

I did these tests with/without using conserve\_qns, which I was told to fix the problems I have.

Anyhow, I would appreachiate, If someone could help me to correctly implement the time dependent correlator. I suspect that neither `apply` nor `inner` does any assumptions about the statistics/particles, which the MPSs are supposed to mimic. I am also failing on determining which methods from `ITensor` handle them correctly (beside MPO of course, which cannot be used due to odd parity operators -`"Cdagup"` cannot be initialized using `MPO`).  
I would apprechiate If someone could help me to correctly calculate Green’s functions as described in the beginning. If there is a better option for that be my guest 🙂

---

<div class="post-metadata">

**Author:** ![corbett5](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/corbett5/32/886_2.png) [@corbett5](https://itensor.discourse.group/u/corbett5)\
**Post date:** [July 24, 2026, 3:26pm UTC](https://itensor.discourse.group/t/time-dependent-correlators-with-electrons/2630/2 "2026-07-24T15:26:06Z")

</div>

You are right that`apply(sites, "Cdagup", i)`only applies an operator to site `i`, and does not include the Jordan-Wigner string. I would expect implementing it manually to work, though I am not familiar with these types of calculations so I can’t say what you should expect. I also think the calculations should work both with and without `conserve_qns`.
