#include "dmrg/mp_tensors/mps.h"
#include <boost/tuple/tuple.hpp>
Go to the source code of this file.
|
template<class Matrix , class SymmGroup > |
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) |
|
template<class Matrix , class SymmGroup >
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 |
|
) |
| |
Definition at line 35 of file state_mps.h.
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);
void make_left_paired() const
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.