Time evolution of a doped 2D antiferromagnet in the \(t-J\) model
#include <hydra/all.h>
voidmeasure_density(intn_sites,hydra::StateCplxconst&v){usingnamespacehydra;for(inti=0;i<n_sites;++i){autosz=inner(Bond("NUMBER",i),v);printf("%f ",std::real(sz));}printf("\n");}intmain(){usingnamespacehydra;intL=5;doublet=1.0;doubleJ=0.4;intn_sites=L*L;doubleprecision=1e-12;// Create square lattice t-J modelBondListbonds;for(intx=0;x<L;++x){for(inty=0;y<L;++y){intnx=(x+1)%L;intny=(y+1)%L;intsite=y*L+x;intright=y*L+nx;inttop=ny*L+x;bonds<<Bond("HOP","T",{site,right});bonds<<Bond("TJHB","J",{site,right});bonds<<Bond("HOP","T",{site,top});bonds<<Bond("TJHB","J",{site,top});}}bonds["T"]=t;bonds["J"]=J;// Create initial stateautopstate=ProductState();for(inti=0;i<n_sites;++i){if((i%2)==0){pstate<<"Up";}else{pstate<<"Dn";}}pstate[12]="Emp";HydraPrint(pstate);autoblock=tJ(n_sites,12,12);autov=State(block,pstate);measure_density(n_sites,v);// Do the time evolution with a step size taudoubletau=0.1;for(inti=0;i<100;++i){v=time_evolve(bonds,v,tau,precision);measure_density(n_sites,v);}returnEXIT_SUCCESS;}