Skip to content

Commit 77ddc51

Browse files
committed
Clean up utility
1 parent 7c799b9 commit 77ddc51

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/utility/utility.jl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,14 @@ function fuser(::Type{T}, V1::S, V2::S) where {T,S<:IndexSpace}
132132
return isomorphism(T, fuse(V1 V2), V1 V2)
133133
end
134134

135-
# TODO: remove once TensorKit supports this
136-
_twist(t::AbstractTensorMap, i::Int) = _twist(BraidingStyle(sectortype(t)), t, i)
137-
_twist(::Bosonic, t::AbstractTensorMap, i::Int) = t
138-
function _twist(::NoBraiding, t::AbstractTensorMap, i::Int)
139-
check_unambiguous_braiding(space(t, i))
140-
return t
141-
end
142-
_twist(::BraidingStyle, t::AbstractTensorMap, i::Int) = twist(t, i)
135+
"""
136+
check_unambiguous_braiding(::Type{Bool}, V::VectorSpace)::Bool
137+
check_unambiguous_braiding(V::VectorSpace)
143138
144-
# Verify that the braiding is unambiguous: either through symmetric braiding or because the
145-
# sectors are all trivial
139+
Verify that the braiding of a vector space is unambiguous. This is the case if the braiding
140+
is symmetric or if all sectors are trivial. The signature with `Type{Bool}` is used to check
141+
while the signature without is used to throw an error if the braiding is ambiguous.
142+
"""
146143
function check_unambiguous_braiding(::Type{Bool}, V::VectorSpace)
147144
I = sectortype(V)
148145
BraidingStyle(I) isa SymmetricBraiding && return true

0 commit comments

Comments
 (0)