VMPS++
Loading...
Searching...
No Matches
FermionSiteU0xSU2.h
Go to the documentation of this file.
1#ifndef FERMIONSITEU0xSU2_H_
2#define FERMIONSITEU0xSU2_H_
3
5
6#include "DmrgTypedefs.h"
7
8#include "symmetry/S1xS2.h"
9#include "symmetry/SU2.h"
10#include "symmetry/U1.h"
11
13
14template <typename Symmetry> class FermionSite;
15
16template <>
17class FermionSite<Sym::SU2<Sym::ChargeSU2> >
18{
19 typedef double Scalar;
23
24public:
26 FermionSite (bool REMOVE_DOUBLE, bool REMOVE_EMPTY, bool REMOVE_UP, bool REMOVE_DN, int mfactor_input=1, int k_input=0);
27
28 OperatorType Id_1s() const {return Id_1s_;}
29 OperatorType F_1s() const {return F_1s_;}
30
32 {
33 if (sigma == UP and G == A) {return cupA_1s_;}
34 else if (sigma == UP and G == B) {return cupB_1s_;}
35 else if (sigma == DN and G == A) {return cdnA_1s_;}
36 return cdnB_1s_; //else if sigma==DN and G==B
37 }
38 OperatorType cdag_1s(SPIN_INDEX sigma, SUB_LATTICE G) const {return c_1s(sigma, G).adjoint();}
39
40 OperatorType n_1s() const {return n_1s(UP) + n_1s(DN);}
41 OperatorType n_1s(SPIN_INDEX sigma) const { if (sigma == UP) {return nup_1s_;} return ndn_1s_; }
42 OperatorType ns_1s() const {return Id_1s()-nh_1s();}
43 OperatorType nh_1s() const {return nh_1s_;}
44
45 OperatorType Sz_1s() const {return Sz_1s_;}
46 OperatorType Sp_1s() const {return Sp_1s_;}
47 OperatorType Sm_1s() const {return Sm_1s_;}
49
50 OperatorType T_1s() const {return T_1s_;}
51
53protected:
54
56
57 OperatorType Id_1s_; //identity
58 OperatorType F_1s_; //Fermionic sign
59
60 OperatorType cupA_1s_; //annihilation
61 OperatorType cdnA_1s_; //annihilation
62 OperatorType cupB_1s_; //annihilation
63 OperatorType cdnB_1s_; //annihilation
64
65 OperatorType nup_1s_; //particle number
66 OperatorType ndn_1s_; //particle number
67 OperatorType nh_1s_; //holon number
68 OperatorType Sz_1s_; //orbital spin
69 OperatorType Sp_1s_; //orbital spin
70 OperatorType Sm_1s_; //orbital spin
71 OperatorType T_1s_; //orbital isospin
73};
74
76FermionSite (bool REMOVE_DOUBLE, bool REMOVE_EMPTY, bool REMOVE_UP, bool REMOVE_DN, int mfactor_input, int k_input)
77{
78 bool REMOVE_HOLON = (REMOVE_DOUBLE or REMOVE_EMPTY)? true:false;
79
80 //create basis for one Fermionic Site
81 typename Symmetry::qType Q; //empty occupied state
82 Eigen::Index inner_dim;
83 std::vector<std::string> ident;
84 //assert(!U_IS_INFINITE and "For charge SU2, U is not allowed to be infinity. This breaks the Charge-SU2 Symmetry.");
85
86 if (!REMOVE_HOLON)
87 {
88 Q = {2};
89 inner_dim = 1;
90 ident.push_back("holon");
91 basis_1s_.push_back(Q,inner_dim,ident);
92 ident.clear();
93 }
94
95 if (!REMOVE_UP and !REMOVE_DN)
96 {
97 Q={1}; //singly occupied state
98 inner_dim = 2;
99 ident.push_back("up");
100 ident.push_back("dn");
101 basis_1s_.push_back(Q,inner_dim,ident);
102 ident.clear();
103 }
104 else if (REMOVE_UP and !REMOVE_DN)
105 {
106 Q={1}; //singly occupied state
107 inner_dim = 1;
108 ident.push_back("dn");
109 basis_1s_.push_back(Q,inner_dim,ident);
110 ident.clear();
111 }
112 else if (!REMOVE_UP and REMOVE_DN)
113 {
114 Q={1}; //singly occupied state
115 inner_dim = 1;
116 ident.push_back("up");
117 basis_1s_.push_back(Q,inner_dim,ident);
118 ident.clear();
119 }
120
121 Id_1s_ = OperatorType({1},basis_1s_,"id");
122 F_1s_ = OperatorType({1},basis_1s_,"F");
123 cupA_1s_ = OperatorType({2},basis_1s_,"cā†‘(A)");
124 cupB_1s_ = OperatorType({2},basis_1s_,"cā†‘(B)");
125 cdnA_1s_ = OperatorType({2},basis_1s_,"cā†“(A)");
126 cdnB_1s_ = OperatorType({2},basis_1s_,"cā†“(B)");
127 nh_1s_ = OperatorType({1},basis_1s_,"nh");
128 T_1s_ = OperatorType({3},basis_1s_,"T");
129 exp_ipiSz_1s_ = ComplexOperatorType({1},basis_1s_,"exp_ipiSz");
130
131 // create operators for one orbital
132 if (!REMOVE_HOLON) Id_1s_("holon", "holon") = 1.;
133 if (!REMOVE_UP) Id_1s_("up", "up") = 1.;
134 if (!REMOVE_DN) Id_1s_("dn", "dn") = 1.;
135
136 if (!REMOVE_HOLON) F_1s_("holon", "holon") = 1.;
137 if (!REMOVE_UP) F_1s_("up", "up") = -1.;
138 if (!REMOVE_DN) F_1s_("dn", "dn") = -1.;
139
140 if (!REMOVE_HOLON) nh_1s_("holon","holon") = 1.;
141
142 if (!REMOVE_HOLON) T_1s_( "holon", "holon" ) = std::sqrt(0.75);
143
144 if (!REMOVE_HOLON and !REMOVE_DN) cupA_1s_( "dn", "holon" ) = sqrt(2.);
145 if (!REMOVE_HOLON and !REMOVE_UP) cupA_1s_( "holon", "up" ) = -1.;
146
147 if (!REMOVE_HOLON and !REMOVE_UP) cdnA_1s_( "up", "holon" ) = sqrt(2.);
148 if (!REMOVE_HOLON and !REMOVE_DN) cdnA_1s_( "holon", "dn" ) = 1.;
149
150 if (!REMOVE_HOLON and !REMOVE_DN) cupB_1s_( "dn", "holon" ) = -1.*sqrt(2.);
151 if (!REMOVE_HOLON and !REMOVE_UP) cupB_1s_( "holon", "up" ) = -1.;
152
153 if (!REMOVE_HOLON and !REMOVE_UP) cdnB_1s_( "up", "holon" ) = -1.*sqrt(2.);
154 if (!REMOVE_HOLON and !REMOVE_DN) cdnB_1s_( "holon", "dn" ) = 1.;
155
156 nup_1s_ = std::sqrt(0.5) * OperatorType::prod(cupA_1s_.adjoint(),cupA_1s_,{1});
157 ndn_1s_ = std::sqrt(0.5) * OperatorType::prod(cdnA_1s_.adjoint(),cdnA_1s_,{1});
158
159// cout << "cupA_1s_=" << endl << MatrixXd(cupA_1s_.plain<double>().data) << endl << endl;
160// cout << "cdagupA_1s_=" << endl << MatrixXd(cupA_1s_.adjoint().plain<double>().data) << endl << endl;
161// cout << "sqrt(0.5)*cdagupA_1s_*cupA_1s_=" << endl << sqrt(0.5)*MatrixXd(OperatorType::prod(cupA_1s_.adjoint(),cupA_1s_,{1}).plain<double>().data) << endl << endl;
162// cout << "sqrt(0.5)*cdagdnA_1s_*cdnA_1s_=" << endl << sqrt(0.5)*MatrixXd(OperatorType::prod(cdnA_1s_.adjoint(),cdnA_1s_,{1}).plain<double>().data) << endl << endl;
163// cout << "sqrt(0.5)*cdagupB_1s_*cupB_1s_=" << endl << sqrt(0.5)*MatrixXd(OperatorType::prod(cupB_1s_.adjoint(),cupB_1s_,{1}).plain<double>().data) << endl << endl;
164// cout << "cdagdnA_1s_*cdnA_1s_=" << endl << MatrixXd(OperatorType::prod(cdnA_1s_.adjoint(),cdnA_1s_,{1}).plain<double>().data) << endl << endl;
165
166 Sz_1s_ = 0.5 * (std::sqrt(0.5) * OperatorType::prod(cupA_1s_.adjoint(),cupA_1s_,{1}) - std::sqrt(0.5) * OperatorType::prod(cdnA_1s_.adjoint(),cdnA_1s_,{1}));
167 //cout << "cSz_1s_=" << endl << MatrixXd(Sz_1s_.plain<double>().data) << endl << endl;
168 Sp_1s_ = -std::sqrt(0.5) * OperatorType::prod(cupA_1s_.adjoint(),cdnA_1s_,{1});
169 Sm_1s_ = Sp_1s_.adjoint();
170
171 if (!REMOVE_UP) exp_ipiSz_1s_("up","up") = +1.i;
172 if (!REMOVE_DN) exp_ipiSz_1s_("dn","dn") = -1.i;
173 if (!REMOVE_HOLON) exp_ipiSz_1s_("holon","holon") = 1.;
174}
175
176#endif //FERMIONSITESU2xU0_H_
SPIN_INDEX
Definition: DmrgTypedefs.h:36
@ DN
Definition: DmrgTypedefs.h:38
@ UP
Definition: DmrgTypedefs.h:37
SUB_LATTICE
Definition: DmrgTypedefs.h:130
@ B
Definition: DmrgTypedefs.h:130
@ A
Definition: DmrgTypedefs.h:130
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
ComplexOperatorType exp_ipiSz_1s() const
OperatorType c_1s(SPIN_INDEX sigma, SUB_LATTICE G) const
SiteOperatorQ< Symmetry, Eigen::Matrix< complex< Scalar >, Eigen::Dynamic, Eigen::Dynamic > > ComplexOperatorType
OperatorType cdag_1s(SPIN_INDEX sigma, SUB_LATTICE G) const
OperatorType n_1s(SPIN_INDEX sigma) const
OperatorType Sp_1s_
Definition: FermionSite.h:78
OperatorType Id_1s_
Definition: FermionSite.h:63
OperatorType F_1s_
Definition: FermionSite.h:64
OperatorType nh_1s() const
Definition: FermionSite.h:36
ComplexOperatorType exp_ipiSz_1s_
Definition: FermionSite.h:80
OperatorType Sm_1s_
Definition: FermionSite.h:79
OperatorType ndn_1s_
Definition: FermionSite.h:74
Qbasis< Symmetry > basis_1s_
Definition: FermionSite.h:61
OperatorType c_1s(SPIN_INDEX sigma) const
Definition: FermionSite.h:30
OperatorType nup_1s_
Definition: FermionSite.h:73
OperatorType Id_1s() const
Definition: FermionSite.h:27
OperatorType Sz_1s_
Definition: FermionSite.h:77
Definition: Qbasis.h:39
SiteOperatorQ< Symmetry, MatrixType_ > adjoint() const
Definition: SU2.h:36
Definition: qarray.h:26