1#ifndef XPED_FERMIONSSU2xU1_H_
2#define XPED_FERMIONSSU2xU1_H_
11template <
typename Symmetry>
14template <
typename Symmetry_>
15class Fermion<Sym::Combined<Sym::SU2<Sym::SpinSU2>, Symmetry_>>
17 typedef double Scalar;
20 using qType =
typename Symmetry::qType;
24 Fermion(
bool REMOVE_DOUBLE,
bool REMOVE_EMPTY,
bool REMOVE_SINGLE,
bool =
true,
bool CONSIDER_CHARGE =
true);
46 void fill_basis(
bool REMOVE_DOUBLE,
bool REMOVE_EMPTY,
bool REMOVE_SINGLE);
49 std::unordered_map<std::string, std::pair<qType, std::size_t>>
labels;
64template <
typename Symmetry_>
72 for(std::size_t q = 0; q < Symmetry::Nq; ++q) {
73 if(Symmetry::IS_FERMIONIC[q] or Symmetry::IS_BOSONIC[q]) {
83 fill_basis(REMOVE_DOUBLE, REMOVE_EMPTY, REMOVE_SINGLE);
85 qType Q_c = Symmetry::qvacuum();
87 if constexpr(Symmetry::Nq > 1) { Q_c[1] = Symmetry::IS_MODULAR[1] ?
util::constFct::posmod(-1, Symmetry::MOD_N[1]) : -1; }
88 qType Q_S = Symmetry::qvacuum();
90 Id_1s_ =
OperatorType(Symmetry::qvacuum(), basis_1s_, labels);
92 F_1s_ =
OperatorType(Symmetry::qvacuum(), basis_1s_, labels);
96 d_1s_ =
OperatorType(Symmetry::qvacuum(), basis_1s_, labels);
103 if(not REMOVE_SINGLE) { F_1s_(
"single",
"single") = -1.; }
105 if(not REMOVE_EMPTY and not REMOVE_SINGLE) { c_1s_(
"empty",
"single") = std::sqrt(2.); }
106 if(not REMOVE_DOUBLE and not REMOVE_SINGLE) { c_1s_(
"single",
"double") = 1.; }
107 cdag_1s_ = c_1s_.adjoint();
108 n_1s_ = std::sqrt(2.) * OperatorType::prod(cdag_1s_, c_1s_, Symmetry::qvacuum());
109 if(not REMOVE_DOUBLE) { d_1s_(
"double",
"double") = 1.; }
110 if(not REMOVE_SINGLE) { S_1s_(
"single",
"single") = std::sqrt(0.75); }
111 qType Q_p = Symmetry::qvacuum();
112 if constexpr(Symmetry::Nq > 1) { Q_p[1] = Symmetry::IS_MODULAR[1] ?
util::constFct::posmod(-2, Symmetry::MOD_N[1]) : -2; }
113 p_1s_ = -std::sqrt(0.5) * OperatorType::prod(c_1s_, c_1s_, Q_p);
114 pdag_1s_ = p_1s_.adjoint();
117template <
typename Symmetry_>
121 qType Q = Symmetry::qvacuum();
123 if(not REMOVE_EMPTY) { labels.insert(std::make_pair(
"empty", std::make_pair(Q, dim++))); }
124 if(not REMOVE_DOUBLE) { labels.insert(std::make_pair(
"double", std::make_pair(Q, dim++))); }
125 this->basis_1s_.push_back(Q, dim);
126 if(not REMOVE_SINGLE) {
128 this->basis_1s_.push_back(Q, 1);
129 labels.insert(std::make_pair(
"single", std::make_pair(Q, 0)));
132 qType Q = Symmetry::qvacuum();
133 if(not REMOVE_EMPTY) {
134 this->basis_1s_.push_back(Q, 1);
135 labels.insert(std::make_pair(
"empty", std::make_pair(Q, 0)));
137 if(not REMOVE_DOUBLE) {
138 std::size_t dim = (Symmetry::MOD_N[ch_index] == 2) ? 1 : 0;
140 this->basis_1s_.push_back(Q, 1);
141 labels.insert(std::make_pair(
"double", std::make_pair(Q, dim)));
143 if(not REMOVE_SINGLE) {
146 this->basis_1s_.push_back(Q, 1);
147 labels.insert(std::make_pair(
"single", std::make_pair(Q, 0)));
OperatorType p_1s_
Definition: FermionSU2xX.hpp:60
OperatorType S_1s_
Definition: FermionSU2xX.hpp:59
OperatorType nh_1s() const
Definition: FermionSU2xX.hpp:34
OperatorType ns_1s() const
Definition: FermionSU2xX.hpp:33
bool HAS_CHARGE
Definition: FermionSU2xX.hpp:51
OperatorType Id_1s_
Definition: FermionSU2xX.hpp:53
OperatorType F_1s_
Definition: FermionSU2xX.hpp:54
std::unordered_map< std::string, std::pair< qType, std::size_t > > labels
Definition: FermionSU2xX.hpp:49
OperatorType c_1s_
Definition: FermionSU2xX.hpp:55
OperatorType cc_1s() const
Definition: FermionSU2xX.hpp:40
OperatorType d_1s_
Definition: FermionSU2xX.hpp:58
OperatorType n_1s() const
Definition: FermionSU2xX.hpp:32
Qbasis< Symmetry, 1 > basis_1s() const
Definition: FermionSU2xX.hpp:43
OperatorType cdag_1s() const
Definition: FermionSU2xX.hpp:30
OperatorType S_1s() const
Definition: FermionSU2xX.hpp:37
Fermion()
Definition: FermionSU2xX.hpp:23
OperatorType cdagcdag_1s() const
Definition: FermionSU2xX.hpp:41
OperatorType F_1s() const
Definition: FermionSU2xX.hpp:27
OperatorType Id_1s() const
Definition: FermionSU2xX.hpp:26
Qbasis< Symmetry, 1 > basis_1s_
Definition: FermionSU2xX.hpp:47
OperatorType d_1s() const
Definition: FermionSU2xX.hpp:35
OperatorType c_1s() const
Definition: FermionSU2xX.hpp:29
OperatorType pdag_1s_
Definition: FermionSU2xX.hpp:61
OperatorType Tz_1s() const
Definition: FermionSU2xX.hpp:39
OperatorType cdag_1s_
Definition: FermionSU2xX.hpp:56
OperatorType n_1s_
Definition: FermionSU2xX.hpp:57
Definition: Fermion.hpp:21
std::size_t ch_index
Definition: Fermion.hpp:76
OperatorType d_1s_
Definition: Fermion.hpp:93
OperatorType n_1s_
Definition: Fermion.hpp:90
OperatorType Id_1s() const
Definition: Fermion.hpp:31
Fermion()
Definition: Fermion.hpp:28
OperatorType Id_1s_
Definition: Fermion.hpp:81
OperatorType d_1s() const
Definition: Fermion.hpp:53
OperatorType n_1s() const
Definition: Fermion.hpp:45
Qbasis< Symmetry, 1 > basis_1s_
Definition: Fermion.hpp:72
void fill_basis(bool REMOVE_DOUBLE, bool REMOVE_EMPTY, bool REMOVE_SINGLE)
Definition: Fermion.hpp:208
OperatorType F_1s_
Definition: Fermion.hpp:82
Definition: Qbasis.hpp:39
constexpr int posmod(int x)
Definition: Constfct.hpp:46
Definition: SiteOperator.hpp:10
Definition: CombSym.hpp:12