VMPS++
Loading...
Searching...
No Matches
SpinSiteSU2xX.h
Go to the documentation of this file.
1#ifndef SPINSITESU2xX_H_
2#define SPINSITESU2xX_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, size_t order>
17class SpinSite<Sym::S1xS2<Sym::SU2<Sym::SpinSU2>, OtherSym >, order>
18{
19 typedef double Scalar;
20 typedef typename Sym::S1xS2<Sym::SU2<Sym::SpinSU2>, OtherSym > Symmetry;
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, size_t order>
46SpinSite(std::size_t D_input)
47:D(D_input)
48{
49 //create basis for one Spin Site
50 typename Symmetry::qType Q = (order==0)? join(qarray<1>{static_cast<int>(D)},OtherSym::qvacuum()):
51 join(OtherSym::qvacuum(),qarray<1>{static_cast<int>(D)});
52 Eigen::Index inner_dim = 1;
53 std::vector<std::string> ident;
54 ident.push_back("spin");
55
56 basis_1s_.push_back(Q,inner_dim,ident);
57
58 Id_1s_ = OperatorType(Symmetry::qvacuum(),basis_1s_,"id");
59 S_1s_ = (order==0)? OperatorType(join(qarray<1>{3},OtherSym::qvacuum()),basis_1s_,"S"):
60 OperatorType(join(OtherSym::qvacuum(),qarray<1>{3}),basis_1s_,"S");
61
62 Scalar locS = 0.5*static_cast<double>(D-1);
63 S_1s_( "spin", "spin" ) = std::sqrt(locS*(locS+1.));
64 Sdag_1s_ = S_1s_.adjoint();
65 Q_1s_ = (order==0)? OperatorType::prod(S_1s_,S_1s_,join(qarray<1>{5},OtherSym::qvacuum())):
66 OperatorType::prod(S_1s_,S_1s_,join(OtherSym::qvacuum(),qarray<1>{5}));
68}
69
70#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< Sym::SU2< Sym::SpinSU2 >, OtherSym > Symmetry
Definition: SpinSiteSU2xX.h:20
SiteOperatorQ< Symmetry, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > OperatorType
Definition: SpinSiteSU2xX.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