VMPS++
Loading...
Searching...
No Matches
HubbardU1xU1.h
Go to the documentation of this file.
1#ifndef STRAWBERRY_HUBBARDMODEL
2#define STRAWBERRY_HUBBARDMODEL
3
4//include "bases/FermionBase.h"
5#include "symmetry/S1xS2.h"
6#include "symmetry/U1.h"
7//include "Mpo.h"
8//include "ParamHandler.h" // from HELPERS
10#include "ParamReturner.h"
11#include "Geometry2D.h" // from TOOLS
12
13namespace VMPS
14{
15
49class HubbardU1xU1 : public Mpo<Sym::S1xS2<Sym::U1<Sym::SpinU1>,Sym::U1<Sym::ChargeU1> >,double>,
50 public HubbardObservables<Sym::S1xS2<Sym::U1<Sym::SpinU1>,Sym::U1<Sym::ChargeU1> > >,
51 public ParamReturner
52{
53public:
54
57
58
60
61 HubbardU1xU1(Mpo<Symmetry> &Mpo_input, const vector<Param> &params)
62 :Mpo<Symmetry>(Mpo_input),
65 {
66 ParamHandler P(params,HubbardU1xU1::defaults);
67 size_t Lcell = P.size();
68 N_phys = 0;
69 for (size_t l=0; l<N_sites; ++l) N_phys += P.get<size_t>("Ly",l%Lcell);
70 this->precalc_TwoSiteData();
71 this->HERMITIAN = true;
72 this->HAMILTONIAN = true;
73 };
74
75 HubbardU1xU1 (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
77
78 static qarray<2> singlet (int N=0, int L=0) {return qarray<2>{0,N};};
79 static constexpr MODEL_FAMILY FAMILY = HUBBARD;
80 static constexpr int spinfac = 2;
81
91 template<typename Symmetry_>
92 static void set_operators (const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P,
93 PushType<SiteOperator<Symmetry_,double>,double>& pushlist, std::vector<std::vector<std::string>>& labellist, const BC boundary=BC::OPEN);
94
96 static const std::map<string,std::any> defaults;
97};
98
99const std::map<string,std::any> HubbardU1xU1::defaults =
100{
101 {"t",1.}, {"tPrime",0.}, {"tRung",1.},
102 {"mu",0.}, {"t0",0.},
103 {"U",0.}, {"Uph",0.},
104 {"V",0.}, {"Vrung",0.},
105 {"Vxy",0.}, {"Vz",0.},
106 {"Bz",0.},
107 {"J",0.}, {"Jperp",0.}, {"J3site",0.},
108 {"X",0.}, {"Xperp",0.},
109 {"REMOVE_DOUBLE",false}, {"REMOVE_EMPTY",false}, {"REMOVE_UP",false}, {"REMOVE_DN",false}, {"mfactor",1}, {"k",0},
110 {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}
111};
112
114HubbardU1xU1 (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
115:Mpo<Symmetry> (L, Symmetry::qvacuum(), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
116 HubbardObservables(L,params,HubbardU1xU1::defaults),
118{
119 ParamHandler P(params, HubbardU1xU1::defaults);
120 size_t Lcell = P.size();
121
122 for (size_t l=0; l<N_sites; ++l)
123 {
124 N_phys += P.get<size_t>("Ly",l%Lcell);
125 setLocBasis(F[l].get_basis().qloc(),l);
126 }
127
128 param1d U = P.fill_array1d<double>("U", "Uorb", F[0].orbitals(), 0);
129 if (isfinite(U.a.sum()))
130 {
131 this->set_name("Hubbard");
132 }
133 else if (P.HAS_ANY_OF({"J", "J3site"}))
134 {
135 this->set_name("t-J");
136 }
137 else
138 {
139 this->set_name("U=∞-Hubbard");
140 }
141
143 std::vector<std::vector<std::string>> labellist;
144 set_operators(F, P, pushlist, labellist, boundary);
145
146 this->construct_from_pushlist(pushlist, labellist, Lcell);
147 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
148 this->precalc_TwoSiteData();
149}
150
151template<typename Symmetry_>
153set_operators (const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P, PushType<SiteOperator<Symmetry_,double>,double>& pushlist, std::vector<std::vector<std::string>>& labellist, const BC boundary)
154{
155 std::size_t Lcell = P.size();
156 std::size_t N_sites = F.size();
157 if(labellist.size() != N_sites) {labellist.resize(N_sites);}
158
159 for (std::size_t loc=0; loc<N_sites; ++loc)
160 {
161 size_t lp1 = (loc+1)%N_sites;
162 size_t lp2 = (loc+2)%N_sites;
163
164 std::size_t orbitals = F[loc].orbitals();
165 std::size_t next_orbitals = F[lp1].orbitals();
166 std::size_t nextn_orbitals = F[lp2].orbitals();
167
168 stringstream ss;
169 ss << "Ly=" << P.get<size_t>("Ly",loc%Lcell);
170 labellist[loc].push_back(ss.str());
171
172 auto push_full = [&N_sites, &loc, &F, &P, &pushlist, &labellist, &boundary] (string xxxFull, string label,
173 const vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > &first,
174 const vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > &last,
175 vector<double> factor, bool FERMIONIC) -> void
176 {
177 ArrayXXd Full = P.get<Eigen::ArrayXXd>(xxxFull);
178 vector<vector<std::pair<size_t,double> > > R = Geometry2D::rangeFormat(Full);
179
180 if (static_cast<bool>(boundary)) {assert(R.size() == N_sites and "Use an (N_sites)x(N_sites) hopping matrix for open BC!");}
181 else {assert(R.size() >= 2*N_sites and "Use at least a (2*N_sites)x(N_sites) hopping matrix for infinite BC!");}
182
183 for (size_t j=0; j<first.size(); j++)
184 for (size_t h=0; h<R[loc].size(); ++h)
185 {
186 size_t range = R[loc][h].first;
187 double value = R[loc][h].second;
188
189 if (range != 0)
190 {
191 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > ops(range+1);
192 ops[0] = first[j];
193 for (size_t i=1; i<range; ++i)
194 {
195 if (FERMIONIC) {ops[i] = F[(loc+i)%N_sites].sign();}
196 else {ops[i] = F[(loc+i)%N_sites].Id();}
197 }
198 ops[range] = last[j][(loc+range)%N_sites];
199 pushlist.push_back(std::make_tuple(loc, ops, factor[j] * value));
200 }
201 }
202
203 stringstream ss;
204 ss << label << "(" << Geometry2D::hoppingInfo(Full) << ")";
205 labellist[loc].push_back(ss.str());
206 };
207
208 if (P.HAS("tFull"))
209 {
210 SiteOperatorQ<Symmetry_,Eigen::MatrixXd> cUP_sign_local = F[loc].c(UP,0) * F[loc].sign();
211 SiteOperatorQ<Symmetry_,Eigen::MatrixXd> cDN_sign_local = F[loc].c(DN,0) * F[loc].sign();
212 SiteOperatorQ<Symmetry_,Eigen::MatrixXd> cdagUP_sign_local = F[loc].cdag(UP,0) * F[loc].sign();
213 SiteOperatorQ<Symmetry_,Eigen::MatrixXd> cdagDN_sign_local = F[loc].cdag(DN,0) * F[loc].sign();
214
215 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > cUP_ranges(N_sites); for (size_t i=0; i<N_sites; ++i) {cUP_ranges[i] = F[i].c(UP,0);}
216 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > cdagUP_ranges(N_sites); for (size_t i=0; i<N_sites; ++i) {cdagUP_ranges[i] = F[i].cdag(UP,0);}
217 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > cDN_ranges(N_sites); for (size_t i=0; i<N_sites; ++i) {cDN_ranges[i] = F[i].c(DN,0);}
218 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > cdagDN_ranges(N_sites); for (size_t i=0; i<N_sites; ++i) {cdagDN_ranges[i] = F[i].cdag(DN,0);}
219
220 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > frst {cdagUP_sign_local, cUP_sign_local, cdagDN_sign_local, cDN_sign_local};
221 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {cUP_ranges, cdagUP_ranges, cDN_ranges, cdagDN_ranges};
222 push_full("tFull", "tᵢⱼ", frst, last, {-1., +1., -1., +1.}, PROP::FERMIONIC);
223 }
224
225 if (P.HAS("Vxyfull"))
226 {
227 auto Gloc = static_cast<SUB_LATTICE>(static_cast<int>(pow(-1,loc)));
228 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > first {F[loc].Tp(0,Gloc), F[loc].Tm(0,Gloc)};
229 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Tp_ranges(N_sites);
230 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Tm_ranges(N_sites);
231 for (size_t i=0; i<N_sites; i++)
232 {
233 auto Gi = static_cast<SUB_LATTICE>(static_cast<int>(pow(-1,i)));
234 Tp_ranges[i] = F[i].Tp(0,Gi);
235 Tm_ranges[i] = F[i].Tm(0,Gi);
236 }
237
238 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {Tm_ranges, Tp_ranges};
239 push_full("Vxyfull", "Vxyᵢⱼ", first, last, {0.5,0.5}, PROP::BOSONIC);
240 }
241
242 if (P.HAS("Vzfull"))
243 {
244 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > first {F[loc].Tz(0)};
245 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Tz_ranges(N_sites);
246 for (size_t i=0; i<N_sites; i++)
247 {
248 Tz_ranges[i] = F[i].Tz(0);
249 }
250
251 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {Tz_ranges};
252 push_full("Vzfull", "Vzᵢⱼ", first, last, {1.}, PROP::BOSONIC);
253 }
254
255 if (P.HAS("vzfull"))
256 {
257 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > first {F[loc].tz(0)};
258 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > tz_ranges(N_sites);
259 for (size_t i=0; i<N_sites; i++)
260 {
261 tz_ranges[i] = F[i].tz(0);
262 }
263
264 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {tz_ranges};
265 push_full("vzfull", "vzᵢⱼ", first, last, {1.}, PROP::BOSONIC);
266 }
267
268 if (P.HAS("VextFull"))
269 {
270 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > first {F[loc].n(0)};
271 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > n_ranges(N_sites); for (size_t i=0; i<N_sites; i++) {n_ranges[i] = F[i].n(0);}
272 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {n_ranges};
273 push_full("VextFull", "Vextᵢⱼ", first, last, {1.}, PROP::BOSONIC);
274 }
275
276 if (P.HAS("Jfull"))
277 {
278 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > first {F[loc].Sp(0), F[loc].Sm(0), F[loc].Sz(0)};
279 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Sp_ranges(N_sites);
280 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Sm_ranges(N_sites);
281 vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > Sz_ranges(N_sites);
282 for (size_t i=0; i<N_sites; i++)
283 {
284 Sp_ranges[i] = F[i].Sp(0);
285 Sm_ranges[i] = F[i].Sm(0);
286 Sz_ranges[i] = F[i].Sz(0);
287 }
288
289 vector<vector<SiteOperatorQ<Symmetry_,Eigen::MatrixXd> > > last {Sm_ranges, Sp_ranges, Sz_ranges};
290 push_full("Jfull", "Jᵢⱼ", first, last, {0.5,0.5,1.}, PROP::BOSONIC);
291 }
292
293 // local terms: U, t0, μ, Bz, t⟂, V⟂, J⟂, X⟂
294
295 param1d U = P.fill_array1d<double>("U", "Uorb", orbitals, loc%Lcell);
296 param1d Uph = P.fill_array1d<double>("Uph", "Uorb", orbitals, loc%Lcell);
297 param1d t0 = P.fill_array1d<double>("t0", "t0orb", orbitals, loc%Lcell);
298 param1d mu = P.fill_array1d<double>("mu", "muorb", orbitals, loc%Lcell);
299 param1d Bz = P.fill_array1d<double>("Bz", "Bzorb", orbitals, loc%Lcell);
300 param2d tperp = P.fill_array2d<double>("tRung", "t", "tPerp", orbitals, loc%Lcell, P.get<bool>("CYLINDER"));
301 param2d Vperp = P.fill_array2d<double>("Vrung", "V", "Vperp", orbitals, loc%Lcell, P.get<bool>("CYLINDER"));
302 param2d Vxyperp = P.fill_array2d<double>("Vxyrung", "Vxy", "Vxyperp", orbitals, loc%Lcell, P.get<bool>("CYLINDER"));
303 param2d Vzperp = P.fill_array2d<double>("Vzrung", "Vz", "Vzperp", orbitals, loc%Lcell, P.get<bool>("CYLINDER"));
304 param2d Jperp = P.fill_array2d<double>("Jrung", "J", "Jperp", orbitals, loc%Lcell, P.get<bool>("CYLINDER"));
305
306 labellist[loc].push_back(U.label);
307 labellist[loc].push_back(Uph.label);
308 labellist[loc].push_back(t0.label);
309 labellist[loc].push_back(mu.label);
310 labellist[loc].push_back(Bz.label);
311 labellist[loc].push_back(tperp.label);
312 labellist[loc].push_back(Vperp.label);
313 labellist[loc].push_back(Jperp.label);
314 ArrayXd C_array = F[loc].ZeroField();
315
316 //ArrayXd Vxy_array = F[loc].ZeroHopping();
317 //ArrayXd Vz_array = F[loc].ZeroHopping();
318
320 (
321 F[loc].template HubbardHamiltonian<double>(U.a, Uph.a, t0.a-mu.a, Bz.a, tperp.a, Vperp.a, Vzperp.a, Vxyperp.a, Jperp.a, Jperp.a, C_array)
322 );
323 pushlist.push_back(std::make_tuple(loc, Hloc, 1.));
324
325 // Nearest-neighbour terms: t, V, J, X
326
327 param2d tpara = P.fill_array2d<double>("t", "tPara", {orbitals, next_orbitals}, loc%Lcell);
328 param2d Vpara = P.fill_array2d<double>("V", "Vpara", {orbitals, next_orbitals}, loc%Lcell);
329 param2d Jpara = P.fill_array2d<double>("J", "Jpara", {orbitals, next_orbitals}, loc%Lcell);
330 param2d Xpara = P.fill_array2d<double>("X", "Xpara", {orbitals, next_orbitals}, loc%Lcell);
331 param2d Vxypara = P.fill_array2d<double>("Vxy", "Vxypara", {orbitals, next_orbitals}, loc%Lcell);
332 param2d Vzpara = P.fill_array2d<double>("Vz", "Vzpara", {orbitals, next_orbitals}, loc%Lcell);
333
334 labellist[loc].push_back(tpara.label);
335 labellist[loc].push_back(Vpara.label);
336 labellist[loc].push_back(Jpara.label);
337 labellist[loc].push_back(Xpara.label);
338 labellist[loc].push_back(Vxypara.label);
339 labellist[loc].push_back(Vzpara.label);
340
341 if (loc < N_sites-1 or !static_cast<bool>(boundary))
342 {
343 for (std::size_t alfa=0; alfa<orbitals; ++alfa)
344 for (std::size_t beta=0; beta<next_orbitals; ++beta)
345 {
346 // t
347 if (!P.HAS("tFull"))
348 {
349 if (tpara(alfa,beta) != 0.)
350 {
351 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(UP,alfa)*F[loc].sign()), F[lp1].c(UP,beta)), -tpara(alfa,beta)));
352 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(DN,alfa)*F[loc].sign()), F[lp1].c(DN,beta)), -tpara(alfa,beta)));
353 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(UP,alfa) *F[loc].sign()), F[lp1].cdag(UP,beta)), +tpara(alfa,beta)));
354 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(DN,alfa) *F[loc].sign()), F[lp1].cdag(DN,beta)), +tpara(alfa,beta)));
355 }
356 }
357
358 // V
359 if (!P.HAS("Vfull"))
360 {
361 if (Vpara(alfa,beta) != 0.)
362 {
363 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].n(alfa), F[lp1].n(beta)), Vpara(alfa,beta)));
364 }
365 }
366
367 // J
368 if (!P.HAS("Jfull"))
369 {
370 if (Jpara(alfa,beta) != 0.)
371 {
372 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].Sp(alfa), F[lp1].Sm(beta)), 0.5*Jpara(alfa,beta)));
373 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].Sm(alfa), F[lp1].Sp(beta)), 0.5*Jpara(alfa,beta)));
374 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].Sz(alfa), F[lp1].Sz(beta)), Jpara(alfa,beta)));
375 }
376 }
377
378 // X, uncompressed variant with 12 operators
379// Terms.push_tight(loc, -Xpara(alfa,beta), F[loc].cdag(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa), F[lp1].c(UP,beta));
380// Terms.push_tight(loc, -Xpara(alfa,beta), F[loc].cdag(UP,alfa)*F[loc].sign(), F[lp1].c(UP,beta) * F[lp1].n(DN,beta));
381// Terms.push_tight(loc, +2.*Xpara(alfa,beta), F[loc].cdag(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa), F[lp1].c(UP,beta) * F[lp1].n(DN,beta));
382//
383// Terms.push_tight(loc, -Xpara(alfa,beta), F[loc].cdag(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa), F[lp1].c(DN,beta));
384// Terms.push_tight(loc, -Xpara(alfa,beta), F[loc].cdag(DN,alfa)*F[loc].sign(), F[lp1].c(DN,beta) * F[lp1].n(UP,beta));
385// Terms.push_tight(loc, +2.*Xpara(alfa,beta), F[loc].cdag(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa), F[lp1].c(DN,beta) * F[lp1].n(UP,beta));
386//
387// Terms.push_tight(loc, +Xpara(alfa,beta), F[loc].c(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa), F[lp1].cdag(UP,beta));
388// Terms.push_tight(loc, +Xpara(alfa,beta), F[loc].c(UP,alfa)*F[loc].sign(), F[lp1].cdag(UP,beta) * F[lp1].n(DN,beta));
389// Terms.push_tight(loc, -2.*Xpara(alfa,beta), F[loc].c(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa), F[lp1].cdag(UP,beta) * F[lp1].n(DN,beta));
390//
391// Terms.push_tight(loc, +Xpara(alfa,beta), F[loc].c(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa), F[lp1].cdag(DN,beta));
392// Terms.push_tight(loc, +Xpara(alfa,beta), F[loc].c(DN,alfa)*F[loc].sign(), F[lp1].cdag(DN,beta) * F[lp1].n(UP,beta));
393// Terms.push_tight(loc, -2.*Xpara(alfa,beta), F[loc].c(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa), F[lp1].cdag(DN,beta) * F[lp1].n(UP,beta));
394
395 // X, compressed variant with 8 operators
396 if (!P.HAS("Xfull"))
397 {
398 if (Xpara(alfa,beta) != 0.)
399 {
400 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa)),
401 (F[lp1].c(UP,beta) * (F[lp1].Id()-2.*F[lp1].n(DN,beta)))),
402 -Xpara(alfa,beta)));
403 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(UP,alfa)*F[loc].sign()),
404 (F[lp1].c(UP,beta) * F[lp1].n(DN,beta))),
405 -Xpara(alfa,beta)));
406 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa)),
407 (F[lp1].c(DN,beta) * (F[lp1].Id()-2.*F[lp1].n(UP,beta)))),
408 -Xpara(alfa,beta)));
409 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(DN,alfa)*F[loc].sign()),
410 (F[lp1].c(DN,beta) * F[lp1].n(UP,beta))),
411 -Xpara(alfa,beta)));
412
413 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(UP,alfa)*F[loc].sign() * F[loc].n(DN,alfa)),
414 (F[lp1].cdag(UP,beta) * (F[lp1].Id()-2.*F[lp1].n(DN,beta)))),
415 +Xpara(alfa,beta)));
416 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(UP,alfa)*F[loc].sign()),
417 (F[lp1].cdag(UP,beta) * F[lp1].n(DN,beta))),
418 +Xpara(alfa,beta)));
419 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(DN,alfa)*F[loc].sign() * F[loc].n(UP,alfa)),
420 (F[lp1].cdag(DN,beta) * (F[lp1].Id()-2.*F[lp1].n(UP,beta)))),
421 +Xpara(alfa,beta)));
422 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(DN,alfa)*F[loc].sign()),
423 (F[lp1].cdag(DN,beta) * F[lp1].n(UP,beta))),
424 +Xpara(alfa,beta)));
425 }
426 }
427
428 // Vxy, Vz
429 if (!P.HAS("Vxyfull"))
430 {
431 if (Vxypara(alfa,beta) != 0.)
432 {
433 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].cc(alfa), F[lp1].cdagcdag(beta)), 0.5*Vxypara(alfa,beta)*pow(-1,loc+lp1)));
434 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].cdagcdag(alfa), F[lp1].cc(beta)), 0.5*Vxypara(alfa,beta)*pow(-1,loc+lp1)));
435 }
436 }
437 if (!P.HAS("Vzfull"))
438 {
439 if (Vzpara(alfa,beta) != 0.)
440 {
441 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(F[loc].Tz(alfa), F[lp1].Tz(beta)), Vzpara (alfa,beta)));
442 }
443 }
444 }
445 }
446
447 // Next-nearest-neighbour terms: t'
448 param2d tPrime = P.fill_array2d<double>("tPrime", "tPrime_array", {orbitals, nextn_orbitals}, loc%Lcell);
449 labellist[loc].push_back(tPrime.label);
450 if (loc < N_sites-2 or !static_cast<bool>(boundary))
451 {
452 for (std::size_t alfa=0; alfa<orbitals; ++alfa)
453 for (std::size_t beta=0; beta<nextn_orbitals; ++beta)
454 {
455 if (tPrime(alfa,beta) != 0.)
456 {
457 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(UP,alfa)*F[loc].sign()),
458 F[lp1].sign(),
459 F[lp2].c(UP,beta)), -tPrime(alfa,beta)));
460 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(DN,alfa)*F[loc].sign()),
461 F[lp1].sign(),
462 F[lp2].c(DN,beta)), -tPrime(alfa,beta)));
463 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(UP,alfa) *F[loc].sign()),
464 F[lp1].sign(),
465 F[lp2].cdag(UP,beta)), +tPrime(alfa,beta)));
466 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(DN,alfa) *F[loc].sign()),
467 F[lp1].sign(),
468 F[lp2].cdag(DN,beta)), +tPrime(alfa,beta)));
469 }
470 }
471 }
472
473 /*param0d J3site = P.fill_array0d<double>("J3site", "J3site", loc%Lcell);
474 labellist[loc].push_back(J3site.label);
475
476 if (J3site.x != 0.)
477 {
478 lout << "Warning! J3site has to be tested against ED!" << endl;
479
480 assert(orbitals == 1 and "Cannot do a ladder with 3-site J terms!");
481 if (loc < N_sites-2 or !static_cast<bool>(boundary) )
482 {
483 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cup_sign_local = F[loc].c(UP) * F[loc].sign();
484 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cdn_sign_local = F[loc].c(DN) * F[loc].sign();
485 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cupdag_sign_local = F[loc].cdag(UP) * F[loc].sign();
486 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cdndag_sign_local = F[loc].cdag(DN) * F[loc].sign();
487
488 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> nup_sign_tight = F[lp1].n(UP) * F[lp1].sign();
489 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> ndn_sign_tight = F[lp1].n(UP) * F[lp1].sign();
490 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> Sp_sign_tight = F[lp1].Sp() * F[lp1].sign();
491 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> Sm_sign_tight = F[lp1].Sm() * F[lp1].sign();
492
493 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cup_nextn = F[lp2].c(UP);
494 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cdn_nextn = F[lp2].c(DN);
495 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cupdag_nextn = F[lp2].cdag(UP);
496 SiteOperatorQ<Symmetry_, Eigen::MatrixXd> cdndag_nextn = F[lp2].cdag(DN);
497
498 // three-site terms without spinflip
499 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cupdag_sign_local, ndn_sign_tight, cup_nextn), -0.25*J3site.x));
500 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cdndag_sign_local, nup_sign_tight, cdn_nextn), -0.25*J3site.x));
501 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cup_sign_local, ndn_sign_tight, cupdag_nextn), +0.25*J3site.x));
502 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cdn_sign_local, nup_sign_tight, cdndag_nextn), +0.25*J3site.x));
503
504 // three-site terms with spinflip
505 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cupdag_sign_local, Sm_sign_tight, cdn_nextn), -0.25*J3site.x));
506 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cdndag_sign_local, Sp_sign_tight, cup_nextn), -0.25*J3site.x));
507 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cup_sign_local, Sp_sign_tight, cdndag_nextn), +0.25*J3site.x));
508 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction(cdn_sign_local, Sm_sign_tight, cupdag_nextn), +0.25*J3site.x));
509 }
510 }*/
511 }
512}
513
514} // end namespace VMPS::models
515
516#endif
@ DN
Definition: DmrgTypedefs.h:38
@ UP
Definition: DmrgTypedefs.h:37
MODEL_FAMILY
Definition: DmrgTypedefs.h:96
@ HUBBARD
Definition: DmrgTypedefs.h:96
BC
Definition: DmrgTypedefs.h:161
SUB_LATTICE
Definition: DmrgTypedefs.h:130
std::enable_if< Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type c(size_t locx, size_t locy=0, double factor=1.) const
std::enable_if< Dummy::IS_SPIN_SU2() and!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type P(size_t locx1, size_t locx2, size_t locy1=0, size_t locy2=0) const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type Sz(size_t locx, size_t locy=0) const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type Sp(size_t locx, size_t locy=0) const
Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > Id() const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type Sm(size_t locx, size_t locy=0) const
std::enable_if<!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type cc(size_t locx, size_t locy=0) const
std::enable_if<!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type Tz(size_t locx, size_t locy=0) const
std::enable_if<!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type cdagcdag(size_t locx, size_t locy=0) const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type n(size_t locx, size_t locy=0) const
vector< FermionBase< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > > > > F
std::enable_if< Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > >, double > >::type cdag(size_t locx, size_t locy=0, double factor=std::sqrt(2.)) const
std::size_t N_phys
Definition: MpoTerms.h:400
void finalize(const bool COMPRESS=true, const std::size_t power=1, const double tolerance=::mynumeric_limits< double >::epsilon())
Definition: MpoTerms.h:1281
std::size_t N_sites
Definition: MpoTerms.h:395
void setLocBasis(const std::vector< std::vector< qType > > &q)
Definition: MpoTerms.h:715
DMRG::VERBOSITY::OPTION VERB
Definition: MpoTerms.h:102
void set_name(const std::string &label_in)
Definition: MpoTerms.h:471
std::string label
Definition: MpoTerms.h:615
Definition: Mpo.h:40
static std::vector< T > get_N_site_interaction(T const &Op0, Operator const &... Ops)
Definition: Mpo.h:117
void construct_from_pushlist(const PushType< OperatorType, CouplScalar > &pushlist, const std::vector< std::vector< std::string > > &labellist, size_t Lcell)
Definition: U1.h:25
Hubbard model with U(1) symmetries. MPO representation of the Hubbard model.
Definition: HubbardU1xU1.h:52
HubbardU1xU1(Mpo< Symmetry > &Mpo_input, const vector< Param > &params)
Definition: HubbardU1xU1.h:61
static void set_operators(const std::vector< FermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
Definition: HubbardU1xU1.h:153
static constexpr int spinfac
Definition: HubbardU1xU1.h:80
Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::U1< Sym::ChargeU1 > > Symmetry
Definition: HubbardU1xU1.h:55
static const std::map< string, std::any > defaults
Definition: HubbardU1xU1.h:96
static constexpr MODEL_FAMILY FAMILY
Definition: HubbardU1xU1.h:79
static qarray< 2 > singlet(int N=0, int L=0)
Definition: HubbardU1xU1.h:78
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
const bool FERMIONIC
Definition: DmrgTypedefs.h:496
const bool BOSONIC
Definition: DmrgTypedefs.h:498
Definition: qarray.h:26