# Time dependent correlations

+1 vote
edited

Hi miles,
I am using Itensor C++ code.
I am interested to find correlation between Sz1(t) and Sz4 for L=10 sites Heisenberg spin(1/2) chain.
So first I calculated psi0 then by using trotter gate psi0t. Next I obtained new1psi0t=Sz1*psi0_t(1) (operating Sz_1 at psi0_t(1)). Similarly by operating other operator Sz_4 at psi0(4), new state new4_psi0 calculated. Then I did time evolution of new4_psi0 to get new4_psi0_t and finally innerC(new1_psi0_t,new4_psi0_t). Is it right?

Hi, so I think the way to figure this out is to look at the expression

<Sz1(t) Sz4(0)> = exp(i E0 t) <0| Sz4 exp(-iHt) Sz1 |0>

which is what I believe you want to compute. Then reading it from right to left as a sequence of operations, they are:
1. compute the ground state |0>
2. act on the ground state with Sz1 before doing any time evolution
3. take the resulting state and time evolve it for a time t
4. act on that state with Sz
4
5. take the overlap with the ground state ket <0| and multiply by exp(i E0 t) where E0 is the ground state energy

A trick that can be done to make this more efficient is to break up exp(-i H t) as exp(-i H t/2) exp(-i H t/2) then act the first one of those time-evolution operators to the left. When you take the dagger this actually means an evolution of the ket Sz_4|0> by an opposite-sign time evolution of exp(+i H t/2). But before trying this trick you may want to follow the simpler prescription above to get some reference results.

Hope that helps –

Miles

commented by (130 points)
Hi, I am getting complex number(a,b) answer by calculating exp(iE0t)*innerC(psi_new,psi0). which part(a or b) of answer should I consider at final or should I take sqrt(a^2+b^2)?
commented by (70.1k points)
Usually what is done is that you treat it as a complex number, then perform a Fourier transform in space and time. For the case of equal time correlations, focusing on the Fourier transform in space, one looks at the magnitude (complex magnitude or absolute value) to find peaks in the Fourier transform. These peaks indicate wavevectors at which the system is ordered or quasi-ordered (the width of the peaks indicates whether the order is long range or not). For the time Fourier transform I am less familiar with which analyses are usually done, but some of the ways it is analyzed resemble what is done for Green functions.
commented by (130 points)
edited
Hi, I had done calculations as:
----------------------------------------------------------------------------------------------------------------------
step1: calculating E0 and psi0 using dmrg

int N=10;

auto ampo = AutoMPO(sites);
for(int b = 1; b < N; ++b)
{
auto  ampo = 0.5,"S+",b,"S-",b+1;
ampo += 0.5,"S-",b,"S+",b+1;
ampo += 3*op(sites,"S-",b)*op(sites,"S+",b+1);
}

auto H = toMPO(ampo);

auto psi_i=randomMPS(sites);

auto [E0,psi0] = dmrg(H,psi_i,sweeps);

-------------------------------------------
output:E0=-7.676342569
-----------------------------------------------------------------------------------------------------------
Step2: forming gates

auto gates = vector<BondGate>();

auto hterm = AutoMPO(sites);
for(int b = 1; b <= N-1; ++b)
{
auto hterm = 3*op(sites,"Sz",b)*op(sites,"Sz",b+1);
hterm += 0.5*op(sites,"S+",b)*op(sites,"S-",b+1);
hterm += 0.5*op(sites,"S-",b)*op(sites,"S+",b+1);

auto g = BondGate(sites,b,b+1,BondGate::tReal,tstep/2.,hterm);
gates.push_back(g);
}

for(int b = N-1; b >= 1; --b)
{
auto hterm = 3*op(sites,"Sz",b)*op(sites,"Sz",b+1);
hterm += 0.5*op(sites,"S+",b)*op(sites,"S-",b+1);
hterm += 0.5*op(sites,"S-",b)*op(sites,"S+",b+1);

auto g = BondGate(sites,b,b+1,BondGate::tReal,tstep/2.,hterm);
gates.push_back(g);
}
----------------------------------------------------------------------------------------------------------------------
step3: following the steps as follows

i. compute the ground state |0>
ii. act on the ground state with Sz1 before doing any time evolution
iii. take the resulting state and time evolve it for a time t
iv. act on that state with Sz4
v. take the overlap with the ground state ket <0| and multiply by exp(i E0 t) where E0 is the ground state energy

calculated <Sz1(t) Sz4(0)> for different time. and get an output as follows

time             <Sz1(t) Sz4(0)>
0            (-0.176449,0)
0.02     (-0.336417,0.106671)
0.04     (-0.288506,0.203405)
0.06      (-0.213619,0.28119)

whereas,  when did calculations for equal time  correlations as
i. compute the ground state |0>
ii.time evolution of |0>=exp(iHt)|0>=|t>
ii. act Sz1 on |t>i.e Sz1|t>.
iii.act Sz4 on Sz1|t> i.e. Sz4Sz1|t>
iv. take the overlap with <t|.

calculated <Sz1(t) Sz4(t)>=<0|exp(-iHt)Sz1exp(iHt)exp(-iHt)Sz4exp(iHt)|0>=<0|exp(-iHt)Sz1Sz4exp(iHt)|0> for an equal time. and get output as,

time            <Sz1(t) Sz4(t)>
0            (-0.176449,0)
0.02            (-0.176449,0)
0.04            (-0.176449,0)
0.06  (-0.176449,3.20924e-17)
------------------------------------------------------------------------------------------------------------
So here I am getting equal time correlations same.that is okay and since here spin half chain is considered so correlation is not crossing 0.25 value. But for different time correlations, correlations crossing 0.25 i.e here for time=0.02  result is  (-0.336417,0.106671). Whether I am doing right?
commented by (70.1k points)
Hi, I don't know just from looking at the numbers you are getting whether you are doing the right thing. If it follows the steps I outlined above then it is the right thing, and I believe you can see from the definition of the time-dependent correlations why those are the steps, or at least please take the time to understand them.

There could be other ways of organizing the calculation too, as long as it is derived from the correct definition of the time dependent correlator.

What I would suggest is testing on a small system where you write a separate code that computes the exact result (no MPS, just using a simple exact diagonalization) to verify that you get the same result as when using the MPS methods. I always do that for myself when I am setting up a new code or computing an unfamiliar quantity. Or if there is a limit where you know the exact solution analytically that can be helpful.

Please let me know if you have a more specific question, like about one of the steps and how to do it and we could discuss that.