We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GenericFusion
1 parent 5fe2841 commit fc4f1c2Copy full SHA for fc4f1c2
test/sectors.jl
@@ -84,11 +84,20 @@ if hasfusiontensor(I)
84
@testset "Orthogonality of fusiontensors" begin
85
for a in smallset(I), b in smallset(I)
86
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)
+
+ for c in cs, c′ in cs
+ 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
100
end
- @test isapprox(M' * M, LinearAlgebra.Diagonal(dim.(cs)); atol = 1.0e-12)
101
102
103
0 commit comments