@@ -92,11 +92,8 @@ function artin_braid(src::FusionTreeBlock{I, N, 0}, i; inv::Bool = false) where
9292 n = length (src) # braiding a complete block keeps its size
9393 return artin_braid! (Matrix {sectorscalartype(I)} (undef, n, n), src, i; inv) # zeroed by `artin_braid!`
9494end
95- # `U` is overwritten with the braid matrix of `src`, a complete block; the trees of the result are
96- # stored in `trees` if given
97- function artin_braid! (
98- U:: AbstractMatrix , src:: FusionTreeBlock{I, N, 0} , i; inv:: Bool = false , trees = nothing
99- ) where {I, N}
95+ # `U` is overwritten with the braid matrix of `src`, a complete block
96+ function artin_braid! (U:: AbstractMatrix , src:: FusionTreeBlock{I, N, 0} , i; inv:: Bool = false ) where {I, N}
10097 1 <= i < N || throw (ArgumentError (" Cannot swap outputs i=$i and i+1 out of only $N outputs" ))
10198 size (U) == (length (src), length (src)) || throw (DimensionMismatch (lazy " braid matrix of size $(size(U)) for a block of $(length(src)) trees" ))
10299 isempty (src) && return src => U
@@ -110,7 +107,7 @@ function artin_braid!(
110107 isdual = src. isdual[1 ]
111108 isdual′ = TupleTools. setindex (isdual, isdual[i], i + 1 )
112109 isdual′ = TupleTools. setindex (isdual′, isdual[i + 1 ], i)
113- rows = TreeRows (fusiontreetype (I, N, 0 ), length (src), trees )
110+ rows = TreeRows (fusiontreetype (I, N, 0 ), length (src))
114111
115112 oneT = one (sectorscalartype (I))
116113 fill! (U, zero (oneT))
@@ -344,18 +341,14 @@ end
344341
345342 dst, U = repartition (src, Val (numind (src)))
346343
347- # the swaps keep the size of the block, so that the tree vector and the matrices of the
348- # previous step are recycled (except for the trees of `src`, which are part of the key)
349- trees = nothing
344+ # the swaps keep the size of the block, so that the matrices of the previous step are recycled
350345 U_tmp = Matrix {sectorscalartype(I)} (undef, length (dst), length (dst))
351346 U_spare = nothing
352347 braid_style = BraidingStyle (I)
353348 for s in permutation2swaps (p′)
354349 _check_levels (braid_style, levels, s)
355350 inv = levels[s] > levels[s + 1 ]
356- dst′, _ = artin_braid! (U_tmp, dst, s; inv, trees)
357- trees = dst. trees === src. trees ? nothing : dst. trees
358- dst = dst′
351+ dst, _ = artin_braid! (U_tmp, dst, s; inv)
359352 U_spare, U = U, U_spare isa typeof (U_tmp) ? mul! (U_spare, U_tmp, U) : U_tmp * U
360353 l = levels[s]
361354 levels = TupleTools. setindex (levels, levels[s + 1 ], s)
0 commit comments