VMPS++
Loading...
Searching...
No Matches
Hubbard.h
Go to the documentation of this file.
1#ifndef VANILLA_GRANDHUBBARDMODEL
2#define VANILLA_GRANDHUBBARDMODEL
3
4#include "symmetry/U0.h"
5#include "HubbardU1xU1.h"
6#include "BetheAnsatzIntegrals.h" // from TOOLS, depends on gsl
7
8namespace VMPS
9{
25class Hubbard : public Mpo<Sym::U0,double>, public HubbardObservables<Sym::U0>, public ParamReturner
26{
27public:
30
31 Hubbard() : Mpo() {};
32
33 Hubbard(Mpo<Symmetry> &Mpo_input, const vector<Param> &params)
34 :Mpo<Symmetry>(Mpo_input),
37 {
38 ParamHandler P(params,Hubbard::defaults);
39 size_t Lcell = P.size();
40 N_phys = 0;
41 for (size_t l=0; l<N_sites; ++l) N_phys += P.get<size_t>("Ly",l%Lcell);
42 this->precalc_TwoSiteData();
43 this->HERMITIAN = true;
44 this->HAMILTONIAN = true;
45 };
46
47 Hubbard (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
48
49 static qarray<0> singlet (int N) {return qarray<0>{};};
50 static constexpr MODEL_FAMILY FAMILY = HUBBARD;
51 static constexpr int spinfac = 2;
52
53 template<typename Symmetry_>
54 static void add_operators (const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P,
55 PushType<SiteOperator<Symmetry_,double>,double>& pushlist, std::vector<std::vector<std::string>>& labellist,
56 const BC boundary=BC::OPEN);
57
58 static const std::map<string,std::any> defaults;
59
60 static refEnergy ref (const vector<Param> &params, double L=numeric_limits<double>::infinity());
61};
62
63const std::map<string,std::any> Hubbard::defaults =
64{
65 {"t",1.}, {"tPrime",0.}, {"tRung",1.},
66 {"mu",0.}, {"t0",0.}, {"Fp", 0.},
67 {"U",0.}, {"Uph",0.},
68 {"V",0.}, {"Vrung",0.},
69 {"Vxy",0.}, {"Vz",0.},
70 {"Bz",0.}, {"Bx",0.},
71 {"J",0.}, {"Jrung",0.},
72 {"J3site",0.},
73 {"Delta",0.}, {"DeltaUP",0.}, {"DeltaDN",0.},
74 {"X",0.}, {"Xperp",0.},
75 {"REMOVE_DOUBLE",false}, {"REMOVE_EMPTY",false}, {"REMOVE_UP",false}, {"REMOVE_DN",false}, {"mfactor",1}, {"k",0},
76 {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}
77};
78
80Hubbard (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
81:Mpo<Symmetry> (L, Symmetry::qvacuum(), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
82 HubbardObservables(L,params,Hubbard::defaults),
84{
85 ParamHandler P(params,Hubbard::defaults);
86
87 size_t Lcell = P.size();
88
89 for (size_t l=0; l<N_sites; ++l)
90 {
91 N_phys += P.get<size_t>("Ly",l%Lcell);
92 setLocBasis(F[l].get_basis().qloc(),l);
93 }
94
95 param1d U = P.fill_array1d<double>("U", "Uorb", F[0].orbitals(), 0);
96 if (isfinite(U.a.sum()))
97 {
98 this->set_name("Hubbard");
99 }
100 else if (P.HAS_ANY_OF({"J", "J3site"}))
101 {
102 this->set_name("t-J");
103 }
104 else
105 {
106 this->set_name("U=∞-Hubbard");
107 }
109 std::vector<std::vector<std::string>> labellist;
110 HubbardU1xU1::set_operators(F, P, pushlist, labellist, boundary);
111 add_operators(F, P, pushlist, labellist, boundary);
112
113 this->construct_from_pushlist(pushlist, labellist, Lcell);
114 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
115
116 this->precalc_TwoSiteData();
117}
118
119template<typename Symmetry_>
121add_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)
122{
123 std::size_t Lcell = P.size();
124 std::size_t N_sites = F.size();
125
126 for(std::size_t loc=0; loc<N_sites; ++loc)
127 {
128 std::size_t lp1 = (loc+1)%N_sites;
129 std::size_t lp2 = (loc+2)%N_sites;
130
131 std::size_t orbitals = F[loc].orbitals();
132 std::size_t next_orbitals = F[lp1].orbitals();
133 std::size_t nextn_orbitals = F[lp2].orbitals();
134
135 param2d DeltaUPpara = P.fill_array2d<double>("DeltaUP", "DeltaUPpara", {orbitals, next_orbitals}, loc%Lcell);
136 param2d DeltaDNpara = P.fill_array2d<double>("DeltaDN", "DeltaDNpara", {orbitals, next_orbitals}, loc%Lcell);
137
138 labellist[loc].push_back(DeltaUPpara.label);
139 labellist[loc].push_back(DeltaDNpara.label);
140
141 if (loc < N_sites-1 or !static_cast<bool>(boundary))
142 {
143 for (std::size_t alfa=0; alfa<orbitals; ++alfa)
144 for (std::size_t beta=0; beta<next_orbitals; ++beta)
145 {
146 if (!P.HAS("DeltaUPfull"))
147 {
148 if (DeltaUPpara(alfa,beta) != 0.)
149 {
150 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].cdag(UP,alfa)*F[loc].sign()), F[lp1].cdag(UP,beta)), +DeltaUPpara(alfa,beta)));
151 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry,double>::get_N_site_interaction((F[loc].c(UP,alfa) *F[loc].sign()), F[lp1].c(UP,beta)), -DeltaUPpara(alfa,beta)));
152 }
153 }
154 if (!P.HAS("DeltaDNfull"))
155 {
156 if (DeltaDNpara(alfa,beta) != 0.)
157 {
158 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)), +DeltaDNpara(alfa,beta)));
159 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)), -DeltaDNpara(alfa,beta)));
160 }
161 }
162 }
163 }
164
165 // ArrayXd U_array = F[loc].ZeroField();
166 // ArrayXd Uph_array = F[loc].ZeroField();
167 // ArrayXd E_array = F[loc].ZeroField();
168 // ArrayXd Bz_array = F[loc].ZeroField();
169 // ArrayXXd tperp_array = F[loc].ZeroHopping();
170 // ArrayXXd Vperp_array = F[loc].ZeroHopping();
171 // ArrayXXd Jperp_array = F[loc].ZeroHopping();
172
173 param1d Bx = P.fill_array1d<double>("Bx", "Bxorb", orbitals, loc%Lcell);
174 labellist[loc].push_back(Bx.label);
175
176 param1d Fp = P.fill_array1d<double>("Fp", "Fporb", orbitals, loc%Lcell);
177 labellist[loc].push_back(Fp.label);
178
179 auto H_Bx = F[loc].template coupling_Bx<double>(Bx.a);
180 auto H_Fp = F[loc].template coupling_singleFermion<double>(Fp.a);
181 auto Hloc = Mpo<Symmetry,double>::get_N_site_interaction((H_Bx+H_Fp));
182 pushlist.push_back(std::make_tuple(loc, Hloc, 1.));
183 }
184}
185
187ref (const vector<Param> &params, double L)
188{
189 ParamHandler P(params,{{"t",1.},{"U",0.},{"n",1.},{"Ly",1ul},{"tRung",1.},{"tPrime",0.},
190 {"t0",0.},{"V",0.},{"Bz",0.},{"Bx",0.},{"J",0.},{"J3site",0.}});
191 refEnergy out;
192
193 size_t Ly = P.get<size_t>("Ly");
194 double n = P.get<double>("n");
195 double U = P.get<double>("U");
196 double t = P.get<double>("t");
197 double tRung = P.get<double>("tRung");
198
199 // half-filled chain
200 if (isinf(L) and Ly == 1ul and n == 1. and P.ARE_ALL_ZERO<double>({"tPrime","t0","V","Bz","Bx","J","J3site"}))
201 {
202 out.value = BetheAnsatz::e0(U,t);
203 out.source = "Elliott H. Lieb, F. Y. Wu, Absence of Mott Transition in an Exact Solution of the Short-Range, One-Band Model in One Dimension, Phys. Rev. Lett. 20, 1445 (1968)";
204 out.method = "num. integration with gsl";
205 }
206 // U=0 ladder
207 else if (Ly == 2ul and n == 1. and P.ARE_ALL_ZERO<double>({"U","tPrime","t0","V","Bz","Bx","J","J3site"}))
208 {
209 if (t/tRung <= 0.5) {out.value = -tRung;}
210 else
211 {
212 if (isinf(L)) {out.value = -tRung-2.*M_1_PI*tRung*(sqrt(pow(2.*t/tRung,2)-1.)-acos(0.5*tRung/t));}
213 }
214 out.source = "Zheng Weihong, J. Oitmaa, C. J. Hamer, R. J. Bursill, Numerical studies of the two-leg Hubbard ladder, J. Phys.: Condens. Matter 13 (2001) 433–448";
215 out.method = "analytical";
216 }
217
218 return out;
219}
220
221}
222
223#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
std::enable_if< Dummy::IS_SPIN_SU2(), Mpo< Sym::U0, 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::U0, 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::U0, double > >::type n(size_t locx, size_t locy=0) const
vector< FermionBase< Sym::U0 > > F
std::enable_if< Dummy::IS_SPIN_SU2(), Mpo< Sym::U0, 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
Definition: Mpo.h:40
static std::vector< T > get_N_site_interaction(T const &Op0, Operator const &... Ops)
Definition: Mpo.h:117
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)
Definition: U0.h:28
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
Hubbard model without any symmetries. MPO representation of the Hubbard model corresponding to Hubbar...
Definition: Hubbard.h:26
Sym::U0 Symmetry
Definition: Hubbard.h:28
static qarray< 0 > singlet(int N)
Definition: Hubbard.h:49
static void add_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: Hubbard.h:121
static refEnergy ref(const vector< Param > &params, double L=numeric_limits< double >::infinity())
Definition: Hubbard.h:187
static constexpr MODEL_FAMILY FAMILY
Definition: Hubbard.h:50
static const std::map< string, std::any > defaults
Definition: Hubbard.h:58
static constexpr int spinfac
Definition: Hubbard.h:51
Hubbard(Mpo< Symmetry > &Mpo_input, const vector< Param > &params)
Definition: Hubbard.h:33
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
Definition: qarray.h:26