1#ifndef SPINLESSFERMIONBASE
2#define SPINLESSFERMIONBASE
8#include <boost/dynamic_bitset.hpp>
13#include "sites/SpinlessFermionSite.h"
14#include <boost/dynamic_bitset.hpp>
16#include <unsupported/Eigen/MatrixFunctions>
29template<
typename Symmetry_>
39 typedef typename Symmetry::qType
qType;
98template<
typename Symmetry_>
104 typename Symmetry::qType Q=Symmetry::qvacuum();
105 Eigen::Index inner_dim = 1;
130template<
typename Symmetry_>
136 if (N_orbitals == 1) {out = Op_1s; out.
label() = label;
return out;}
137 else if (N_orbitals == 0) {
return Zero_vac;}
141 if (FERMIONIC) {stringOp = this->F_1s();}
142 else {stringOp = this->Id_1s();}
144 if (
orbital == 0) {out = OperatorType::outerprod(Op_1s,this->Id_1s(),Op_1s.
Q()); TOGGLE=
true;}
147 if (
orbital == 1) {out = OperatorType::outerprod(stringOp,Op_1s,Op_1s.
Q()); TOGGLE=
true;}
148 else {out = OperatorType::outerprod(stringOp,stringOp,Symmetry_::qvacuum());}
150 for(std::size_t o=2; o<N_orbitals; o++)
152 if (
orbital == o) {out = OperatorType::outerprod(out,Op_1s,Op_1s.
Q()); TOGGLE=
true; }
153 else if (TOGGLE==
false) {out = OperatorType::outerprod(out,stringOp,Symmetry_::qvacuum());}
154 else if (TOGGLE==
true) {out = OperatorType::outerprod(out,this->Id_1s(),Op_1s.
Q());}
161template<
typename Symmetry_>
169template<
typename Symmetry_>
177template<
typename Symmetry_>
185template<
typename Symmetry_>
193template <
typename Symmetry_>
196sign (std::size_t orb1, std::size_t orb2)
const
199 if (N_orbitals == 1) {Oout = this->F_1s(); Oout.
label()=
"sign";
return Oout;}
200 else if (N_orbitals == 0) {
return Zero_vac;}
204 for (
int i=orb1; i<N_orbitals; ++i)
208 for (
int i=0; i<orb2; ++i)
212 Oout.
label() =
"sign";
217template <
typename Symmetry_>
void push_back(const std::tuple< qType, Eigen::Index, std::vector< std::string > > &state)
OperatorType n(std::size_t orbital=0) const
ArrayXXd ZeroHopping() const
ArrayXd ZeroField() const
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
OperatorType sign(std::size_t orb1=0, std::size_t orb2=0) const
Qbasis< Symmetry > TensorBasis
OperatorType nph(std::size_t orbital=0) const
OperatorType Id(std::size_t orbital=0) const
OperatorType make_operator(const OperatorType &Op_1s, size_t orbital=0, bool FERMIONIC=false, string label="") const
OperatorType cdag(std::size_t orbital=0) const
Qbasis< Symmetry > get_basis() const
OperatorType c(std::size_t orbital=0) const
Qbasis< Symmetry > basis_1s() const