MPS::Operator syten::MPS::build_exchange_mpo_above | ( | std::vector< Basis > const & | lop_basis, |
Index const | sa, | ||
Index const | sb, | ||
Basis const & | vac, | ||
std::vector< Pair< Index, Index > > const & | fermions | ||
) |
Constructs a MPO acting from above which switches the two neighbouring sites sa
and sb
.
lop_basis | vector of incoming physical bases onto which this MPO will act |
sa | first site, to switch with sb |
sb | second site, to switch with sa |
vac | vacuum basis |
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. |
lop_basis
will switch the sites sa
and sb
. If fermions
is correctly specified, the implied Fermionic ordering will be the same as the actual MPS chain ordering again after the switch. References build_exchange_tensors_above(), genMPOId(), std::move(), std::vector< T >::size(), SYTEN_ASSERT, and SYTEN_ASSERT_MSG.