-
Notifications
You must be signed in to change notification settings - Fork 1
/
autoMPO_1ch.h
41 lines (31 loc) · 1.07 KB
/
autoMPO_1ch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
inline void get_autoMPO_1ch(MPO& H, const double Eshift, const std::vector<double>& eps_,
const std::vector<double>& v_, const params &p)
{
auto ampo = AutoMPO(p.sites);
ampo += Eshift,"Id",1;
// impurity term
ampo += p.qd->U(),"Nupdn",1;
ampo += p.qd->eps(),"Ntot",1;
// impurity coupling terms
for(auto i: range1(2, p.N)){
ampo += v_[i-1],"Cdagup",1,"Cup",i;
ampo += v_[i-1],"Cdagdn",1,"Cdn",i;
ampo += v_[i-1],"Cdagup",i,"Cup",1;
ampo += v_[i-1],"Cdagdn",i,"Cdn",1;
}
// bath terms
for(auto i: range1(2, p.N)){
ampo += eps_[i-1],"Ntot",i;
for(auto j: range1(2, p.N)){
ampo += p.sc->g() * p.sc->y(i-1) * p.sc->y(j-1),"Cdagup",i,"Cdagdn",i,"Cdn",j,"Cup",j;
}
}
//hopping terms
for(auto i: range1(2, p.N-1)){
ampo += p.sc->t(),"Cdagup",i,"Cup",i+1;
ampo += p.sc->t(),"Cdagdn",i,"Cdn",i+1;
ampo += p.sc->t(),"Cdagup",i+1,"Cup",i;
ampo += p.sc->t(),"Cdagdn",i+1,"Cdn",i;
}
H = toMPO(ampo);
}