VMPS++
Loading...
Searching...
No Matches
HeisenbergXXZ.h
Go to the documentation of this file.
1#ifndef VANILLA_HEISENBERGXXZ
2#define VANILLA_HEISENBERGXXZ
3
4#include "models/HeisenbergU1XXZ.h"
5#include "models/Heisenberg.h" // for defaults etc.
6
7namespace VMPS
8{
9
10class HeisenbergXXZ : public Mpo<Sym::U0,double>, public HeisenbergObservables<Sym::U0>, public ParamReturner
11{
12public:
15
16 static qarray<0> singlet(int N=0) {return qarray<0>{};};
17 static constexpr MODEL_FAMILY FAMILY = HEISENBERG;
18
19private:
20
21 typedef typename Symmetry::qType qType;
22
23public:
24
27 HeisenbergXXZ (const size_t &L, const vector<Param> &params, const BC &boundary=BC::OPEN, const DMRG::VERBOSITY::OPTION &VERB=DMRG::VERBOSITY::OPTION::ON_EXIT);
29
30 static const std::map<string,std::any> defaults;
31};
32
33const std::map<string,std::any> HeisenbergXXZ::defaults =
34{
35 {"Jxy",1.}, {"Jxyprime",0.}, {"Jxyrung",1.},
36 {"Jz",0.}, {"Jzprime",0.}, {"Jzrung",0.},
37
38 {"Bz",0.}, {"Bx",0.},
39 {"Kz",0.}, {"Kx",0.},
40 {"Dy",0.}, {"Dyprime",0.}, {"Dyrung",0.},
41 {"D",2ul}, {"maxPower",2ul}, {"CYLINDER",false}, {"Ly",1ul},
42
43 // for consistency during inheritance (should not be set!):
44 {"J",0.}, {"Jprime",0.}
45};
46
48HeisenbergXXZ (const size_t &L, const vector<Param> &params, const BC &boundary, const DMRG::VERBOSITY::OPTION &VERB)
49:Mpo<Symmetry> (L, qarray<0>({}), "", PROP::HERMITIAN, PROP::NON_UNITARY, boundary, VERB),
52{
53 ParamHandler P(params,HeisenbergXXZ::defaults);
54 size_t Lcell = P.size();
55
56 for (size_t l=0; l<N_sites; ++l)
57 {
58 N_phys += P.get<size_t>("Ly",l%Lcell);
59 setLocBasis(B[l].get_basis().qloc(),l);
60 }
61
62 if (P.HAS_ANY_OF({"Jxy", "Jxypara", "Jxyperp", "Jxyfull"}))
63 {
64 this->set_name("XXZ");
65 }
66 else
67 {
68 this->set_name("Ising");
69 }
70
72 std::vector<std::vector<std::string>> labellist;
73
74 HeisenbergU1::set_operators(B,P,pushlist,labellist,boundary);
75 Heisenberg::add_operators(B,P,pushlist,labellist,boundary);
76 HeisenbergU1XXZ::add_operators(B,P,pushlist,labellist,boundary);
77
78 this->construct_from_pushlist(pushlist, labellist, Lcell);
79 this->finalize(PROP::COMPRESS, P.get<size_t>("maxPower"));
80
81 this->precalc_TwoSiteData();
82}
83
84} // end namespace VMPS
85
86#endif
MODEL_FAMILY
Definition: DmrgTypedefs.h:96
@ HEISENBERG
Definition: DmrgTypedefs.h:96
BC
Definition: DmrgTypedefs.h:161
@ B
Definition: DmrgTypedefs.h:130
DMRG::VERBOSITY::OPTION VERB
Definition: MpoTerms.h:102
Definition: Mpo.h:40
Definition: U0.h:28
static void add_operators(const std::vector< SpinBase< Symmetry_ > > &B, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
static void set_operators(const std::vector< SpinBase< Symmetry_ > > &B, const ParamHandler &P, PushType< SiteOperator< Symmetry_, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
Definition: HeisenbergU1.h:180
static constexpr MODEL_FAMILY FAMILY
Definition: HeisenbergXXZ.h:17
Symmetry::qType qType
Definition: HeisenbergXXZ.h:21
static const std::map< string, std::any > defaults
Definition: HeisenbergXXZ.h:30
static qarray< 0 > singlet(int N=0)
Definition: HeisenbergXXZ.h:16
Heisenberg Model.
Definition: Heisenberg.h:34
static const std::map< string, std::any > sweep_defaults
Definition: Heisenberg.h:72
static void add_operators(const std::vector< SpinBase< Symmetry > > &B, const ParamHandler &P, PushType< SiteOperator< Symmetry, double >, double > &pushlist, std::vector< std::vector< std::string > > &labellist, const BC boundary=BC::OPEN)
Definition: Heisenberg.h:149
#define MAKE_TYPEDEFS(MODEL)
Definition: macros.h:4
const bool COMPRESS
Definition: DmrgTypedefs.h:499
const bool NON_UNITARY
Definition: DmrgTypedefs.h:495
const bool HERMITIAN
Definition: DmrgTypedefs.h:492
void finalize(bool PRINT_STATS=false)
Definition: functions.h:127
Definition: qarray.h:26