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