Skip to content

Commit fc4f1c2

Browse files
committed
generalise orthogonality of fusion tensor check for GenericFusion
1 parent 5fe2841 commit fc4f1c2

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/sectors.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,20 @@ if hasfusiontensor(I)
8484
@testset "Orthogonality of fusiontensors" begin
8585
for a in smallset(I), b in smallset(I)
8686
cs = vec(collect(a b))
87-
CGCs = map(c -> reshape(fusiontensor(a, b, c), :, dim(c)), cs)
88-
M = map(Iterators.product(CGCs, CGCs)) do (cgc1, cgc2)
89-
return LinearAlgebra.norm(cgc1' * cgc2)
87+
88+
for c in cs, c′ in cs
89+
cgc1 = fusiontensor(a, b, c)
90+
cgc2 = fusiontensor(a, b, c′)
91+
for μ in 1:Nsymbol(a, b, c), ν in 1:Nsymbol(a, b, c′)
92+
overlap = reshape(cgc1[:, :, :, μ], :, dim(c))' *
93+
reshape(cgc2[:, :, :, ν], :, dim(c′))
94+
if μ == ν && c == c′
95+
@test isapprox(overlap, LinearAlgebra.I; atol = 1.0e-12)
96+
else
97+
@test isapprox(LinearAlgebra.norm(overlap), 0; atol = 1.0e-12)
98+
end
99+
end
90100
end
91-
@test isapprox(M' * M, LinearAlgebra.Diagonal(dim.(cs)); atol = 1.0e-12)
92101
end
93102
end
94103
end

0 commit comments

Comments
 (0)