Hello!
I am trying to calculate \langle S^{x}_1(t)S^{x}_1(0)\rangle for a randomMPS initial state |\psi \rangle but the output of the correlations have imaginary parts of the order 10^{-3}.
I am using the Julia version of the code but have more experience with the C++ version and so its possible that I do not understand all the functions I am using correctly. My current approach is to obtain |\psi(t)\rangle = U(t) |\psi\rangle and | \psi_x(t) \rangle= U(t) S_x |\psi\rangle and then calculate \langle \psi(t) | S_x | \psi_x (t)\rangle which should equal the correlator I am seeking.
I am using TEBD for the time evolution generated by two different Hamiltonians. I obtain the time evolved states by incrementing by some small dt until t = nT where I measure the overlap. To get the two states I do:
psi = randomMPS(sites,bond_dim)
psi_x = deepcopy(psi)
#apply Sx to psi_x
opp = op("Sx",sites[1])
A_1_x = opp * psi_x[1]
noprime!(A_1_x)
psi_x[1] = A_1_x
I initially check the overlap at t=0 to ensure things are fine
val = inner(psi',Sx,psi_x)
println("<Sx_1(0)Sx_1(0)> = $val")
It gives the correct value of 0.25. I then time evolve using the second order trotter decomposition
and normalize after each step (unsure why I do this but it was included in the TEBD code example). Once the evolutionis done at an n where t = nT I then calculate the overlap between the states with Sx as an MPO.
#perform time evolution
for n in 1:cycles
#first apply H1 with bricklaying pattern for T/2
c = 1
for t in 0.0:tau:T/2
#println("$((n-1)*T + t)")
psi_x = apply(gates1_e,psi_x; cutoff)
psi_x = apply(gates1_o,psi_x; cutoff)
psi_x = apply(gates1_e,psi_x; cutoff)
normalize!(psi_x)
psi = apply(gates1_e,psi; cutoff)
psi = apply(gates1_o,psi; cutoff)
psi = apply(gates1_e,psi; cutoff)
normalize!(psi)
end
#Apply H2 afterwords for T/2
for t in 0.0:tau:T/2
psi_x = apply(gates2,psi_x; cutoff)
normalize!(psi_x)
psi = apply(gates2,psi; cutoff)
normalize!(psi)
end
#get overlap with initial state:
val = inner(psi',Sx,psi_x)/2
push!(overlaps,real(val))
println("<Sx_1($(n)T) * Sx_1(0)> = $val")
end
The results for N = 8 and bond dim=60 (for speed of debugging) give:
<Sx_1(0)Sx_1(0)> = 0.25000000000000006
<Sx_1(1T) * Sx_1(0)> = 0.21372936110782428 - 0.02270611893409933im
<Sx_1(2T) * Sx_1(0)> = 0.12311194059048045 - 0.06449038038510997im
<Sx_1(3T) * Sx_1(0)> = 0.015579761828750855 - 0.10712389554900748im
<Sx_1(4T) * Sx_1(0)> = -0.07714945391656257 - 0.11487553717297402im
<Sx_1(5T) * Sx_1(0)> = -0.13803104880264594 - 0.07710401302521291im
<Sx_1(6T) * Sx_1(0)> = -0.15916753080751667 - 0.010361880398627841im
<Sx_1(7T) * Sx_1(0)> = -0.13946923498825858 + 0.05843952708266153im
<Sx_1(8T) * Sx_1(0)> = -0.08687407222840543 + 0.10668196023003335im
<Sx_1(9T) * Sx_1(0)> = -0.01785099025957232 + 0.12293533638047521im
<Sx_1(10T) * Sx_1(0)> = 0.047433252646377363 + 0.10736005379295518im
I tried other ways of getting the inner product by doing it by hand with the individual matrices but it yields similar results. The values will be compared with ED results later on, I just dont know why im getting imaginary parts to these correlations as they should be real (unless I am mistaken).
Any help would be great!
Sebastien