Fix rotl90, rotr90 and rot180 for LocalOperator#267
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
lkdvos
left a comment
There was a problem hiding this comment.
Looks good to me, left some minor comments.
If we are changing the name, I would also be happy to do something like: rotate_left_90, rotate_right_90, rotate_180, and use that everywhere, but obviously that's not a requirement.
If we really want to change that everywhere, then I'd do that in a separate PR since we use
|
I stumbled upon this bug when I was trying to run SU for Hamiltonians with non-uniform physical spaces. It turns out that the rotation functions for$1\times1$ unit cells or uniform lattices - this should fix it. (I hope my cold-ridden brain actually did the right thing to fix it but I added some tests so it should be fine, hopefully.) I also renamed the functions for index rotations to remove the type piracy.
LocalOperators would only work for