Skip to content

Commit 994eab4

Browse files
leburgelclaude
authored andcommitted
Use the unit of the other side as the coupled sector of a block with no legs on one side
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 485afaf commit 994eab4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎src/fusiontrees/fusiontrees.jl‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ function FusionTreeBlock{I}(
141141

142142
# note: cs is unique due to ⊗ returning unique fusion results
143143
# a superset of the coupled sectors suffices, as there are no fusion trees for the others:
144-
# the units, or the fusion product of the shorter side, which avoids that of the longer side
145-
# (`vec`: the units and products of `ProductSector`s have a shape)
146-
cs = if N₁ == 0 || N₂ == 0
147-
sort!(vec(collect(allunits(I))))
144+
# the unit of the other side, or the fusion product of the shorter side, which avoids that of
145+
# the longer side (`vec`: products of `ProductSector`s have a shape)
146+
cs = if N₁ == 0
147+
[leftunit(first(uncoupled[2]))]
148+
elseif N₂ == 0
149+
[leftunit(first(uncoupled[1]))]
148150
else
149151
sort!(vec(collect(⊗(uncoupled[N₁ <= N₂ ? 1 : 2]...))))
150152
end

0 commit comments

Comments
 (0)