Hi Everyone,
I'm trying to simulate time-evolution of Hubbard model with Trotter gate. I start from simple tight-binding model with time-independent Hamiltonian, so the energy should be conserved. However, when I try the code, I find the energy is not conserved even with very small time steps ~ 0.001. Here is a part of my code:
using Gate = BondGate<IQTensor>;
auto gates = vector<Gate>();
for(int b = 1; b <= L-1; ++b)
{
auto hterm = -1.*sites.op("Cdagup",b)*sites.op("Cup",b+1);
hterm += -1.*sites.op("Cdagup",b+1)*sites.op("Cup",b);
hterm += -1.*sites.op("Cdagdn",b)*sites.op("Cdn",b+1);
hterm += -1.*sites.op("Cdagdn",b+1)*sites.op("Cdn",b);
auto g0 = Gate(sites,b,b+1,Gate::tReal,tau/2.,hterm);
gates.push_back(g0);
}
for(int b = L-1; b >= 1; --b)
{
auto hterm = -1.*sites.op("Cdagup",b)*sites.op("Cup",b+1);
hterm += -1.*sites.op("Cdagup",b+1)*sites.op("Cup",b);
hterm += -1.*sites.op("Cdagdn",b)*sites.op("Cdn",b+1);
hterm += -1.*sites.op("Cdagdn",b+1)*sites.op("Cdn",b);
auto g0 = Gate(sites,b,b+1,Gate::tReal,tau/2.,hterm);
gates.push_back(g0);
}
auto args = Args("Cutoff=",cutoff,"Maxm=",mmax);
gateTEvol(gates, ttotal, tau, psi, args);
Can you tell me what's wrong with this? Also, I'm confused that if I use, for example,
hterm = +1.*sites.op("Cup",b+1)*sites.op("Cdagup",b);
I get a different result. Is this due to the anti-commutation of fermions?
Many thanks,