VMPS++
Loading...
Searching...
No Matches
KondoU1.h
Go to the documentation of this file.
1#ifndef STRAWBERRY_TRANSVERSEKONDOMODEL
2#define STRAWBERRY_TRANSVERSEKONDOMODEL
3
4#include "models/KondoU1xU1.h"
5//include "symmetry/U1.h"
6
7namespace VMPS
8{
32class KondoU1 : public Mpo<Sym::U1<Sym::ChargeU1>,double>, public KondoObservables<Sym::U1<Sym::ChargeU1> >, public ParamReturner
33{
34public:
37
38private:
39 typedef typename Symmetry::qType qType;
40
41public:
42
44 KondoU1 () : Mpo(){};
45 KondoU1 (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
47
48 static qarray<1> singlet (int N) {return qarray<1>{N};}; // not a real singlet, but useful for consistency when switching symmetries
49 static constexpr MODEL_FAMILY FAMILY = KONDO;
50
51 template<typename Symmetry_>
52 static void add_operators (const std::vector<SpinBase<Symmetry_> > &B, const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P,
53 PushType<SiteOperator<Symmetry_,double>,double>& pushlist, std::vector<std::vector<std::string>>& labellist,
54 const BC boundary=BC::OPEN);
55
58 bool validate (qType qnum) const;
59
60 static const std::map<string,std::any> defaults;
61};
62
63const std::map<string,std::any> KondoU1::defaults =
64{
65 {"t",1.}, {"tPrime",0.}, {"tRung",0.},
66 {"J",1.}, {"Jdir",0.},
67 {"Jxy",0.}, {"Jz",0.},
68 {"U",0.}, {"Uph",0.},
69 {"V",0.}, {"Vrung",0.},
70 {"mu",0.}, {"t0",0.},
71 {"Bz",0.}, {"Bx",0.}, {"Bzsub",0.}, {"Bxsub",0.}, {"Kz",0.}, {"Kx",0.},
72 {"Inext",0.}, {"Iprev",0.}, {"I3next",0.}, {"I3prev",0.}, {"I3loc",0.},
73 {"D",2ul}, {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul}, {"LyF",1ul}
74};
75
77KondoU1 (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
78:Mpo<Symmetry> (L, qarray<Symmetry::Nq>({0}), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
79 KondoObservables(L,params,defaults),
81{
82 ParamHandler P(params,defaults);
83
84 size_t Lcell = P.size();
85
86 for (size_t l=0; l<N_sites; ++l)
87 {
88 N_phys += P.get<size_t>("Ly",l%Lcell);
89 setLocBasis((B[l].get_basis().combine(F[l].get_basis())).qloc(),l);
90 }
91
92 this->set_name("Transverse-field Kondo");
93
95 std::vector<std::vector<std::string>> labellist;
96 KondoU1xU1::set_operators(B, F, P, pushlist, labellist, boundary);
97 add_operators(B, F, P, pushlist, labellist, boundary);
98
99 this->construct_from_pushlist(pushlist, labellist, Lcell);
100 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
101
102 this->precalc_TwoSiteData();
103}
104
106validate (qType qnum) const
107{
108 if (qnum[0]<=2*static_cast<int>(this->N_phys) and qnum[0]>0) {return true;}
109 else {return false;}
110}
111
112template<typename Symmetry_>
114add_operators (const std::vector<SpinBase<Symmetry_> > &B, const std::vector<FermionBase<Symmetry_> > &F, const ParamHandler &P,
115 PushType<SiteOperator<Symmetry_,double>,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 = B.size();
119 if(labellist.size() != N_sites) {labellist.resize(N_sites);}
120
121 for (std::size_t loc=0; loc<N_sites; ++loc)
122 {
123 // Bx substrate
124 param1d Bxsub = P.fill_array1d<double>("Bxsub", "Bxsuborb", F[loc].orbitals(), loc%Lcell);
125 labellist[loc].push_back(Bxsub.label);
126
127 // Bx impurities
128 param1d Bx = P.fill_array1d<double>("Bx", "Bxorb", B[loc].orbitals(), loc%Lcell);
129 labellist[loc].push_back(Bx.label);
130
131 // Kx anisotropy
132 param1d Kx = P.fill_array1d<double>("Kx", "Kxorb", B[loc].orbitals(), loc%Lcell);
133 labellist[loc].push_back(Kx.label);
134
135 ArrayXXd Jxyperp = B[loc].ZeroHopping();
136 ArrayXXd Jzperp = B[loc].ZeroHopping();
137 ArrayXd Bzorb = B[loc].ZeroField();
138 ArrayXd muorb = B[loc].ZeroField();
139 ArrayXd nuorb = B[loc].ZeroField();
140 ArrayXd Kzorb = B[loc].ZeroField();
141 ArrayXXd Dyperp = B[loc].ZeroHopping();
142
143 ArrayXd Uorb = F[loc].ZeroField();
144 ArrayXd Uphorb = F[loc].ZeroField();
145 ArrayXd Eorb = F[loc].ZeroField();
146 ArrayXd Bzsuborb = F[loc].ZeroField();
147 ArrayXXd tPerp = F[loc].ZeroHopping();
148 ArrayXXd Vperp = F[loc].ZeroHopping();
149 ArrayXXd Jperp = F[loc].ZeroHopping();
150
151 auto Himp = kroneckerProduct(B[loc].HeisenbergHamiltonian(Jxyperp,Jzperp,Bzorb,Bx.a,muorb,nuorb,Kzorb,Kx.a,Dyperp), F[loc].Id());
152 auto Hsub = kroneckerProduct(B[loc].Id(), F[loc].template coupling_Bx<double>(Bxsub.a));
153
154 pushlist.push_back(std::make_tuple(loc, Mpo<Symmetry_,double>::get_N_site_interaction(Himp+Hsub), 1.));
155 }
156}
157
158};
159
160#endif
MODEL_FAMILY
Definition: DmrgTypedefs.h:96
@ KONDO
Definition: DmrgTypedefs.h:96
BC
Definition: DmrgTypedefs.h:161
@ B
Definition: DmrgTypedefs.h:130
SiteOperator< Symmetry, Scalar_ > kroneckerProduct(const SiteOperator< Symmetry, Scalar_ > &O1, const SiteOperator< Symmetry, Scalar_ > &O2)
Definition: SiteOperator.h:164
vector< SpinBase< Sym::U1< Sym::ChargeU1 > > > B
vector< FermionBase< Sym::U1< Sym::ChargeU1 > > > 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
Definition: U1.h:25
Kondo Model.
Definition: KondoU1.h:33
Sym::U1< Sym::ChargeU1 > Symmetry
Definition: KondoU1.h:35
static constexpr MODEL_FAMILY FAMILY
Definition: KondoU1.h:49
Symmetry::qType qType
Definition: KondoU1.h:39
bool validate(qType qnum) const
Definition: KondoU1.h:106
static qarray< 1 > singlet(int N)
Definition: KondoU1.h:48
static const std::map< string, std::any > defaults
Definition: KondoU1.h:60
static void add_operators(const std::vector< SpinBase< Symmetry_ > > &B, 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: KondoU1.h:114
static void set_operators(const std::vector< SpinBase< Symmetry_ > > &B, 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: KondoU1xU1.h:147
#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
Definition: qarray.h:26