std::pair< std::vector< SDef >, SDef > syten::MPS::local_expectation | ( | Lattice const & | lat, |
State const & | a, | ||
State const & | b, | ||
std::string const & | id, | ||
bool const | cache, | ||
bool const | no_normalise | ||
) |
Computes the expectation value on each site for id
.
References std::vector< T >::back(), syten::MPS::Operator::dIdx, syten::genSplit(), syten::MPS::Operator::lIdx, syten::MPS::State::lIdx, syten::MPS::State::maybeCache(), std::vector< T >::push_back(), syten::MPS::Operator::rIdx, syten::MPS::State::rIdx, syten::MPS::State::size(), SYTEN_ASSERT, syten::MPS::Operator::uIdx, and syten::MPS::State::uIdx.
Referenced by syten::Pyten::init_mp_proj_pur(), and local_expectation().