Skip to content

Commit c31bc93

Browse files
committed
temporary trace fix
1 parent d5301ee commit c31bc93

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/fusiontrees/duality_manipulations.jl

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,24 @@ function planar_trace(
609609
F₁ = fusiontreetype(I, N₁)
610610
F₂ = fusiontreetype(I, N₂)
611611
newtrees = FusionTreeDict{Tuple{F₁, F₂}, T}()
612-
for ((f₁′, f₂′), coeff′) in repartition((f₁, f₂), N)
612+
if FusionStyle(I) isa UniqueFusion
613+
(f₁′, f₂′), coeff′ = repartition((f₁, f₂), N)
613614
for (f₁′′, coeff′′) in planar_trace(f₁′, (q1′, q2′))
614-
for (f12′′′, coeff′′′) in transpose((f₁′′, f₂′), (p1′, p2′))
615-
coeff = coeff′ * coeff′′ * coeff′′′
616-
if !iszero(coeff)
617-
newtrees[f12′′′] = get(newtrees, f12′′′, zero(coeff)) + coeff
615+
(f12′′′, coeff′′′) = transpose((f₁′′, f₂′), (p1′, p2′))
616+
coeff = coeff′ * coeff′′ * coeff′′′
617+
iszero(coeff) || (newtrees[f12′′′] = get(newtrees, f12′′′, zero(coeff)) + coeff)
618+
end
619+
else
620+
# TODO: this is a bit of a hack to fix the traces for now
621+
src = FusionTreeBlock([(f₁, f₂)])
622+
dst, U = repartition(src, N)
623+
for ((f₁′, f₂′), coeff′) in zip(fusiontrees(dst), U)
624+
for (f₁′′, coeff′′) in planar_trace(f₁′, (q1′, q2′))
625+
src′ = FusionTreeBlock([(f₁′′, f₂′)])
626+
dst′, U′ = transpose(src′, (p1′, p2′))
627+
for (f12′′′, coeff′′′) in zip(fusiontrees(dst′), U′)
628+
coeff = coeff′ * coeff′′ * coeff′′′
629+
iszero(coeff) || (newtrees[f12′′′] = get(newtrees, f12′′′, zero(coeff)) + coeff)
618630
end
619631
end
620632
end

0 commit comments

Comments
 (0)