The picture you drew above is also not an inner product with the remaining open legs - do you think about closing those as well? That would mean that T is the translation operator with *periodic* boundary conditions.
It's not too hard to contract all of this on the tensor level, though. I started writing some simple code for it to post here, but then I decided that I can also add it directly into TeNPy, so here you go:
overlap_translate_finite.
Later, I realized, that there actually was some functionality in that direction as well, namely the
permute_sites in combination with the plain
overlap.
It's a separate way of contracting things, though, and calling the permute first has a good chance of suffering from truncation errors during the permutation - but it works for more general permutations/translations, which might be useful for cylinder geometries with non-trivial snaking.