VMPS++
Loading...
Searching...
No Matches
FermionSiteSU2xU1.h
Go to the documentation of this file.
1#ifndef FERMIONSITESU2xU1_H_
2#define FERMIONSITESU2xU1_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::S1xS2<Sym::SU2<Sym::SpinSU2>,Sym::U1<Sym::ChargeU1> > >
18{
19 typedef double Scalar;
22
23public:
24
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
31 OperatorType c_1s() const {return c_1s_;}
32 OperatorType cdag_1s() const {return cdag_1s_;}
33
34 OperatorType n_1s() const {return n_1s_;}
35 OperatorType ns_1s() const {return n_1s() - 2.*d_1s();}
36 OperatorType nh_1s() const {return 2.*d_1s() - n_1s() + Id_1s();}
37 OperatorType d_1s() const {return d_1s_;}
38
39 OperatorType S_1s() const {return S_1s_;}
40
41 OperatorType Tz_1s() const {return 0.5*(n_1s() - Id_1s());}
42 OperatorType cc_1s() const {return p_1s_;}
43 OperatorType cdagcdag_1s() const {return pdag_1s_;}
44
46
47protected:
48
50
51 OperatorType Id_1s_; //identity
52 OperatorType F_1s_; //Fermionic sign
53 OperatorType c_1s_; //annihilation
55 OperatorType n_1s_; //particle number
56 OperatorType d_1s_; //double occupancy
57 OperatorType S_1s_; //orbital spin
59 OperatorType pdag_1s_; //pairing adjoint
60};
61
63FermionSite (bool REMOVE_DOUBLE, bool REMOVE_EMPTY, bool REMOVE_UP, bool REMOVE_DN, int mfactor_input, int k_input)
64{
65 bool REMOVE_SINGLE = (REMOVE_UP or REMOVE_DN)? true:false;
66
67 //create basis for one Fermionic Site
68 typename Symmetry::qType Q;
69 Eigen::Index inner_dim;
70 std::vector<std::string> ident;
71
72 if (!REMOVE_EMPTY)
73 {
74 Q={1,0}; //empty state
75 inner_dim = 1;
76 ident.push_back("empty");
77 basis_1s_.push_back(Q,inner_dim,ident);
78 ident.clear();
79 }
80
81 if (!REMOVE_SINGLE)
82 {
83 Q={2,1}; //singly occupied state
84 inner_dim = 1;
85 ident.push_back("single");
86 basis_1s_.push_back(Q,inner_dim,ident);
87 ident.clear();
88 }
89
90 if (!REMOVE_DOUBLE)
91 {
92 Q={1,2}; //doubly occupied state
93 inner_dim = 1;
94 ident.push_back("double");
95 basis_1s_.push_back(Q,inner_dim,ident);
96 ident.clear();
97 }
98
99 //cout << "single site basis" << endl << this->basis_1s_ << endl;
100
101 Id_1s_ = OperatorType({1,0},basis_1s_,"id");
102 F_1s_ = OperatorType({1,0},basis_1s_,"F");
103 c_1s_ = OperatorType({2,-1},basis_1s_,"c");
104 d_1s_ = OperatorType({1,0},basis_1s_,"d");
105 S_1s_ = OperatorType({3,0},basis_1s_,"S");
106
107 // create operators one orbitals
108 if (!REMOVE_EMPTY) Id_1s_("empty", "empty") = 1.;
109 if (!REMOVE_DOUBLE) Id_1s_("double", "double") = 1.;
110 if (!REMOVE_SINGLE) Id_1s_("single", "single") = 1.;
111
112 if (!REMOVE_EMPTY) F_1s_("empty", "empty") = 1.;
113 if (!REMOVE_DOUBLE) F_1s_("double", "double") = 1.;
114 if (!REMOVE_SINGLE) F_1s_("single", "single") = -1.;
115
116 if (!REMOVE_EMPTY and !REMOVE_SINGLE) c_1s_("empty", "single") = std::sqrt(2.);
117 if (!REMOVE_DOUBLE and !REMOVE_SINGLE) c_1s_("single", "double") = 1.;
118
119 cdag_1s_ = c_1s_.adjoint();
120 n_1s_ = std::sqrt(2.) * OperatorType::prod(cdag_1s_,c_1s_,{1,0});
121 if (!REMOVE_DOUBLE) d_1s_( "double", "double" ) = 1.;
122 if (!REMOVE_SINGLE) S_1s_("single", "single") = std::sqrt(0.75);
123 p_1s_ = -std::sqrt(0.5) * OperatorType::prod(c_1s_,c_1s_,{1,-2}); //The sign convention corresponds to c_DN c_UP
124 pdag_1s_ = p_1s_.adjoint(); //The sign convention corresponds to (c_DN c_UP)†=c_UP† c_DN†
125}
126
127#endif //FERMIONSITESU2xU1_H_
Sym::S1xS2< Sym::SU2< Sym::SpinSU2 >, Sym::U1< Sym::ChargeU1 > > Symmetry
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
OperatorType n_1s() const
Definition: FermionSite.h:33
OperatorType Id_1s_
Definition: FermionSite.h:63
OperatorType F_1s_
Definition: FermionSite.h:64
OperatorType n_1s_
Definition: FermionSite.h:72
OperatorType d_1s_
Definition: FermionSite.h:75
Qbasis< Symmetry > basis_1s_
Definition: FermionSite.h:61
OperatorType d_1s() const
Definition: FermionSite.h:37
OperatorType Id_1s() const
Definition: FermionSite.h:27
Definition: Qbasis.h:39
SiteOperatorQ< Symmetry, MatrixType_ > adjoint() const
Definition: U1.h:25
Definition: qarray.h:26