File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,25 +172,10 @@ TensorKit.unitspace(S::Type{<:SumSpace}) = SumSpace(TensorKit.unitspace(eltype(S
172172TensorKit. zerospace (:: Type{SumSpace{S}} ) where {S} = SumSpace {S} ()
173173
174174function TensorKit. leftunitspace (S:: SumSpace{<:GradedSpace} )
175- I = sectortype (S)
176- if UnitStyle (I) isa GenericUnit
177- ! isempty (sectors (S)) || throw (ArgumentError (" Cannot determine the left unit of an empty SumSpace" ))
178- TensorKit. _allequal (leftunit, sectors (S)) ||
179- throw (ArgumentError (" sectors of $S do not have the same left unit" ))
180- end
181-
182- return SumSpace (leftunitspace (first (S)))
175+ return SumSpace (leftunitspace (oplus (S)))
183176end
184-
185177function TensorKit. rightunitspace (S:: SumSpace{<:GradedSpace} )
186- I = sectortype (S)
187- if UnitStyle (I) isa GenericUnit
188- ! isempty (sectors (S)) || throw (ArgumentError (" Cannot determine the right unit of an empty SumSpace" ))
189- TensorKit. _allequal (rightunit, sectors (S)) ||
190- throw (ArgumentError (" sectors of $S do not have the same right unit" ))
191- end
192-
193- return SumSpace (rightunitspace (first (S)))
178+ return SumSpace (rightunitspace (oplus (S)))
194179end
195180TensorKit. isunitspace (S:: SumSpace ) = ! isempty (S) && all (isunitspace, S. spaces)
196181
You can’t perform that action at this time.
0 commit comments