+1 vote
asked by (430 points)

Dear ITensor team,
Thanks for your wonderful tool about Tensor Network. I have some silly questions about spectrum function. I want to repeat PHYSICAL REVIEW B 77, 134437 2008 Fig.4(t=10 (vertical green dot line ) results S^{zz}(0,10) about 0.02, spin 1 Heisenberg chain)
According to definition: C^{z}(x,t)=<g.s|exp{iHt}S^{z}(x)exp(-iHt)S^{z}(0)|g.s> right?
my naive strategy as follow:
1) S^{z}(0) act on ground state |g.s>(single site operator act on MPS get new MPS psi1)
2) exp(-iHt) act new state psi1(Trotter evolution) get new MPS state psi2
3) S^{z}(x) act new psi2 to get new MPS psi3(same as step 1 )
4) exp(iHt) act psi3 get new MPS psi4(Note that in the code I want to construct exp(Itstephterm) gate. Naively, I replaced tstep to -tstep because if BondGate argument is tstep we get exp(-Itstephterm), is that correct? (please see my naive code))
5) Finally, C^{z}(x,t)=innerC(psi,psi4) right?
According to this strategy, I write a naive code, but my answer is not consistent with that paper. So I don't know is there any wrong with my naive code? Thank you very much !

int main()
{
ofstream outfile;
outfile.open("cor_t.dat",ios::app);

int N = 50; //number of sites
Real tt = 10.0;
Real tstep = 0.05; //time step (smaller is generally more accurate)
Real ttotal = tt; //total time to evolve
Real cutoff = 1E-8; //truncation error cutoff when restoring MPS form

auto sites = SpinOne(N);

auto state = InitState(sites);
auto ampo = AutoMPO(sites);
for(auto j : range1(N))
{
state.set(j,j%2==1?"Up":"Dn");
}
auto psi = MPS(state);

for(int b = 1; b < N; ++b)
{
ampo += 0.5,"S+",b,"S-",b+1;
ampo += 0.5,"S-",b,"S+",b+1;
ampo += "Sz",b,"Sz",b+1;
}

auto H = MPO(ampo);

auto sweeps = Sweeps(30);
sweeps.maxm() = 100,200,800,800,1000;
sweeps.cutoff() = 1E-10;
sweeps.niter() = 2;
sweeps.noise() = 1E-7,1E-8,1E-9;
println(sweeps);

auto energy = dmrg(psi,H,sweeps,"Quiet");
println(energy);

auto psi0 = psi;

// S^{z}{1} act on RHS
auto Sz
1 = op(sites,"Sz",1);
println(Sz1);
auto newpsi = Sz
1*psi(1);
newpsi.noPrime();
psi.set(1,newpsi);

//Create a std::vector (dynamically sizeable array)
//to hold the Trotter gates
auto gates = vector();

//Create the gates exp(-itstep/2hterm)
//and add them to gates
for(int b = 1; b <= N-1; ++b)
{
auto hterm = 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);
}

//Create the gates exp(-itstep/2hterm) in reverse
//order (to get a second order Trotter breakup which
//does a time step of "tstep") and add them to gates
for(int b = N-1; b >= 1; --b)
{
auto hterm = 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);
}

//Time evolve, overwriting psi when done
gateTEvol(gates,ttotal,tstep,psi,{"Cutoff=",cutoff,"Verbose=",true});

// S^{z}{1} act RHS
auto newpsi1 = Sz
1*psi(1);
newpsi1.noPrime();
psi.set(1,newpsi1);

// exp(itstepH) act RHS
//Create the gates exp(itstep/2hterm)
//and add them to gates
for(int b = 1; b <= N-1; ++b)
{
auto hterm = 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);
}

//Create the gates exp(itstep/2*hterm) in reverse
//order (to get a second order Trotter breakup which
//does a time step of "tstep") and add them to gates

for(int b = N-1; b >= 1; --b)
{
auto hterm = 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);
}

//Time evolve, overwriting psi when done
gateTEvol(gates,ttotal,tstep,psi,{"Cutoff=",cutoff,"Verbose=",true});

printfln("Maximum MPS bond dimension after time evolution is %d",maxLinkDim(psi));

outfile <<tt<<" "<<real(innerC(psi0,psi))<< endl;

outfile.close();
return 0;
}

1 Answer

+1 vote
answered by (550 points)

Hi,SugarYu

the definition C^{z}(x,t)=<g.s|exp{iHt}S^{z}(x)exp(-iHt)S^{z}(0)|g.s> is right, but
C^{z}(x,t)=innerC(psi,psi4) is not correct!
You need C^{z}(x,t)=innerC(psi,psi4) (Exp(energytstep*n)), where energy is the groud-state energy, and n is Time evolve number( or n-1 , dependent on measurement before Time evolve or not)

Then Fourier transform will be performed to obtain S(q,\omega).

p.s. the S^{z}{1} often acts on central spin,N/2 or N/2+1 to avoid the boundary effects.

Hope it can help you

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...