VMPS++
Loading...
Searching...
No Matches
HubbardSU2.h
Go to the documentation of this file.
1#ifndef HUBBARDMODELSU2_H_
2#define HUBBARDMODELSU2_H_
3
5#include "symmetry/SU2.h"
6#include "bases/FermionBase.h"
8//include "tensors/SiteOperatorQ.h"
9//include "tensors/SiteOperator.h"
10#include "Mpo.h"
11//include "DmrgExternal.h"
12//include "ParamHandler.h"
13#include "ParamReturner.h"
14#include "Geometry2D.h" // from TOOLS
15
16namespace VMPS
17{
18
43class HubbardSU2 : public Mpo<Sym::SU2<Sym::SpinSU2> ,double>,
44 public HubbardObservables<Sym::SU2<Sym::SpinSU2> >,
45 public ParamReturner
46{
47public:
48
51 typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic> MatrixType;
53
54private:
55
56 typedef Eigen::Index Index;
58
59public:
60
62 HubbardSU2() : Mpo(){};
63
64 HubbardSU2(Mpo<Symmetry> &Mpo_input, const vector<Param> &params)
65 :Mpo<Symmetry>(Mpo_input),
68 {
69 ParamHandler P(params,HubbardSU2::defaults);
70 size_t Lcell = P.size();
71 N_phys = 0;
72 for (size_t l=0; l<N_sites; ++l) N_phys += P.get<size_t>("Ly",l%Lcell);
73 this->precalc_TwoSiteData();
74 this->HERMITIAN = true;
75 this->HAMILTONIAN = true;
76 };
77
78 HubbardSU2 (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
80
81 static void add_operators (const std::vector<FermionBase<Symmetry> > &F, const ParamHandler &P, PushType<SiteOperator<Symmetry,double>,double>& pushlist,
82 std::vector<std::vector<std::string>>& labellist, const BC boundary=BC::OPEN);
83
84 static qarray<1> singlet (int N=0) {return qarray<1>{1};};
85 static constexpr MODEL_FAMILY FAMILY = HUBBARD;
86 static constexpr int spinfac = 1;
87
88 static const map<string,any> defaults;
89 static const map<string,any> sweep_defaults;
90};
91
92// V is standard next-nearest neighbour density interaction
93// Vz and Vxy are anisotropic isospin-isospin next-nearest neighbour interaction
94const map<string,any> HubbardSU2::defaults =
95{
96 {"t",1.}, {"tPrime",0.}, {"tRung",1.}, {"tPrimePrime",0.},
97 {"mu",0.}, {"t0",0.},
98 {"U",0.}, {"Uph",0.},
99 {"V",0.}, {"Vext",0.}, {"Vrung",0.},
100 {"Vz",0.}, {"Vzrung",0.}, {"Vxy",0.}, {"Vxyrung",0.},
101 {"J",0.}, {"Jperp",0.},
102 {"X",0.}, {"Xrung",0.},
103 {"REMOVE_DOUBLE",false}, {"REMOVE_EMPTY",false}, {"REMOVE_UP",false}, {"REMOVE_DN",false}, {"mfactor",1}, {"k",0},
104 {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}
105};
106
107const map<string,any> HubbardSU2::sweep_defaults =
108{
109 {"max_alpha",100.}, {"min_alpha",1.}, {"lim_alpha",11ul}, {"eps_svd",1e-7},
110 {"Dincr_abs", 4ul}, {"Dincr_per", 2ul}, {"Dincr_rel", 1.1},
111 {"min_Nsv",0ul}, {"max_Nrich",-1},
112 {"max_halfsweeps",24ul}, {"min_halfsweeps",6ul},
113 {"Minit",1ul}, {"Qinit",1ul}, {"Mlimit",500ul},
114 {"tol_eigval",1e-7}, {"tol_state",1e-6},
115 {"savePeriod",0ul}, {"CALC_S_ON_EXIT", true}, {"CONVTEST", DMRG::CONVTEST::VAR_2SITE}
116};
117
119HubbardSU2 (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
120:Mpo<Symmetry> (L, qarray<Symmetry::Nq>({1}), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
123{
124 ParamHandler P(params,defaults);
125 size_t Lcell = P.size();
126
127 for (size_t l=0; l<N_sites; ++l)
128 {
129 N_phys += P.get<size_t>("Ly",l%Lcell);
130 setLocBasis(F[l].get_basis().qloc(),l);
131 }
132
133 param1d U = P.fill_array1d<double>("U", "Uorb", F[0].orbitals(), 0);
134 if (isfinite(U.a.sum()))
135 {
136 this->set_name("Hubbard");
137 }
138 else
139 {
140 this->set_name("U=∞-Hubbard");
141 }
142
144 std::vector<std::vector<std::string>> labellist;
145 HubbardSU2xU1::set_operators(F, P, pushlist, labellist, boundary);
146 add_operators(F, P, pushlist, labellist, boundary);
147
148 this->construct_from_pushlist(pushlist, labellist, Lcell);
149 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
150
151 this->precalc_TwoSiteData();
152}
153
155add_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)
156{
157 std::size_t Lcell = P.size();
158 std::size_t N_sites = F.size();
159
160 for(std::size_t loc=0; loc<N_sites; ++loc)
161 {
162 std::size_t orbitals = F[loc].orbitals();
163 // Can also implement superconducting terms here
164 }
165}
166
167} // end namespace VMPS::models
168
169#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::SU2< Sym::SpinSU2 >, double > >::type P(size_t locx1, size_t locx2, size_t locy1=0, size_t locy2=0) const
vector< FermionBase< Sym::SU2< Sym::SpinSU2 > > > F
std::size_t N_phys
Definition: MpoTerms.h:400
std::size_t N_sites
Definition: MpoTerms.h:395
DMRG::VERBOSITY::OPTION VERB
Definition: MpoTerms.h:102
Definition: Mpo.h:40
void precalc_TwoSiteData(bool FORCE=false)
bool HAMILTONIAN
Definition: Mpo.h:160
bool HERMITIAN
Definition: Mpo.h:159
Definition: SU2.h:36
Hubbard Model.
Definition: HubbardSU2.h:46
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: HubbardSU2.h:155
Eigen::Index Index
Definition: HubbardSU2.h:56
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixType
Definition: HubbardSU2.h:51
static qarray< 1 > singlet(int N=0)
Definition: HubbardSU2.h:84
static const map< string, any > defaults
Definition: HubbardSU2.h:88
HubbardSU2(Mpo< Symmetry > &Mpo_input, const vector< Param > &params)
Definition: HubbardSU2.h:64
Sym::SU2< Sym::SpinSU2 > Symmetry
Definition: HubbardSU2.h:49
static constexpr MODEL_FAMILY FAMILY
Definition: HubbardSU2.h:85
static const map< string, any > sweep_defaults
Definition: HubbardSU2.h:89
static constexpr int spinfac
Definition: HubbardSU2.h:86
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)
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
const bool NON_UNITARY
Definition: DmrgTypedefs.h:495
const bool HERMITIAN
Definition: DmrgTypedefs.h:492
void finalize(bool PRINT_STATS=false)
Definition: functions.h:127
Definition: qarray.h:26