1#ifndef SPINLESSFERMIONSITE_H_
2#define SPINLESSFERMIONSITE_H_
8template <
typename Symmetry_>
34 typename Symmetry_::qType
getQ (
int Delta)
const;
47template<
typename Symmetry_>
55template <
typename Symmetry_>
68 Id_1s_(
"empty",
"empty") = 1.;
69 Id_1s_(
"occup",
"occup") = 1.;
71 F_1s_(
"empty",
"empty") = 1.;
72 F_1s_(
"occup",
"occup") = -1.;
74 c_1s_(
"empty",
"occup") = 1.;
75 cdag_1s_(
"occup",
"empty") = 1.;
80 n_1s_(
"occup",
"occup") = 1.;
82 nph_1s_(
"occup",
"occup") = +0.5;
83 nph_1s_(
"empty",
"empty") = -0.5;
88template<
typename Symmetry_>
92 if constexpr (std::is_same<Symmetry, Sym::U0>::value)
94 typename Symmetry::qType Q = {};
95 Eigen::Index inner_dim;
96 std::vector<std::string> ident;
98 ident.push_back(
"empty");
99 ident.push_back(
"occup");
101 basis_1s_.push_back(Q,inner_dim,ident);
104 else if constexpr (std::is_same<Symmetry, Sym::U1<Sym::ChargeU1> >::value)
106 typename Symmetry::qType Q;
107 Eigen::Index inner_dim;
108 std::vector<std::string> ident;
111 ident.push_back(
"empty");
113 basis_1s_.push_back(Q,inner_dim,ident);
118 ident.push_back(
"occup");
119 basis_1s_.push_back(Q,inner_dim,ident);
124template<
typename Symmetry_>
126getQ (
int Delta)
const
128 if constexpr (Symmetry::IS_TRIVIAL) {
return {};}
129 else if constexpr (Symmetry::Nq == 1)
131 if constexpr (Symmetry::kind()[0] == Sym::KIND::N)
133 typename Symmetry::qType out;
137 else if constexpr (Symmetry::kind()[0] == Sym::KIND::Z2)
139 typename Symmetry::qType out;
140 out = {posmod<2>(Delta)};
143 else {assert(
false and
"Ill-defined KIND of the used Symmetry.");}
145 static_assert(
"You've inserted a symmetry which can not be handled by SpinlessFermionSite.");
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
OperatorType nph_1s() const
Qbasis< Symmetry > basis_1s() const
OperatorType Id_1s() const
OperatorType cdag_1s() const
Symmetry_::qType getQ(int Delta) const
Qbasis< Symmetry > basis_1s_
OperatorType c_1s() const
OperatorType n_1s() const
OperatorType F_1s() const