-
Notifications
You must be signed in to change notification settings - Fork 56
Fix handling of real tensors with complex scalartype #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Haven't managed to go through this in detail, but I wonder if before trying to fix this and make it consistent, it might be useful to first settle the question if we want to separate between |
|
I think in general I completely agree to introduce these functions and make that distinction. |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
|
|
This is an attempt at being more principled about dealing with complex
sectorscalartypes with tensors that don't necessarily have complex entries.In the context of #356 I bumped into a couple of these, so I figure might as well look a bit more carefully at the various occurrences.
My general strategy here is to use
TO.tensoralloc_addas much as possible, since we already fixed this issue in that function.However, I also had to modify
compose_dest, since there are no recouplings required there, and therefore there is no need to update the scalartype.I also added the utility
check_spacetypefunction that does exactly what you suspect it does, and just centralizes various places in the code where this was in use.