void syten::MPS::switch_sites | ( | MPS::Operator & | op, |
Index const | sa, | ||
Index const | sb, | ||
std::vector< Pair< Index, Index > > const & | fermions | ||
) |
Given an MPO op
, switches neighbouring sites sa
and sb
with fermionic sectors as specified by fermions
where sa+1 == sb
.
[in,out] | op | in- and output MPO reference |
[in] | sa | first site to exchange, has to be on the left of sb (sa < sb ) |
[in] | sb | second site to exchange, has to be on the right of sa (sb > sa ) |
fermions | vector of Fermionic symmetries and labels, a pair <s,l> specifies that a state with the 0-indexed l'th label of the 1-indexed s'th symmetry odd is fermionic. |
References build_exchange_tensors_below(), syten::MPS::Operator::dIdx, mpo_cmp_prod(), syten::MPS::Operator::rIdx, and SYTEN_ASSERT_MSG.
Referenced by syten::MPS::SwappableTEBD::exponentiate_factor_mpo().