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:
|
|
|
|
@Jutho, I think I somewhat centralized determining the scalartype now, and in principle this is ready to start an attempt to make |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
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.