1#ifndef VANILLA_HEISENBERG
2#define VANILLA_HEISENBERG
58 size_t Lcell = P.size();
60 for (
size_t l=0; l<
N_sites; ++l)
N_phys += P.get<
size_t>(
"Ly",l%Lcell);
69 std::vector<std::vector<std::string>>& labellist,
const BC boundary=BC::OPEN);
71 static const std::map<string,std::any>
defaults;
74 static refEnergy ref (
const vector<Param> ¶ms,
double L=numeric_limits<double>::infinity());
79 {
"J",0.}, {
"Jprime",0.}, {
"Jrung",0.},
80 {
"Jxy",0.}, {
"Jxyprime",0.}, {
"Jxyrung",0.},
81 {
"Jz",0.}, {
"Jzprime",0.}, {
"Jzrung",0.},
83 {
"Jx",0.}, {
"Jxrung",0.},
84 {
"Jy",0.}, {
"Jyrung",0.},
85 {
"Jz",0.}, {
"Jzrung",0.},
86 {
"Jw",0.}, {
"Jwrung",0.},
92 {
"Dy",0.}, {
"Dyprime",0.}, {
"Dyrung",0.},
93 {
"t",0.}, {
"mu",0.}, {
"Delta",0.},
95 {
"D",2ul}, {
"maxPower",2ul}, {
"CYLINDER",
false}, {
"Ly",1ul}, {
"mfactor",1}
100 {
"max_alfa",100.}, {
"min_alfa",1.e-11}, {
"lim_alfa",10ul}, {
"eps_svd",1.e-7},
101 {
"Mincr_abs", 10ul}, {
"Mincr_per", 2ul}, {
"Mincr_rel", 1.1},
102 {
"min_Nsv",0ul}, {
"max_Nrich",-1},
103 {
"max_halfsweeps",40ul}, {
"min_halfsweeps",1ul},
104 {
"Minit",10ul}, {
"Qinit",1ul}, {
"Mlimit",500ul},
105 {
"tol_eigval",1.e-5}, {
"tol_state",1.e-5},
116 size_t Lcell = P.size();
118 for (
size_t l=0; l<
N_sites; ++l)
120 N_phys += P.get<
size_t>(
"Ly",l%Lcell);
124 if (P.HAS_ANY_OF({
"Dy",
"Dyperp",
"Dyprime"}))
126 this->
set_name(
"Dzyaloshinsky-Moriya");
128 else if (P.HAS_ANY_OF({
"t",
"mu",
"Delta"}))
138 std::vector<std::vector<std::string>> labellist;
151 std::size_t Lcell = P.size();
155 for(std::size_t loc=0; loc<
N_sites; ++loc)
160 std::size_t orbitals =
B[loc].orbitals();
161 std::size_t next_orbitals =
B[lp1].orbitals();
162 std::size_t nextn_orbitals =
B[lp2].orbitals();
166 param1d Bx = P.fill_array1d<
double>(
"Bx",
"Bxorb", orbitals, loc%Lcell);
167 param1d Kx = P.fill_array1d<
double>(
"Kx",
"Kxorb", orbitals, loc%Lcell);
168 param2d Dyperp = P.fill_array2d<
double>(
"Dyrung",
"Dy",
"Dyperp", orbitals, loc%Lcell, P.get<
bool>(
"CYLINDER"));
170 labellist[loc].push_back(Bx.label);
171 labellist[loc].push_back(Kx.label);
172 labellist[loc].push_back(Dyperp.label);
174 param2d Jxpara = P.fill_array2d<
double>(
"Jx",
"Jxpara", {orbitals, next_orbitals}, loc%Lcell);
175 param2d Jypara = P.fill_array2d<
double>(
"Jy",
"Jypara", {orbitals, next_orbitals}, loc%Lcell);
176 param2d Jwpara = P.fill_array2d<
double>(
"Jw",
"Jwpara", {orbitals, next_orbitals}, loc%Lcell);
177 param2d betaKTpara = P.fill_array2d<
double>(
"betaKT",
"betaKTpara", {orbitals, next_orbitals}, loc%Lcell);
179 labellist[loc].push_back(Jxpara.label);
180 labellist[loc].push_back(Jypara.label);
181 labellist[loc].push_back(Jwpara.label);
182 labellist[loc].push_back(betaKTpara.label);
184 ArrayXd Bz_array =
B[loc].ZeroField();
185 ArrayXd mu_array =
B[loc].ZeroField();
186 ArrayXd nu_array =
B[loc].ZeroField();
187 ArrayXd Kz_array =
B[loc].ZeroField();
188 ArrayXXd Jperp_array =
B[loc].ZeroHopping();
191 B[loc].HeisenbergHamiltonian(Jperp_array, Jperp_array, Bz_array, Bx.a, mu_array, nu_array, Kz_array, Kx.a, Dyperp.a));
192 pushlist.push_back(std::make_tuple(loc, Hloc, 1.));
195 param2d Dypara = P.fill_array2d<
double>(
"Dy",
"Dypara", {orbitals, next_orbitals}, loc%Lcell);
196 labellist[loc].push_back(Dypara.label);
198 if (loc <
N_sites-1 or !
static_cast<bool>(boundary))
200 for (std::size_t alfa=0; alfa<orbitals; alfa++)
201 for (std::size_t beta=0; beta<next_orbitals; ++beta)
213 auto local_Sx =
B[loc].Scomp(
SX,alfa);
214 auto local_Sz =
B[loc].Scomp(
SZ,alfa);
215 auto local_iSy =
B[loc].Scomp(
iSY,alfa);
279 param2d Dyprime = P.fill_array2d<
double>(
"Dyprime",
"Dyprime_array", {orbitals, nextn_orbitals}, loc%Lcell);
280 labellist[loc].push_back(Dyprime.label);
282 if (loc <
N_sites-2 or !
static_cast<bool>(boundary))
284 for (std::size_t alfa=0; alfa<orbitals; ++alfa)
285 for (std::size_t beta=0; beta<nextn_orbitals; ++beta)
289 B[lp2].
Scomp(
SZ,beta)), +Dyprime(alfa,beta)));
292 B[lp2].
Scomp(
SX,beta)), -Dyprime(alfa,beta)));
299ref (
const vector<Param> ¶ms,
double L)
301 ParamHandler P(params,{{
"D",2ul},{
"Ly",1ul},{
"m",0.},{
"J",1.},{
"Jxy",0.},{
"Jz",0.},
302 {
"Jprime",0.},{
"Bz",0.},{
"Bx",0.},{
"Kx",0.},{
"Kz",0.},{
"Dy",0.},{
"Dyprime",0.},{
"R",0.}});
305 size_t Ly = P.get<
size_t>(
"Ly");
306 size_t D = P.get<
size_t>(
"D");
307 double J = P.get<
double>(
"J");
308 double Jxy = P.get<
double>(
"Jxy");
309 double Jz = P.get<
double>(
"Jz");
310 double Jprime = P.get<
double>(
"Jprime");
311 double R = P.get<
double>(
"R");
314 if (isinf(L) and J > 0. and P.ARE_ALL_ZERO<
double>({
"m",
"Jprime",
"Jxy",
"Jz",
"Bz",
"Bx",
"Kx",
"Kz",
"Dy",
"Dyprime",
"R"}))
317 out.
source =
"F. B. Ramos and J. C. Xavier, N-leg spin-S Heisenberg ladders, Phys. Rev. B 89, 094424 (2014)";
318 out.method =
"literature";
322 if (Ly == 1) {out.value = -log(2)+0.25; out.method =
"analytical";}
323 if (Ly == 2) {out.value = -0.578043140180; out.method =
"IDMRG high precision";}
324 if (Ly == 3) {out.value = -0.600537;}
325 if (Ly == 4) {out.value = -0.618566;}
326 if (Ly == 5) {out.value = -0.62776;}
327 if (Ly == 6) {out.value = -0.6346;}
331 if (Ly == 1) {out.value = -1.40148403897;}
332 if (Ly == 2) {out.value = -1.878372746;}
333 if (Ly == 3) {out.value = -2.0204;}
334 if (Ly == 4) {out.value = -2.0957;}
335 if (Ly == 5) {out.value = -2.141;}
336 if (Ly == 6) {out.value = -2.169;}
340 if (Ly == 1) {out.value = -2.828337;}
341 if (Ly == 2) {out.value = -3.930067;}
342 if (Ly == 3) {out.value = -4.2718;}
343 if (Ly == 4) {out.value = -4.446;}
344 if (Ly == 5) {out.value = -4.553;}
345 if (Ly == 6) {out.value = -4.60;}
349 if (Ly == 1) {out.value = -4.761248;}
350 if (Ly == 2) {out.value = -6.73256;}
351 if (Ly == 3) {out.value = -7.3565;}
352 if (Ly == 4) {out.value = -7.669;}
353 if (Ly == 5) {out.value = -7.865;}
354 if (Ly == 6) {out.value = -7.94;}
358 if (Ly == 1) {out.value = -7.1924;}
359 if (Ly == 2) {out.value = -10.2852;}
360 if (Ly == 3) {out.value = -11.274;}
361 if (Ly == 4) {out.value = -11.76;}
362 if (Ly == 5) {out.value = -12.08;}
363 if (Ly == 6) {out.value = -12.1;}
369 else if (isinf(L) and D == 2 and Jxy > 0. and P.ARE_ALL_ZERO<
double>({
"m",
"J",
"Jprime",
"Jz",
"Bz",
"Bx",
"Kx",
"Kz",
"Dy",
"Dyprime",
"R"}))
371 out.value = -M_1_PI*Jxy;
372 out.source =
"S. Paul, A. K. Ghosh, Ground state properties of the bond alternating spin-1/2 anisotropic Heisenberg chain, Condensed Matter Physics, 2017, Vol. 20, No 2, 23701: 1–16";
373 out.method =
"analytical";
376 else if (D == 2 and J > 0. and Jprime == 0.5*J and P.ARE_ALL_ZERO<
double>({
"m",
"Jxy",
"Jz",
"Bz",
"Bx",
"Kx",
"Kz",
"Dy",
"Dyprime",
"R"}))
378 out.value = -0.375*J;
379 out.source =
"https://en.wikipedia.org/wiki/Majumdar-Ghosh_model";
380 out.method =
"analytical";
382 if (isinf(L) and D==3 and abs(J-0.5)<1e-14 and abs(R+0.5)<1e-14)
384 double x = 0.5*(7.+3.*sqrt(5.));
386 for (
int n=1; n<10000; ++n)
388 sumres += 1./(1.+pow(x,n));
390 out.value = -1.-sqrt(5)/2.*(1.+4.*sumres) + 8./3.;
391 out.source =
"Barber & Batchelor (1989), Parkinson (1988)";
392 out.method =
"analytical";
vector< SpinBase< Sym::U0 > > B
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::U0, double > >::type Scomp(SPINOP_LABEL Sa, size_t locx, size_t locy=0, double factor=1.) const
void finalize(const bool COMPRESS=true, const std::size_t power=1, const double tolerance=::mynumeric_limits< double >::epsilon())
void setLocBasis(const std::vector< std::vector< qType > > &q)
DMRG::VERBOSITY::OPTION VERB
void set_name(const std::string &label_in)
static std::vector< T > get_N_site_interaction(T const &Op0, Operator const &... Ops)
void precalc_TwoSiteData(bool FORCE=false)
void construct_from_pushlist(const PushType< OperatorType, CouplScalar > &pushlist, const std::vector< std::vector< std::string > > &labellist, size_t Lcell)
static void set_operators(const std::vector< SpinBase< Symmetry_ > > &B, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static const std::map< string, std::any > sweep_defaults
static void add_operators(const std::vector< SpinBase< Symmetry > > &B, const ParamHandler &P, PushType< SiteOperator< Symmetry, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static qarray< 0 > singlet(int N=0)
static const std::map< string, std::any > defaults
static refEnergy ref(const vector< Param > ¶ms, double L=numeric_limits< double >::infinity())
Heisenberg(Mpo< Symmetry > &Mpo_input, const vector< Param > ¶ms)
static constexpr MODEL_FAMILY FAMILY
#define MAKE_TYPEDEFS(MODEL)