void syten::MPS::State::dropUnmatched | ( | Index const | site, |
bool const | left = true , |
||
bool const | right = true |
||
) |
Removes blocks on the specified site without corresponding partners on neighbouring sites.
The MPS is given as the contraction over all sites. As such, blocks without equally-transforming blocks on neighbouring sites can be safely discarded. As sometimes we want to keep such blocks, the boolean parameters allow to disable comparison with the left and right tensors by setting those to false.
Edge tensors on the first and last site are always at most compared to one neighbour.
site | location of tensor to modify. |
left | if true, compare to tensor on left (site-1). |
right | if true, compare to tensor on right (site+1). |
References syten::BasisMap::hasSymmetry(), lIdx, std::move(), rIdx, size(), and SYTEN_ASSERT_DEBUG.
Referenced by syten::MPS::apply_op_itrunc(), syten::MPS::apply_op_naive(), dropUnmatched(), syten::MPS::TDVP::Worker::expand_to_left(), syten::MPS::expand_to_left(), syten::MPS::TDVP::Worker::expand_to_right(), syten::MPS::expand_to_right(), syten::Pyten::init_mps(), leftnorm(), syten::MPS::TEBD::TpsWrapper::leftnorm_w_lambda(), syten::MPS::TDVP::Worker::locally_expand_bond(), syten::MPS::TDVP::Worker::normL(), syten::MPS::TDVP::Worker::normR(), operator*=(), rightnorm(), syten::MPS::TDVP::Worker::sync(), truncate(), syten::MPS::DMRG::Worker::Worker(), and syten::MPS::TDVP::Worker::Worker().