@@ -769,8 +769,9 @@ function elementary_trace(f::FusionTree{I,N}, i) where {I<:Sector,N}
769769 push! (newtrees, f′ => coeff)
770770 return newtrees
771771 else # i == N
772+ unit = leftone (b)
772773 if N == 2
773- f′ = FusionTree {I} ((), f . coupled , (), (), ()) # or leftone(f.uncoupled[1]) == rightone(f.uncoupled[2] )
774+ f′ = FusionTree {I} ((), unit , (), (), ())
774775 coeff = sqrtdim (b)
775776 if ! (f. isdual[N])
776777 coeff *= conj (frobeniusschur (b))
@@ -781,14 +782,12 @@ function elementary_trace(f::FusionTree{I,N}, i) where {I<:Sector,N}
781782 uncoupled_ = TupleTools. front (f. uncoupled)
782783 inner_ = TupleTools. front (f. innerlines)
783784 coupled_ = f. innerlines[end ]
784- @assert coupled_ == dual (b) # isn't this always true at this point?
785785 isdual_ = TupleTools. front (f. isdual)
786786 vertices_ = TupleTools. front (f. vertices)
787787 f_ = FusionTree (uncoupled_, coupled_, isdual_, inner_, vertices_)
788788 fs = FusionTree ((b,), b, (! f. isdual[1 ],), (), ())
789- unit = leftone (fs. coupled)
790789 for (f_′, coeff) in merge (fs, f_, unit, 1 ) # coloring gets reversed here, should be the other unit
791- f_′. innerlines[1 ] == unit || continue # is this one valid?
790+ f_′. innerlines[1 ] == unit || continue
792791 uncoupled′ = Base. tail (Base. tail (f_′. uncoupled))
793792 isdual′ = Base. tail (Base. tail (f_′. isdual))
794793 inner′ = N <= 4 ? () : Base. tail (Base. tail (f_′. innerlines))
0 commit comments