1#ifndef HUBBARDMODELSU2XU1_H_COMPLEX
2#define HUBBARDMODELSU2XU1_H_COMPLEX
15#include "Geometry2D.h"
20 public HubbardObservables<Sym::S1xS2<Sym::SU2<Sym::SpinSU2>,Sym::U1<Sym::ChargeU1> >,complex<double>>,
27 typedef Eigen::Matrix<complex<
double>,Eigen::Dynamic,Eigen::Dynamic>
MatrixType;
45 size_t Lcell =
P.size();
47 for (
size_t l=0; l<
N_sites; ++l)
N_phys +=
P.get<
size_t>(
"Ly",l%Lcell);
64 template<
typename Symmetry_>
66 PushType<
SiteOperator<Symmetry_,complex<double>>,complex<double>>& pushlist, std::vector<std::vector<std::string>>& labellist,
67 const BC boundary=BC::OPEN);
81 {
"t",1.+0.i}, {
"tPrime",0.i}, {
"tRung",1.+0.i}, {
"tPrimePrime",0.i},
84 {
"V",0.}, {
"Vext",0.}, {
"Vrung",0.},
85 {
"Vz",0.}, {
"Vzrung",0.}, {
"Vxy",0.}, {
"Vxyrung",0.},
86 {
"J",0.}, {
"Jperp",0.},
87 {
"X",0.}, {
"Xrung",0.},
88 {
"REMOVE_DOUBLE",
false}, {
"REMOVE_EMPTY",
false}, {
"REMOVE_UP",
false}, {
"REMOVE_DN",
false}, {
"mfactor",1}, {
"k",0},
89 {
"maxPower",2ul}, {
"CYLINDER",
false}, {
"Ly",1ul}
94 {
"max_alpha",100.}, {
"min_alpha",1.}, {
"lim_alpha",11ul}, {
"eps_svd",1e-7},
95 {
"Mincr_abs", 50ul}, {
"Mincr_per", 2ul}, {
"Mincr_rel", 1.1},
96 {
"min_Nsv",0ul}, {
"max_Nrich",-1},
97 {
"max_halfsweeps",24ul}, {
"min_halfsweeps",1ul},
98 {
"Minit",2ul}, {
"Qinit",2ul}, {
"Mlimit",1000ul},
99 {
"tol_eigval",1e-7}, {
"tol_state",1e-6},
109 ParamHandler P(params,defaults);
110 size_t Lcell = P.size();
112 for (
size_t l=0; l<N_sites; ++l)
114 N_phys += P.get<
size_t>(
"Ly",l%Lcell);
115 setLocBasis(F[l].get_basis().qloc(),l);
118 this->set_name(
"Peierls-Hubbard");
121 std::vector<std::vector<std::string>> labellist;
122 set_operators(F, P, pushlist, labellist, boundary);
124 this->construct_from_pushlist(pushlist, labellist, Lcell);
127 this->precalc_TwoSiteData();
130template<
typename Symmetry_>
134 std::size_t Lcell =
P.size();
138 for (std::size_t loc=0; loc<
N_sites; ++loc)
144 std::size_t orbitals =
F[loc].orbitals();
145 std::size_t next_orbitals =
F[lp1].orbitals();
146 std::size_t nextn_orbitals =
F[lp2].orbitals();
147 std::size_t nnextn_orbitals =
F[lp3].orbitals();
150 ss <<
"Ly=" <<
P.get<
size_t>(
"Ly",loc%Lcell);
151 labellist[loc].push_back(ss.str());
153 auto push_full = [&
N_sites, &loc, &
F, &
P, &pushlist, &labellist, &boundary] (
string xxxFull,
string label,
154 const vector<SiteOperatorQ<Symmetry_,MatrixType>> &first,
155 const vector<vector<SiteOperatorQ<Symmetry_,MatrixType>>> &last,
156 vector<complex<double>> factor,
158 bool FERMIONIC) ->
void
160 ArrayXXcd Full =
P.get<Eigen::ArrayXXcd>(xxxFull);
161 vector<vector<std::pair<size_t,complex<double>> > > R = Geometry2D::rangeFormat(Full);
163 if (
static_cast<bool>(boundary)) {assert(R.size() ==
N_sites and
"Use an (N_sites)x(N_sites) hopping matrix for open BC!");}
164 else {assert(R.size() >= 2*
N_sites and
"Use at least a (2*N_sites)x(N_sites) hopping matrix for infinite BC!");}
166 for (
size_t j=0; j<first.size(); j++)
167 for (
size_t h=0; h<R[loc].size(); ++h)
169 size_t range = R[loc][h].first;
170 complex<double> value = R[loc][h].second;
174 vector<SiteOperatorQ<Symmetry_,MatrixType> > ops(range+1);
176 for (
size_t i=1; i<range; ++i)
178 if (FERMIONIC) {ops[i] =
F[(loc+i)%
N_sites].sign().template cast<complex<double>>();}
179 else {ops[i] =
F[(loc+i)%
N_sites].
Id().template cast<complex<double>>();}
181 ops[range] = last[j][(loc+range)%
N_sites];
182 complex<double> total_value = factor[j] * value;
183 if (CONJ[j]) total_value = conj(total_value);
184 pushlist.push_back(std::make_tuple(loc, ops, total_value));
189 ss <<
label <<
"(" << Geometry2D::hoppingInfo(Full) <<
")";
190 labellist[loc].push_back(ss.str());
197 vector<SiteOperatorQ<Symmetry_,MatrixType> > c_ranges(
N_sites);
198 for (
size_t i=0; i<
N_sites; i++) {c_ranges[i] =
F[i].c(0).template cast<complex<double>>();}
199 vector<SiteOperatorQ<Symmetry_,MatrixType> > cdag_ranges(
N_sites);
200 for (
size_t i=0; i<
N_sites; i++) {cdag_ranges[i] =
F[i].cdag(0).template cast<complex<double>>();}
202 vector<SiteOperatorQ<Symmetry_,MatrixType> > first {cdag_sign_local,c_sign_local};
203 vector<vector<SiteOperatorQ<Symmetry_,MatrixType> > > last {c_ranges,cdag_ranges};
204 push_full(
"tFull",
"tᵢⱼ", first, last, {-std::sqrt(2.), -std::sqrt(2.)}, {
false,
true},
PROP::FERMIONIC);
208 vector<SiteOperatorQ<Symmetry_,MatrixType> > first {
F[loc].Tz(0).template cast<complex<double>>()};
209 vector<SiteOperatorQ<Symmetry_,MatrixType> > Tz_ranges(
N_sites);
for (
size_t i=0; i<
N_sites; i++) {Tz_ranges[i] =
F[i].Tz(0).template cast<complex<double>>();}
210 vector<vector<SiteOperatorQ<Symmetry_,MatrixType> > > last {Tz_ranges};
211 push_full(
"Vzfull",
"Vzᵢⱼ", first, last, {1.}, {
false},
PROP::BOSONIC);
259 param1d U =
P.fill_array1d<
double>(
"U",
"Uorb", orbitals, loc%Lcell);
260 param1d Uph =
P.fill_array1d<
double>(
"Uph",
"Uphorb", orbitals, loc%Lcell);
261 param1d t0 =
P.fill_array1d<
double>(
"t0",
"t0orb", orbitals, loc%Lcell);
262 param1d mu =
P.fill_array1d<
double>(
"mu",
"muorb", orbitals, loc%Lcell);
263 param2d tperp =
P.fill_array2d<complex<double>>(
"tRung",
"t",
"tPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
264 param2d Vperp =
P.fill_array2d<
double>(
"VRung",
"V",
"VPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
265 param2d Vzperp =
P.fill_array2d<
double>(
"VzRung",
"Vz",
"VzPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
266 param2d Vxyperp =
P.fill_array2d<
double>(
"VxyRung",
"Vxy",
"VxyPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
267 param2d Jperp =
P.fill_array2d<
double>(
"JRung",
"J",
"JPerp", orbitals, loc%Lcell,
P.get<
bool>(
"CYLINDER"));
269 labellist[loc].push_back(U.label);
270 labellist[loc].push_back(Uph.label);
271 labellist[loc].push_back(t0.label);
272 labellist[loc].push_back(mu.label);
273 labellist[loc].push_back(tperp.label);
274 labellist[loc].push_back(Vperp.label);
275 labellist[loc].push_back(Vzperp.label);
276 labellist[loc].push_back(Vxyperp.label);
277 labellist[loc].push_back(Jperp.label);
281 F[loc].
template HubbardHamiltonian<complex<double>,Symmetry_>(U.a.cast<complex<double>>(),
282 Uph.a.cast<complex<double>>(),
283 (t0.a-mu.a).cast<complex<double>>(),
285 Vperp.a.cast<complex<double>>(),
286 Vzperp.a.cast<complex<double>>(),
287 Vxyperp.a.cast<complex<double>>(),
288 Jperp.a.cast<complex<double>>())
290 pushlist.push_back(std::make_tuple(loc, Hloc, 1.+0.i));
293 if (!
P.HAS(
"tFull") and !
P.HAS(
"Vzfull") and !
P.HAS(
"Vxyfull") and !
P.HAS(
"Jfull") and !
P.HAS(
"Xfull"))
295 param2d tpara =
P.fill_array2d<complex<double>>(
"t",
"tPara", {orbitals, next_orbitals}, loc%Lcell);
296 param2d Vpara =
P.fill_array2d<
double>(
"V",
"Vpara", {orbitals, next_orbitals}, loc%Lcell);
302 labellist[loc].push_back(tpara.label);
303 labellist[loc].push_back(Vpara.label);
309 if (loc <
N_sites-1 or !
static_cast<bool>(boundary))
311 for (std::size_t alfa=0; alfa<orbitals; ++alfa)
312 for (std::size_t beta=0; beta<next_orbitals; ++beta)
347 pushlist.push_back(std::make_tuple(loc,
349 pushlist.push_back(std::make_tuple(loc,
353 pushlist.push_back(std::make_tuple(loc,
Mpo<Symmetry_,complex<double>>
::get_N_site_interaction(n_local, n_tight), complex<double>(Vpara(alfa,beta),0.)));
std::enable_if< Dummy::IS_SPIN_SU2() and!Dummy::IS_CHARGE_SU2(), Mpo< Sym::S1xS2< Sym::SU2< Sym::SpinSU2 >, Sym::U1< Sym::ChargeU1 > >, complex< double > > >::type P(size_t locx1, size_t locx2, size_t locy1=0, size_t locy2=0) const
Mpo< Sym::S1xS2< Sym::SU2< Sym::SpinSU2 >, Sym::U1< Sym::ChargeU1 > >, complex< double > > Id() const
vector< FermionBase< Sym::S1xS2< Sym::SU2< Sym::SpinSU2 >, Sym::U1< Sym::ChargeU1 > > > > F
DMRG::VERBOSITY::OPTION VERB
MpoTerms< Symmetry, OtherScalar > cast()
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
Eigen::Matrix< complex< double >, Eigen::Dynamic, Eigen::Dynamic > MatrixType
static qarray< 2 > singlet(int N=0)
static void set_operators(const std::vector< FermionBase< Symmetry_ > > &F, const ParamHandler &P, PushType< SiteOperator< Symmetry_, complex< double > >, complex< double > > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static constexpr MODEL_FAMILY FAMILY
Sym::S1xS2< Sym::SU2< Sym::SpinSU2 >, Sym::U1< Sym::ChargeU1 > > Symmetry
PeierlsHubbardSU2xU1(Mpo< Symmetry, complex< double > > &Mpo_input, const vector< Param > ¶ms)
static const map< string, any > sweep_defaults
static constexpr int spinfac
#define MAKE_TYPEDEFS(MODEL)