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.
| 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.
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.