Skip to content

Commit 1cf8e71

Browse files
committed
use oplus instead of sectors
1 parent f7f1ac4 commit 1cf8e71

1 file changed

Lines changed: 2 additions & 17 deletions

File tree

src/vectorspaces/sumspace.jl

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,10 @@ TensorKit.unitspace(S::Type{<:SumSpace}) = SumSpace(TensorKit.unitspace(eltype(S
172172
TensorKit.zerospace(::Type{SumSpace{S}}) where {S} = SumSpace{S}()
173173

174174
function 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)))
183176
end
184-
185177
function 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)))
194179
end
195180
TensorKit.isunitspace(S::SumSpace) = !isempty(S) && all(isunitspace, S.spaces)
196181

0 commit comments

Comments
 (0)