11using GradedUnitRanges:
22 dual, fusion_product, space_isequal, gradedrange, flip, tensor_product
3+ using LabelledNumbers: label
34using SymmetrySectors:
45 ⊗ ,
56 Fib,
@@ -11,6 +12,7 @@ using SymmetrySectors:
1112 U1,
1213 Z,
1314 block_dimensions,
15+ nsymbol,
1416 quantum_dimension,
1517 trivial
1618using Test: @inferred , @test , @testset , @test_throws
@@ -29,6 +31,8 @@ using Test: @inferred, @test, @testset, @test_throws
2931 @test (@inferred q ⊗ q) == q
3032 @test (@inferred q ⊗ z0) == z0
3133 @test (@inferred z1 ⊗ q) == z1
34+ @test nsymbol (q, q, q) == 1
35+ @test label (nsymbol (q, q, q)) == q
3236
3337 # using GradedUnitRanges interface
3438 @test space_isequal (fusion_product (z0, z0), gradedrange ([z0 => 1 ]))
@@ -49,6 +53,11 @@ using Test: @inferred, @test, @testset, @test_throws
4953 @test q1 ⊗ q2 == U1 (3 )
5054 @test q2 ⊗ q1 == U1 (3 )
5155 @test (@inferred q1 ⊗ q2) == q3 # no better way, see Julia PR 23426
56+
57+ @test nsymbol (q1, q2, q3) == 1
58+ @test label (nsymbol (q1, q2, q3)) == q3
59+ @test nsymbol (q1, q1, q3) == 0
60+ @test label (nsymbol (q1, q1, q3)) == q3
5261 end
5362
5463 @testset " O2 fusion rules" begin
263272 @test space_isequal (
264273 fusion_product (dual (g5), dual (g6)), gradedrange ([s1 => 2 , f3 => 1 , c3 => 1 , ad8 => 1 ])
265274 )
275+
276+ @test nsymbol (ad8, ad8, ad8) == 2
277+ @test label (nsymbol (ad8, ad8, ad8)) == ad8
266278 end
267279
268280 @testset " Mixed GradedUnitRange - Sector fusion rules" begin
0 commit comments