Prevent construction of multifusion tensors with incompatible coloring - #515
Conversation
lkdvos
left a comment
There was a problem hiding this comment.
I do think this is probably quite a big performance hit right in the hot path of the fusiontree constructors though, I don't think there is typically a fast implementation of this. Additionally, I was kind of expecting to convert more things to Nsymbol, to actually make them error if the fusion is disallowed?
|
I'm misunderstanding then what kind of behavior we want. So we want |
|
I think that was what I was expecting, especially since we decided |
Codecov Report❌ Patch coverage is
... and 21 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This reverts commit 5f9e5be.
…into bd/fusiontree-iterate
Nsymbol calls or add guards in fusion tree iteration
lkdvos
left a comment
There was a problem hiding this comment.
Other than the comments, looks good, thanks for looking into this!
…into bd/fusiontree-iterate
This reverts commit 871cc58.
|
I made another small change that handles more edge cases, in particular I was kind of worried about your |
|
|
||
| # Return the `(leftunit, rightunit)` shared by all sectors of `V`, or `nothing` for the zero | ||
| # space, whose coloring is unconstrained and thus acts as a wildcard in unit checks. | ||
| function _units(V::ElementarySpace) |
There was a problem hiding this comment.
I would be more explicit and call this function _leftrightunit
There was a problem hiding this comment.
Also, since we are now checking a lot, I think the question is whether this check should already appear in the GradedSpace constructors. Currently, I can still construct something like GradedSpace(c=>1 for c in allunits(I)), but as soon as I take tensor products with this space, I get errors? That does not sound like the correct behaviour.
There was a problem hiding this comment.
implemented. This was slightly annoying since our tests were not fully compatible with that, but I think I managed to bypass this.
There was a problem hiding this comment.
Just to motivate why I didn't do it at the GradedSpace level: I treat GradedSpace as some semi-simple object of a sector type. Only from ProductSpace onwards is it really seen as "a leg of a tensor". But it's fine as-is
|
Seems to cause an error in some tests, but I don't understand/see where it is coming from. The line numbers in test/symmetries/singletree.jl seem off. |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
|
Can confirm the test failures are solely due to v1 switching from 1.12 to 1.13, so I'll address these in separate PRs to keep things contained. This should then be good to go once the other tests turn green, and I'll merge. |
|
Thanks a lot for your help on this! |
|
rebase/remerge is not necessary, will just wait for tests to run and then merge into main directly. |
Deals with #514, at least partially.
Now we have
which behaves the same way as
Edit: decided to actually prevent construction of these kinds of tensors at the level of the product space and hom space.
Since this was incompatible with the previous implementation of
unitspace, this now errors forGenericUnitsector types.