113 typedef typename SymmGroup::subcharge subcharge;
114 typedef std::map<std::string, typename Matrix::value_type> result_type;
122 for (
typename std::vector<bond_element>::const_iterator it = mpo_terms.begin(); it != mpo_terms.end(); ++it) {
123 typedef std::map<std::string, MPO<Matrix, SymmGroup> > mpo_map;
127 for (
typename mpo_map::const_iterator mit = mpos.begin(); mit != mpos.end(); ++mit) {
128 typename result_type::iterator match = res.find(mit->first);
129 if (match == res.end())
130 boost::tie(match, boost::tuples::ignore) = res.insert( std::make_pair(mit->first, 0.) );
133 match->second +=
expval(mps, mit->second);
139 match->second += val/nn;
147 for (
typename result_type::const_iterator it = res.begin(); it != res.end(); ++it) {
148 this->
labels.push_back(it->first);
std::vector< std::string > labels
double expval(MPS< Matrix, SymmGroup > const &mps, MPO< Matrix, SymmGroup > const &mpo, int d)
std::map< std::string, MPO< Matrix, SymmGroup > > local(const Lattice &lat, std::vector< block_matrix< Matrix, SymmGroup > > const &identities, std::vector< block_matrix< Matrix, SymmGroup > > const &fillings, std::vector< std::pair< std::vector< block_matrix< Matrix, SymmGroup > >, bool > > const &ops)
std::vector< typename MPS< Matrix, SymmGroup >::scalar_type > vector_results
MPS< Matrix, SymmGroup >::scalar_type overlap(MPS< Matrix, SymmGroup > const &mps1, MPS< Matrix, SymmGroup > const &mps2)
MPSTensor< Matrix, SymmGroup >::scalar_type scalar_type
MPS< Matrix, SymmGroup > mpo_to_smps(MPO< Matrix, SymmGroup > const &mpo, Index< SymmGroup > const &phys_i)
Index< SymmGroup > phys_psi
MPS< Matrix, SymmGroup >::scalar_type dm_trace(MPS< Matrix, SymmGroup > const &mps, Index< SymmGroup > const &phys_psi)