1#ifndef HUBBARDMODELU1XSU2CHARGE_H_
2#define HUBBARDMODELU1XSU2CHARGE_H_
10#include "Geometry2D.h"
15 public HubbardObservables<Sym::S1xS2<Sym::U1<Sym::SpinU1>,Sym::SU2<Sym::ChargeSU2> >,complex<double> >,
22 typedef Eigen::Matrix<complex<
double>,Eigen::Dynamic,Eigen::Dynamic>
MatrixType;
41 size_t Lcell =
P.size();
43 for (
size_t l=0; l<
N_sites; ++l)
N_phys +=
P.get<
size_t>(
"Ly",l%Lcell);
44 this->
calc(P.get<
size_t>(
"maxPower"));
53 template<
typename Symmetry_>
55 PushType<
SiteOperator<Symmetry_,complex<double>>,complex<double>>& pushlist, std::vector<std::vector<std::string>>& labellist,
56 const BC boundary=BC::OPEN);
70 {
"t",1.+0.i}, {
"tPrime",0.i}, {
"tRung",1.+0.i}, {
"tPrimePrime",0.i},
73 {
"V",0.}, {
"Vrung",0.},
74 {
"Jz",0.}, {
"Jzrung",0.}, {
"Jxy",0.}, {
"Jxyrung",0.},
75 {
"J",0.}, {
"Jperp",0.},
77 {
"X",0.}, {
"Xrung",0.},
78 {
"REMOVE_DOUBLE",
false}, {
"REMOVE_EMPTY",
false}, {
"REMOVE_UP",
false}, {
"REMOVE_DN",
false}, {
"mfactor",1}, {
"k",0},
79 {
"maxPower",2ul}, {
"CYLINDER",
false}, {
"Ly",1ul}
84 {
"max_alpha",100.}, {
"min_alpha",1.}, {
"lim_alpha",11ul}, {
"eps_svd",1e-7},
85 {
"Dincr_abs", 4ul}, {
"Dincr_per", 2ul}, {
"Dincr_rel", 1.1},
86 {
"min_Nsv",0ul}, {
"max_Nrich",-1},
87 {
"max_halfsweeps",24ul}, {
"min_halfsweeps",6ul},
88 {
"Minit",1ul}, {
"Qinit",1ul}, {
"Mlimit",500ul},
89 {
"tol_eigval",1e-7}, {
"tol_state",1e-6},
99 ParamHandler P(params,defaults);
100 size_t Lcell = P.size();
102 for (
size_t l=0; l<N_sites; ++l)
104 N_phys += P.get<
size_t>(
"Ly",l%Lcell);
105 setLocBasis(F[l].get_basis().qloc(),l);
108 param1d U = P.fill_array1d<
double>(
"U",
"Uorb", F[0].orbitals(), 0);
109 if (isfinite(U.a.sum()))
111 this->set_name(
"Hubbard");
115 this->set_name(
"U=∞-Hubbard");
119 std::vector<std::vector<std::string>> labellist;
122 this->construct_from_pushlist(pushlist, labellist, Lcell);
125 this->precalc_TwoSiteData();
128template<
typename Symmetry_>
132 std::size_t Lcell =
P.size();
136 for (std::size_t loc=0; loc<
N_sites; ++loc)
142 std::size_t orbitals =
F[loc].orbitals();
143 std::size_t next_orbitals =
F[lp1].orbitals();
144 std::size_t nextn_orbitals =
F[lp2].orbitals();
145 std::size_t nnextn_orbitals =
F[lp3].orbitals();
148 ss <<
"Ly=" <<
P.get<
size_t>(
"Ly",loc%Lcell);
149 labellist[loc].push_back(ss.str());
151 auto push_full = [&
N_sites, &loc, &
F, &
P, &pushlist, &labellist, &boundary] (
string xxxFull,
string label,
152 const vector<SiteOperatorQ<Symmetry_,MatrixType>> &first,
153 const vector<vector<SiteOperatorQ<Symmetry_,MatrixType>>> &last,
154 vector<complex<double>> factor,
156 bool FERMIONIC) ->
void
158 ArrayXXcd Full =
P.get<Eigen::ArrayXXcd>(xxxFull);
159 vector<vector<std::pair<size_t,complex<double>> > > R = Geometry2D::rangeFormat(Full);
161 if (
static_cast<bool>(boundary)) {assert(R.size() ==
N_sites and
"Use an (N_sites)x(N_sites) hopping matrix for open BC!");}
162 else {assert(R.size() >= 2*
N_sites and
"Use at least a (2*N_sites)x(N_sites) hopping matrix for infinite BC!");}
164 for (
size_t j=0; j<first.size(); j++)
165 for (
size_t h=0; h<R[loc].size(); ++h)
167 size_t range = R[loc][h].first;
168 complex<double> value = R[loc][h].second;
172 vector<SiteOperatorQ<Symmetry_,MatrixType> > ops(range+1);
174 for (
size_t i=1; i<range; ++i)
176 if (FERMIONIC) {ops[i] =
F[(loc+i)%
N_sites].sign().template cast<complex<double>>();}
177 else {ops[i] =
F[(loc+i)%
N_sites].
Id().template cast<complex<double>>();}
179 ops[range] = last[j][(loc+range)%
N_sites];
180 complex<double> total_value = factor[j] * value;
181 if (CONJ[j]) total_value = conj(total_value);
182 pushlist.push_back(std::make_tuple(loc, ops, total_value));
187 ss <<
label <<
"(" << Geometry2D::hoppingInfo(Full) <<
")";
188 labellist[loc].push_back(ss.str());
194 vector<SiteOperatorQ<Symmetry_,MatrixType> > cup_ranges(
N_sites);
196 vector<SiteOperatorQ<Symmetry_,MatrixType> > cdn_ranges(
N_sites);
197 for (
size_t i=0; i<
N_sites; i++)
200 cup_ranges[i] =
F[i].c(
UP,
G[i],0).template cast<complex<double> >();
202 for (
size_t i=0; i<
N_sites; i++)
205 cdn_ranges[i] =
F[i].c(
DN,
G[i],0).template cast<complex<double> >();
208 vector<SiteOperatorQ<Symmetry_,MatrixType> > frst {cdagup_sign_local, cdagdn_sign_local};
209 vector<vector<SiteOperatorQ<Symmetry_,MatrixType> > > last {cup_ranges, cdn_ranges};
210 push_full(
"tFull",
"tᵢⱼ", frst, last, {-std::sqrt(2.),-std::sqrt(2.)}, {
false,
false},
PROP::FERMIONIC);
214 vector<SiteOperatorQ<Symmetry_,MatrixType> > first {
F[loc].Sp(0).template cast<complex<double>>(),
215 F[loc].
Sm(0).template cast<complex<double>>(),
216 F[loc].
Sz(0).template cast<complex<double>>()};
217 vector<SiteOperatorQ<Symmetry_,MatrixType> > Sp_ranges(
N_sites);
218 vector<SiteOperatorQ<Symmetry_,MatrixType> > Sm_ranges(
N_sites);
219 vector<SiteOperatorQ<Symmetry_,MatrixType> > Sz_ranges(
N_sites);
220 for (
size_t i=0; i<
N_sites; i++)
222 Sp_ranges[i] =
F[i].Sp(0).template cast<complex<double>>();;
223 Sm_ranges[i] =
F[i].Sm(0).template cast<complex<double>>();;
224 Sz_ranges[i] =
F[i].Sz(0).template cast<complex<double>>();;
227 vector<vector<SiteOperatorQ<Symmetry_,MatrixType> > > last {Sm_ranges, Sp_ranges, Sz_ranges};
228 push_full(
"Jfull",
"Jᵢⱼ", first, last, {0.5,0.5,1.}, {
false,
false,
false},
PROP::BOSONIC);
232 param1d Uph =
P.fill_array1d<
double>(
"Uph",
"Uphorb", orbitals, loc%Lcell);
233 param1d V =
P.fill_array1d<
double>(
"V",
"Vorb", orbitals, loc%Lcell);
236 param2d tPerp =
P.fill_array2d<complex<double> >(
"tRung",
"t",
"tPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
237 param2d Jxyperp =
P.fill_array2d<
double>(
"JxyRung",
"Jxy",
"JxyPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
238 param2d Jzperp =
P.fill_array2d<
double>(
"JzRung",
"Jz",
"JzPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
239 param2d Jperp =
P.fill_array2d<
double>(
"JRung",
"J",
"JPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
240 param1d Bz =
P.fill_array1d<
double>(
"Bz",
"Bzorb", orbitals, loc%Lcell);
241 param2d Vperp =
P.fill_array2d<
double>(
"Vrung",
"V",
"Vperp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
243 labellist[loc].push_back(Uph.label);
246 labellist[loc].push_back(tPerp.label);
247 labellist[loc].push_back(Jxyperp.label);
248 labellist[loc].push_back(Jzperp.label);
249 labellist[loc].push_back(Jperp.label);
250 labellist[loc].push_back(Bz.label);
251 labellist[loc].push_back(Vperp.label);
255 F[loc].
template HubbardHamiltonian<complex<double>,Symmetry_>(
256 Uph.a.cast<complex<double>>(),
257 tPerp.a.cast<complex<double>>(),
258 Vperp.a.cast<complex<double>>(),
259 Jzperp.a.cast<complex<double>>(),
260 Jxyperp.a.cast<complex<double>>(),
261 Bz.a.cast<complex<double>>())
263 pushlist.push_back(std::make_tuple(loc, Hloc, 1.+0.i));
std::enable_if< Dummy::IS_SPIN_SU2() and!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > >, complex< double > > >::type P(size_t locx1, size_t locx2, size_t locy1=0, size_t locy2=0) const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > >, complex< double > > >::type Sz(size_t locx, size_t locy=0) const
Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > >, complex< double > > Id() const
std::enable_if<!Dummy::IS_SPIN_SU2(), Mpo< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > >, complex< double > > >::type Sm(size_t locx, size_t locy=0) const
vector< FermionBase< Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > > > > F
DMRG::VERBOSITY::OPTION VERB
MpoTerms< Symmetry, OtherScalar > cast()
void calc(const std::size_t power)
static std::vector< T > get_N_site_interaction(T const &Op0, Operator const &... Ops)
void precalc_TwoSiteData(bool FORCE=false)
static const map< string, any > defaults
PeierlsHubbardU1xSU2(Mpo< Symmetry, complex< double > > &Mpo_input, const vector< Param > ¶ms)
static constexpr MODEL_FAMILY FAMILY
static constexpr int spinfac
static void set_operators(const std::vector< FermionBase< Symmetry_ > > &F, const vector< SUB_LATTICE > &G, const ParamHandler &P, PushType< SiteOperator< Symmetry_, complex< double > >, complex< double > > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
Sym::S1xS2< Sym::U1< Sym::SpinU1 >, Sym::SU2< Sym::ChargeSU2 > > Symmetry
static qarray< 2 > singlet(int N=0, int L=0)
Eigen::Matrix< complex< double >, Eigen::Dynamic, Eigen::Dynamic > MatrixType
static const map< string, any > sweep_defaults
#define MAKE_TYPEDEFS(MODEL)
void finalize(bool PRINT_STATS=false)