VMPS++
Loading...
Searching...
No Matches
PeierlsHubbardU1.h
Go to the documentation of this file.
1#ifndef HUBBARDMODELU1_H_COMPLEX
2#define HUBBARDMODELU1_H_COMPLEX
3
5
6namespace VMPS
7{
8class PeierlsHubbardU1 : public Mpo<Sym::U1<Sym::ChargeU1>,complex<double> >,
9 public HubbardObservables<Sym::U1<Sym::ChargeU1>,complex<double> >,
10 public ParamReturner
11{
12public:
13
16 typedef Eigen::Matrix<complex<double>,Eigen::Dynamic,Eigen::Dynamic> MatrixType;
18
19//private:
20
21 typedef Eigen::Index Index;
23
24public:
25
27
28 PeierlsHubbardU1(Mpo<Symmetry,complex<double>> &Mpo_input, const vector<Param> &params)
29 :Mpo<Symmetry,complex<double>>(Mpo_input),
32 {
33 ParamHandler P(params,PeierlsHubbardU1::defaults);
34 size_t Lcell = P.size();
35 N_phys = 0;
36 for (size_t l=0; l<N_sites; ++l) N_phys += P.get<size_t>("Ly",l%Lcell);
37 this->calc(P.get<size_t>("maxPower"));
38 this->precalc_TwoSiteData();
39 this->HERMITIAN = true;
40 this->HAMILTONIAN = true;
41 };
42
43 PeierlsHubbardU1 (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
44
45 template<typename Symmetry_>
46 static void add_operators (const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P,
47 PushType<SiteOperator<Symmetry_,complex<double>>,complex<double>> &pushlist, std::vector<std::vector<std::string>>& labellist,
48 const BC boundary=BC::OPEN);
49
50 static qarray<1> singlet (int N=0) {return qarray<1>{N};};
51 static constexpr MODEL_FAMILY FAMILY = HUBBARD;
52 static constexpr int spinfac = 2;
53
54 static const map<string,any> defaults;
55 static const map<string,any> sweep_defaults;
56};
57
58// V is standard next-nearest neighbour density interaction
59// Vz and Vxy are anisotropic isospin-isospin next-nearest neighbour interaction
60const map<string,any> PeierlsHubbardU1::defaults =
61{
62 {"t",1.+0.i}, {"tPrime",0.+0.i}, {"tRung",1.+0.i},
63 {"mu",0.}, {"t0",0.},
64 {"U",0.}, {"Uph",0.},
65 {"V",0.}, {"Vrung",0.},
66 {"Vxy",0.}, {"Vz",0.},
67 {"Bz",0.}, {"Bx",0.}, {"By",0.},
68 {"J",0.}, {"Jperp",0.}, {"J3site",0.},
69 {"X",0.}, {"Xperp",0.},
70 {"REMOVE_DOUBLE",false}, {"REMOVE_EMPTY",false}, {"REMOVE_UP",false}, {"REMOVE_DN",false}, {"mfactor",1}, {"k",1},
71 {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}
72};
73
74const map<string,any> PeierlsHubbardU1::sweep_defaults =
75{
76 {"max_alpha",100.}, {"min_alpha",1.}, {"lim_alpha",11ul}, {"eps_svd",1e-7},
77 {"Mincr_abs", 50ul}, {"Mincr_per", 2ul}, {"Mincr_rel", 1.1},
78 {"min_Nsv",0ul}, {"max_Nrich",-1},
79 {"max_halfsweeps",24ul}, {"min_halfsweeps",1ul},
80 {"Minit",2ul}, {"Qinit",2ul}, {"Mlimit",1000ul},
81 {"tol_eigval",1e-7}, {"tol_state",1e-6},
82 {"savePeriod",0ul}, {"CALC_S_ON_EXIT", true}, {"CONVTEST",DMRG::CONVTEST::VAR_2SITE}
83};
84
86PeierlsHubbardU1 (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
87:Mpo<Symmetry,complex<double>> (L, Symmetry::qvacuum(), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
88 HubbardObservables(L,params,PeierlsHubbardU1::defaults),
89 ParamReturner(PeierlsHubbardU1::sweep_defaults)
90{
91 ParamHandler P(params,defaults);
92 size_t Lcell = P.size();
93
94 for (size_t l=0; l<N_sites; ++l)
95 {
96 N_phys += P.get<size_t>("Ly",l%Lcell);
97 setLocBasis(F[l].get_basis().qloc(),l);
98 }
99
100 this->set_name("Peierls-Hubbard");
101
102 PushType<SiteOperator<Symmetry,complex<double>>,complex<double>> pushlist;
103 std::vector<std::vector<std::string>> labellist;
104 PeierlsHubbardU1xU1::set_operators(F, P, pushlist, labellist, boundary);
105 add_operators(F, P, pushlist, labellist, boundary);
106
107 this->construct_from_pushlist(pushlist, labellist, Lcell);
108 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
109
110 this->precalc_TwoSiteData();
111}
112
113template<typename Symmetry_>
115add_operators (const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P, PushType<SiteOperator<Symmetry_,complex<double>>,complex<double>> &pushlist, std::vector<std::vector<std::string>>& labellist, const BC boundary)
116{
117 std::size_t Lcell = P.size();
118 std::size_t N_sites = F.size();
119
120 for(std::size_t loc=0; loc<N_sites; ++loc)
121 {
122 std::size_t lp1 = (loc+1)%N_sites;
123 std::size_t lp2 = (loc+2)%N_sites;
124
125 std::size_t orbitals = F[loc].orbitals();
126 std::size_t next_orbitals = F[lp1].orbitals();
127 std::size_t nextn_orbitals = F[lp2].orbitals();
128
129 param1d Bx = P.fill_array1d<double>("Bx", "Bxorb", orbitals, loc%Lcell);
130 labellist[loc].push_back(Bx.label);
131 auto H_Bx = F[loc].template coupling_Bx<complex<double>,Symmetry>(Bx.a);
132
133 param1d By = P.fill_array1d<double>("By", "Byorb", orbitals, loc%Lcell);
134 labellist[loc].push_back(By.label);
135 auto H_By = F[loc].coupling_By(By.a); // already complex
136
138 pushlist.push_back(std::make_tuple(loc, Hloc, 1.+0.i));
139 }
140}
141
142} // end namespace VMPS::models
143
144#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 >, complex< 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 calc(const std::size_t power)
Definition: MpoTerms.h:1135
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 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
PeierlsHubbardU1(Mpo< Symmetry, complex< double > > &Mpo_input, const vector< Param > &params)
static const map< string, any > sweep_defaults
static const map< string, any > defaults
static constexpr int spinfac
static qarray< 1 > singlet(int N=0)
Sym::U1< Sym::ChargeU1 > Symmetry
Eigen::Matrix< complex< double >, Eigen::Dynamic, Eigen::Dynamic > MatrixType
static void add_operators(const std::vector< FermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, complex< double > >, complex< double > > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static void set_operators(const std::vector< FermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, complex< double > >, complex< double > > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
Definition: qarray.h:26