VMPS++
Loading...
Searching...
No Matches
SpinlessFermions.h
Go to the documentation of this file.
1#ifndef STRAWBERRY_SpinlessFermions
2#define STRAWBERRY_SpinlessFermions
3
4#include "symmetry/U0.h"
5#include "models/SpinlessFermionsU1.h"
6#include "models/SpinlessFermionsZ2.h"
7
8namespace VMPS
9{
10
27class SpinlessFermions : public Mpo<Sym::U0>, public SpinlessFermionsObservables<Sym::U0>, public ParamReturner
28{
29public:
32
33private:
34 typedef typename Symmetry::qType qType;
35
36public:
37
40 SpinlessFermions (const size_t &L, const vector<Param> &params);
42
43 static qarray<0> singlet (int N) {return qarray<0>{};};
44 static constexpr MODEL_FAMILY FAMILY = SPINLESS;
45
46 template<typename Symmetry_>
47 static void add_operators (const std::vector<SpinlessFermionBase<Symmetry_> > &B, const ParamHandler &P, HamiltonianTermsXd<Symmetry_> &Terms);
48
49 static const std::map<string,std::any> defaults;
50 static const std::map<string,std::any> sweep_defaults;
51};
52
53const std::map<string,std::any> SpinlessFermions::defaults =
54{
55 {"t",1.}, {"Delta",0.}, {"tPrime",0.},
56 {"V",0.}, {"Vph",0.},
57 {"Vprime",0.}, {"VphPrime",0.},
58 {"mu",0.},{"t0",0.},
59 {"D",2ul}, {"CALC_SQUARE",true}, {"CYLINDER",false}, {"OPEN_BC",true}, {"Ly",1ul},
60};
61
62const std::map<string,std::any> SpinlessFermions::sweep_defaults =
63{
64 {"max_alpha",100.}, {"min_alpha",1.e-11}, {"lim_alpha",10ul}, {"eps_svd",1.e-7},
65 {"Dincr_abs", 4ul}, {"Dincr_per", 2ul}, {"Dincr_rel", 1.1},
66 {"min_Nsv",0ul}, {"max_Nrich",-1},
67 {"max_halfsweeps",40ul}, {"min_halfsweeps",1ul},
68 {"Dinit",10ul}, {"Qinit",2ul}, {"Dlimit",1000ul},
69 {"tol_eigval",1.e-5}, {"tol_state",1.e-5},
70 {"savePeriod",0ul}, {"CALC_S_ON_EXIT", true}, {"CONVTEST", DMRG::CONVTEST::VAR_2SITE}
71};
72
74SpinlessFermions (const size_t &L, const vector<Param> &params)
75:Mpo<Symmetry> (L, Symmetry::qvacuum(), "", PROP::HERMITIAN, PROP::NON_UNITARY, PROP::HAMILTONIAN),
77 ParamReturner(SpinlessFermions::sweep_defaults)
78{
79 ParamHandler P(params,SpinlessFermions::defaults);
80 size_t Lcell = P.size();
81
82 for (size_t l=0; l<N_sites; ++l)
83 {
84 N_phys += P.get<size_t>("Ly",l%Lcell);
85 setLocBasis(F[l].get_basis(),l);
86 }
87
88 HamiltonianTermsXd<Symmetry> Terms(N_sites, P.get<bool>("OPEN_BC"));
91 Terms.set_name("SpinlessFermions");
92
93 this->construct_from_Terms(Terms, Lcell, P.get<bool>("CALC_SQUARE"), P.get<bool>("OPEN_BC"));
94 this->precalc_TwoSiteData();
95}
96
97} // end namespace VMPS
98
99#endif
MODEL_FAMILY
Definition: DmrgTypedefs.h:96
@ SPINLESS
Definition: DmrgTypedefs.h:96
@ B
Definition: DmrgTypedefs.h:130
void set_name(const std::string &label_in)
std::size_t N_phys
Definition: MpoTerms.h:400
std::size_t N_sites
Definition: MpoTerms.h:395
void setLocBasis(const std::vector< std::vector< qType > > &q)
Definition: MpoTerms.h:715
Definition: Mpo.h:40
void precalc_TwoSiteData(bool FORCE=false)
vector< SpinlessFermionBase< Sym::U0 > > F
Definition: U0.h:28
static void set_operators(const std::vector< SpinlessFermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static void add_operators(const std::vector< SpinlessFermionBase< Symmetry_ > > &B, const ParamHandler &P, HamiltonianTermsXd< Symmetry_ > &Terms)
SpinlessFermions Model.
static const std::map< string, std::any > sweep_defaults
static const std::map< string, std::any > defaults
static qarray< 0 > singlet(int N)
static constexpr MODEL_FAMILY FAMILY
static void add_operators(const std::vector< SpinlessFermionBase< Symmetry_ > > &B, const ParamHandler &P, HamiltonianTermsXd< Symmetry_ > &Terms)
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
Definition: qarray.h:26