VMPS++
Loading...
Searching...
No Matches
HubbardU1.h
Go to the documentation of this file.
1#ifndef STRAWBERRY_HUBBARDMODEL_U1CHARGEONLY
2#define STRAWBERRY_HUBBARDMODEL_U1CHARGEONLY
3
4//include "bases/FermionBase.h"
5//include "symmetry/S1xS2.h"
6//include "Mpo.h"
7//include "ParamHandler.h" // from HELPERS
8//include "models/HubbardObservables.h"
10
11namespace VMPS
12{
13
14class HubbardU1 : public Mpo<Sym::U1<Sym::ChargeU1>,double>, public HubbardObservables<Sym::U1<Sym::ChargeU1> >, public ParamReturner
15{
16public:
17
20
21
22 HubbardU1() : Mpo(){};
23
24 HubbardU1(Mpo<Symmetry> &Mpo_input, const vector<Param> &params)
25 :Mpo<Symmetry>(Mpo_input),
28 {
29 ParamHandler P(params,HubbardU1::defaults);
30 size_t Lcell = P.size();
31 N_phys = 0;
32 for (size_t l=0; l<N_sites; ++l) N_phys += P.get<size_t>("Ly",l%Lcell);
33 this->precalc_TwoSiteData();
34 this->HERMITIAN = true;
35 this->HAMILTONIAN = true;
36 };
37
38 HubbardU1 (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
40
41 static qarray<1> singlet (int N) {return qarray<1>{N};};
42 static constexpr MODEL_FAMILY FAMILY = HUBBARD;
43 static constexpr int spinfac = 2;
44
46 static const std::map<string,std::any> defaults;
47};
48
49const std::map<string,std::any> HubbardU1::defaults =
50{
51 {"t",1.}, {"tPrime",0.}, {"tRung",1.},
52 {"mu",0.}, {"t0",0.},
53 {"U",0.}, {"Uph",0.},
54 {"V",0.}, {"Vrung",0.},
55 {"Vxy",0.}, {"Vz",0.},
56 {"Bz",0.}, {"Bx",0.},
57 {"J",0.}, {"Jperp",0.}, {"J3site",0.},
58 {"X",0.}, {"Xperp",0.},
59 {"REMOVE_DOUBLE",false}, {"REMOVE_EMPTY",false}, {"REMOVE_UP",false}, {"REMOVE_DN",false}, {"mfactor",1}, {"k",0},
60 {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}
61};
62
64HubbardU1 (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
65:Mpo<Symmetry> (L, Symmetry::qvacuum(), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
66 HubbardObservables(L,params,HubbardU1::defaults),
68{
69 ParamHandler P(params,HubbardU1::defaults);
70 size_t Lcell = P.size();
71
72 for (size_t l=0; l<N_sites; ++l)
73 {
74 N_phys += P.get<size_t>("Ly",l%Lcell);
75 setLocBasis(F[l].get_basis().qloc(),l);
76 }
77
78 param1d U = P.fill_array1d<double>("U", "Uorb", F[0].orbitals(), 0);
79 if (isfinite(U.a.sum()))
80 {
81 this->set_name("Hubbard");
82 }
83 else if (P.HAS_ANY_OF({"J", "J3site"}))
84 {
85 this->set_name("t-J");
86 }
87 else
88 {
89 this->set_name("U=∞-Hubbard");
90 }
91
93 std::vector<std::vector<std::string>> labellist;
94 HubbardU1xU1::set_operators(F, P, pushlist, labellist, boundary);
95
96 this->construct_from_pushlist(pushlist, labellist, Lcell);
97 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
98
99 this->precalc_TwoSiteData();
100}
101
102} // end namespace VMPS::models
103
104#endif
MODEL_FAMILY
Definition: DmrgTypedefs.h:96
@ HUBBARD
Definition: DmrgTypedefs.h:96
BC
Definition: DmrgTypedefs.h:161
std::enable_if< Dummy::IS_SPIN_SU2() and!Dummy::IS_CHARGE_SU2(), Mpo< Sym::U1< Sym::ChargeU1 >, double > >::type P(size_t locx1, size_t locx2, size_t locy1=0, size_t locy2=0) const
vector< FermionBase< Sym::U1< Sym::ChargeU1 > > > F
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
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: U1.h:25
static constexpr MODEL_FAMILY FAMILY
Definition: HubbardU1.h:42
static constexpr int spinfac
Definition: HubbardU1.h:43
static qarray< 1 > singlet(int N)
Definition: HubbardU1.h:41
HubbardU1(Mpo< Symmetry > &Mpo_input, const vector< Param > &params)
Definition: HubbardU1.h:24
Sym::U1< Sym::ChargeU1 > Symmetry
Definition: HubbardU1.h:18
static const std::map< string, std::any > defaults
Definition: HubbardU1.h:46
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
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
Definition: qarray.h:26