1#ifndef STRAWBERRY_SPINLESSFERMIONSZ2
2#define STRAWBERRY_SPINLESSFERMIONSZ2
5#include "models/SpinlessFermionsU1.h"
45 template<
typename Symmetry_>
48 static const std::map<string,std::any>
defaults;
54 {
"t",1.}, {
"Delta",0.}, {
"tPrime",0.},
56 {
"Vprime",0.}, {
"VphPrime",0.},
58 {
"D",2ul}, {
"CALC_SQUARE",
true}, {
"CYLINDER",
false}, {
"OPEN_BC",
true}, {
"Ly",1ul},
63 {
"max_alpha",100.}, {
"min_alpha",1.e-11}, {
"lim_alpha",10ul}, {
"eps_svd",1.e-7},
64 {
"Dincr_abs", 4ul}, {
"Dincr_per", 2ul}, {
"Dincr_rel", 1.1},
65 {
"min_Nsv",0ul}, {
"max_Nrich",-1},
66 {
"max_halfsweeps",40ul}, {
"min_halfsweeps",1ul},
67 {
"Dinit",10ul}, {
"Qinit",2ul}, {
"Dlimit",1000ul},
68 {
"tol_eigval",1.e-5}, {
"tol_state",1.e-5},
79 size_t Lcell = P.size();
81 for (
size_t l=0; l<
N_sites; ++l)
83 N_phys += P.get<
size_t>(
"Ly",l%Lcell);
91 this->construct_from_Terms(Terms, Lcell, P.get<
bool>(
"CALC_SQUARE"), P.get<
bool>(
"OPEN_BC"));
95template<
typename Symmetry_>
99 std::size_t Lcell = P.size();
102 Terms.
set_name(
"SpinlessFermionsZ2");
104 for (std::size_t loc=0; loc<
N_sites; ++loc)
109 std::size_t orbitals =
F[loc].orbitals();
110 std::size_t next_orbitals =
F[lp1].orbitals();
111 std::size_t nextn_orbitals =
F[lp2].orbitals();
115 param2d DeltaPara = P.fill_array2d<
double>(
"Delta",
"DeltaPara", {orbitals, next_orbitals}, loc%Lcell);
118 if (loc <
N_sites-1 or !P.get<
bool>(
"OPEN_BC"))
120 for (std::size_t alfa=0; alfa < orbitals; ++alfa)
121 for (std::size_t beta=0; beta < next_orbitals; ++beta)
123 Terms.
push_tight(loc, +DeltaPara(alfa,beta),
F[loc].cdag(alfa) *
F[loc].sign(),
F[lp1].cdag(beta));
124 Terms.
push_tight(loc, -DeltaPara(alfa,beta),
F[loc].c(alfa) *
F[loc].sign(),
F[lp1].c(beta));
void set_name(const std::string &label_in)
void push_tight(std::size_t loc, Scalar lambda, OperatorType Op1, OperatorType Op2)
void save_label(std::size_t loc, const std::string &label)
void setLocBasis(const std::vector< std::vector< qType > > &q)
void precalc_TwoSiteData(bool FORCE=false)
vector< SpinlessFermionBase< Sym::ZN< Sym::ChargeZ2, 2 > > > F
static void set_operators(const std::vector< SpinlessFermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
SpinlessFermionsZ2 Model.
static const std::map< string, std::any > sweep_defaults
static void add_operators(const std::vector< SpinlessFermionBase< Symmetry_ > > &B, const ParamHandler &P, HamiltonianTermsXd< Symmetry_ > &Terms)
static qarray< 1 > singlet(int N)
static const std::map< string, std::any > defaults
static constexpr MODEL_FAMILY FAMILY
Sym::ZN< Sym::ChargeZ2, 2 > Symmetry
#define MAKE_TYPEDEFS(MODEL)