VMPS++
Loading...
Searching...
No Matches
SpinSiteXxSU2.h
Go to the documentation of this file.
1#ifndef SPINSITEXxSU2_H_
2#define SPINSITEXxSU2_H_
3
5
6#include "DmrgTypedefs.h"
7
8#include "symmetry/S1xS2.h"
9#include "symmetry/SU2.h"
10#include "symmetry/U1.h"
11
13
14template <typename Symmetry, size_t order> class SpinSite;
15
16template <typename OtherSym>
17class SpinSite<Sym::S1xS2<OtherSym, Sym::SU2<Sym::SpinSU2> >, 1ul>
18{
19 typedef double Scalar;
22public:
24 SpinSite(std::size_t D_input);
25
26 OperatorType Id_1s() const {return Id_1s_;}
27
28 OperatorType S_1s() const {return S_1s_;}
29
30 OperatorType Q_1s() const {return Q_1s_;}
31
33protected:
34 std::size_t D;
35
37
38 OperatorType Id_1s_; //identity
41 OperatorType Q_1s_; //quadrupole moment
42};
43
44template<typename OtherSym>
46SpinSite(std::size_t D_input)
47:D(D_input)
48{
49 //create basis for one Spin Site
50 typename Symmetry::qType Q = join(OtherSym::qvacuum(),qarray<1>{static_cast<int>(D)});
51 Eigen::Index inner_dim = 1;
52 std::vector<std::string> ident;
53 ident.push_back("spin");
54
55 basis_1s_.push_back(Q,inner_dim,ident);
56
57 Id_1s_ = OperatorType(Symmetry::qvacuum(),basis_1s_,"id");
58 S_1s_ = OperatorType(join(OtherSym::qvacuum(),qarray<1>{3}),basis_1s_,"S");
59
60 Scalar locS = 0.5*static_cast<double>(D-1);
61 S_1s_( "spin", "spin" ) = std::sqrt(locS*(locS+1.));
62 Sdag_1s_ = S_1s_.adjoint();
63 Q_1s_ = OperatorType::prod(S_1s_,S_1s_,join(OtherSym::qvacuum(),qarray<1>{5}));
65}
66
67#endif //SPINSITESU2xX_H_
Definition: Qbasis.h:39
static SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > prod(const SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > &O1, const SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > &O2, const qType &target)
void setIdentity()
Sym::S1xS2< OtherSym, Sym::SU2< Sym::SpinSU2 > > Symmetry
Definition: SpinSiteXxSU2.h:20
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
Definition: SpinSiteXxSU2.h:21
Qbasis< Symmetry > basis_1s_
Definition: SpinSite.h:63
std::size_t D
Definition: SpinSite.h:54
SpinSite()
Definition: SpinSite.h:24
OperatorType Id_1s_
Definition: SpinSite.h:65
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
Definition: SpinSite.h:19
constexpr qarray< Nq1+Nq2 > join(qarray< Nq1 > rhs, qarray< Nq2 > lhs)
Definition: qarray.h:95
Definition: qarray.h:26