-
Notifications
You must be signed in to change notification settings - Fork 3
Multifusion compatibility #38
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
Conversation
…ingBimodule` spaces
…to bd/multifusion
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
==========================================
+ Coverage 54.56% 54.72% +0.15%
==========================================
Files 17 17
Lines 1446 1451 +5
==========================================
+ Hits 789 794 +5
Misses 657 657 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/vectorspaces/sumspace.jl
Outdated
|
|
||
| return SumSpace(rightunitspace(first(S))) | ||
| end | ||
| TensorKit.isunitspace(S::SumSpace{<:GradedSpace}) = all(isunitspace, S.spaces) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TensorKit.isunitspace(S::SumSpace{<:GradedSpace}) = all(isunitspace, S.spaces) | |
| TensorKit.isunitspace(S::SumSpace) = all(isunitspace, S.spaces; init=false) |
This probably doesn't have to be restricted to GradedSpace, and I guess empty spaces are isomorphic to zero spaces so that should return false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, init isn't a valid keyword argument for all, so I added a janky !isempty check
|
I think given the rest of the functions, it probably makes sense to remain consistent and indeed return a length 1 |
|
Can you also increase the patch version? I'll immediately tag a release |
This PR adds some functions which are useful in multifusion settings. I don't know how often
Base.oneunit(::SumSpace)is called within MPSKit, so no clue how much I'll actually be using this. I'm also just not sure how I should think ofleft/rightunitspaceof aSumSpace, so I made one choice here that returns a 1-element space.I kind of freestyled with coming up with tests, so feel free to criticize.
Edit: clearly I made the opposite choice in the tests, having confused myself at some point. So either the tests or the definition of
left/rightunitspaceneed to change.