Skip to content

Commit 5c437ac

Browse files
committed
update CGC orthogonality test for GenericFusion
1 parent dea98a0 commit 5c437ac

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/sectors.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,18 @@ end
9292
hasfusiontensor(I) || return nothing
9393
for a in smallset(I), b in smallset(I)
9494
cs = vec(collect(a b))
95-
CGCs = map(c -> reshape(fusiontensor(a, b, c), :, dim(c)), cs)
96-
M = map(Iterators.product(CGCs, CGCs)) do (cgc1, cgc2)
97-
return LinearAlgebra.norm(cgc1' * cgc2)
95+
cgcs = map(c -> fusiontensor(a, b, c), cs)
96+
for (c, cgc) in zip(cs, cgcs), (c′, cgc′) in zip(cs, cgcs)
97+
for μ in 1:Nsymbol(a, b, c), ν in 1:Nsymbol(a, b, c′)
98+
@tensor overlap[mc mc'] := conj(view(cgc, :, :, :, μ)[ma mb mc]) *
99+
view(cgc′, :, :, :, ν)[ma mb mc']
100+
if μ == ν && c == c′
101+
@test isapprox(overlap, LinearAlgebra.I; atol = 1.0e-12)
102+
else
103+
@test isapprox(LinearAlgebra.norm(overlap), 0; atol = 1.0e-12)
104+
end
105+
end
98106
end
99-
@test isapprox(M' * M, LinearAlgebra.Diagonal(dim.(cs)); atol = 1.0e-12)
100107
end
101108
end
102109

0 commit comments

Comments
 (0)