27 #ifndef MAQUIS_DMRG_STATE_MPS_H
28 #define MAQUIS_DMRG_STATE_MPS_H
32 #include <boost/tuple/tuple.hpp>
34 template <
class Matrix,
class SymmGroup>
36 std::vector<
Index<SymmGroup> >
const& phys_dims, std::vector<int>
const& site_type)
38 typedef typename SymmGroup::charge charge;
39 typedef boost::tuple<charge, size_t> local_state;
44 curr_i.insert(std::make_pair(SymmGroup::IdentityCharge, 1));
46 for (
int i=0; i<state.size(); ++i)
48 charge newc =
SymmGroup::fuse(curr_i[0].first, boost::get<0>(state[i]));
51 new_i.
insert(std::make_pair(newc, news));
54 size_t b_in = left(boost::get<0>(state[i]), curr_i[0].first) + boost::get<1>(state[i]) * curr_i[0].second + curr_b;
59 Matrix & m = block(
SymmGroup::fuse(curr_i[0].first, boost::get<0>(state[i])), new_i[0].first);
MPS< Matrix, SymmGroup > state_mps(std::vector< boost::tuple< typename SymmGroup::charge, size_t > > const &state, std::vector< Index< SymmGroup > > const &phys_dims, std::vector< int > const &site_type)
void make_left_paired() const
declaration of the MPS class (vector of MPSTensor)
std::size_t insert(std::pair< charge, std::size_t > const &x)
T fuse(const A &ind, T d)
Fuse indices n[i] into one p = n[i] d^i.