27 #ifndef SPECIAL_MPOS_H
28 #define SPECIAL_MPOS_H
32 template<
class Matrix,
class SymmGroup>
36 for (std::size_t k = 0; k < phys_i.
size(); ++k)
37 ret.
insert_block(Matrix(phys_i[k].second, phys_i[k].second),
38 phys_i[k].first, phys_i[k].first);
43 template<
class Matrix,
class SymmGroup>
49 mpo(0,0) = make_mpo_identity_block<Matrix>(phys_i);
52 mpo(0, 0, *up, *up) = 1;
57 template<
class Matrix>
63 mpo(0,0) = make_mpo_identity_block<Matrix>(phys_i);
67 mpo(0, 0, *up, *up) = s;
72 template<
class Matrix>
84 bulk(0, 0) = make_mpo_identity_block<Matrix>(phys_i);
85 bulk(1, 1) = make_mpo_identity_block<Matrix>(phys_i);
86 bulk(3, 3) = make_mpo_identity_block<Matrix>(phys_i);
87 bulk(0, 1) = make_mpo_identity_block<Matrix>(phys_i);
88 bulk(0, 2) = make_mpo_identity_block<Matrix>(phys_i);
89 bulk(2, 3) = make_mpo_identity_block<Matrix>(phys_i);
91 left(0, 0) = make_mpo_identity_block<Matrix>(phys_i);
92 left(0, 1) = make_mpo_identity_block<Matrix>(phys_i);
93 left(0, 2) = make_mpo_identity_block<Matrix>(phys_i);
95 right(0, 0) = make_mpo_identity_block<Matrix>(phys_i);
96 right(1, 0) = make_mpo_identity_block<Matrix>(phys_i);
97 right(2, 0) = make_mpo_identity_block<Matrix>(phys_i);
98 right(3, 0) = make_mpo_identity_block<Matrix>(phys_i);
100 #define NGI(v) std::make_pair(TrivialGroup::Plus, v)
102 for (
int k = 0; k < 2; ++k) {
103 bulk(0, 0,
NGI(k),
NGI(k)) = 1;
104 bulk(1, 1,
NGI(k),
NGI(k)) = 1;
105 bulk(3, 3,
NGI(k),
NGI(k)) = 1;
110 bulk(0, 1,
NGI(0),
NGI(0)) = h;
111 bulk(0, 1,
NGI(1),
NGI(1)) = -h;
113 bulk(0, 2,
NGI(0),
NGI(1)) = J;
114 bulk(0, 2,
NGI(1),
NGI(0)) = J;
116 bulk(2, 3,
NGI(0),
NGI(1)) = 1;
117 bulk(2, 3,
NGI(1),
NGI(0)) = 1;
119 left(0, 0,
NGI(0),
NGI(0)) = 1;
120 left(0, 0,
NGI(1),
NGI(1)) = 1;
121 left(0, 1,
NGI(0),
NGI(0)) = h;
122 left(0, 1,
NGI(1),
NGI(1)) = -h;
123 left(0, 2,
NGI(0),
NGI(1)) = J;
124 left(0, 2,
NGI(1),
NGI(0)) = J;
126 right(0, 0,
NGI(0),
NGI(0)) = h;
127 right(0, 0,
NGI(1),
NGI(1)) = -h;
128 right(2, 0,
NGI(0),
NGI(1)) = 1;
129 right(2, 0,
NGI(1),
NGI(0)) = 1;
130 for (
int k = 0; k < 2; ++k) {
131 right(1, 0,
NGI(k),
NGI(k)) = 1;
132 right(3, 0,
NGI(k),
NGI(k)) = 1;
143 template<
class Matrix>
147 phys.
insert(std::make_pair(1, 1));
148 phys.
insert(std::make_pair(-1, 1));
152 ident.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, 1), -1, -1));
153 ident.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, 1), 1, 1));
155 splus.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, 1), -1, 1));
157 sminus.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, 1), 1, -1));
159 sz.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, 0.5), 1, 1));
160 sz.
insert_block(boost::tuples::make_tuple(Matrix(1, 1, -0.5), -1, -1));
164 bulk(0,1) = Jxy/2*splus;
166 bulk(0,2) = Jxy/2*sminus;
174 left(0,1) = Jxy/2*splus;
175 left(0,2) = Jxy/2*sminus;
MPOTensor< Matrix, SymmGroup > identity_mpo(Index< SymmGroup > phys_i)
basis_iterator basis_begin() const
size_type insert_block(Matrix const &, charge, charge)
definition of MPO class (vector of MPOTensor)
MPOTensor< Matrix, TrivialGroup > s12_sz_mpo(Index< TrivialGroup > phys_i)
MPO< Matrix, TrivialGroup > s12_ising(std::size_t L, double J, double h)
std::size_t insert(std::pair< charge, std::size_t > const &x)
block_matrix< Matrix, SymmGroup > make_mpo_identity_block(Index< SymmGroup > phys_i)
MPO< Matrix, U1 > s12_heisenberg(std::size_t L, double Jxy, double Jz)