@@ -12,7 +12,6 @@ using NDTensors.SymmetrySectors:
1212 Z,
1313 block_dimensions,
1414 quantum_dimension,
15- recover_sector_product_type,
1615 product_sectors,
1716 trivial
1817using NDTensors. GradedAxes: dual, fusion_product, space_isequal, gradedrange
@@ -43,9 +42,6 @@ using Test: @inferred, @test, @testset, @test_throws
4342 @test product_sectors (s)[2 ] == SU2 (1 // 2 )
4443 @test product_sectors (s)[3 ] == U1 (3 )
4544 @test (@inferred trivial (s)) == SectorProduct (U1 (0 ), SU2 (0 ), U1 (0 ))
46- @test (@inferred recover_sector_product_type (
47- typeof (product_sectors (s)), product_sectors (s)
48- )) == s
4945
5046 s = U1 (3 ) × SU2 (1 // 2 ) × Fib (" τ" )
5147 @test length (product_sectors (s)) == 3
@@ -146,14 +142,14 @@ using Test: @inferred, @test, @testset, @test_throws
146142 @test (@inferred p1 ⊗ p2) == SectorProduct (U1 (3 ))
147143
148144 p11 = U1 (1 ) × U1 (1 )
149- @test ( @inferred p11 ⊗ p11) == U1 (2 ) × U1 (2 )
145+ @test p11 ⊗ p11 == U1 (2 ) × U1 (2 )
150146
151147 p123 = U1 (1 ) × U1 (2 ) × U1 (3 )
152- @test ( @inferred p123 ⊗ p123) == U1 (2 ) × U1 (4 ) × U1 (6 )
148+ @test p123 ⊗ p123 == U1 (2 ) × U1 (4 ) × U1 (6 )
153149
154150 s1 = SectorProduct (U1 (1 ), Z {2} (1 ))
155151 s2 = SectorProduct (U1 (0 ), Z {2} (0 ))
156- @test ( @inferred s1 ⊗ s2) == U1 (1 ) × Z {2} (1 )
152+ @test s1 ⊗ s2 == U1 (1 ) × Z {2} (1 )
157153 end
158154
159155 @testset " Fusion of NonAbelian products" begin
@@ -177,7 +173,7 @@ using Test: @inferred, @test, @testset, @test_throws
177173 ]),
178174 )
179175 @test space_isequal (
180- ( @inferred phh ⊗ phh) ,
176+ phh ⊗ phh,
181177 gradedrange ([
182178 (SU2 (0 ) × SU2 (0 )) => 1 ,
183179 (SU2 (1 ) × SU2 (0 )) => 1 ,
@@ -191,12 +187,11 @@ using Test: @inferred, @test, @testset, @test_throws
191187 ı = Fib (" 1" )
192188 τ = Fib (" τ" )
193189 s = ı × ı
194- @test space_isequal (( @inferred s ⊗ s) , gradedrange ([s => 1 ]))
190+ @test space_isequal (s ⊗ s, gradedrange ([s => 1 ]))
195191
196192 s = τ × τ
197193 @test space_isequal (
198- (@inferred s ⊗ s),
199- gradedrange ([(ı × ı) => 1 , (τ × ı) => 1 , (ı × τ) => 1 , (τ × τ) => 1 ]),
194+ s ⊗ s, gradedrange ([(ı × ı) => 1 , (τ × ı) => 1 , (ı × τ) => 1 , (τ × τ) => 1 ])
200195 )
201196
202197 σ = Ising (" σ" )
@@ -205,27 +200,27 @@ using Test: @inferred, @test, @testset, @test_throws
205200 g = gradedrange ([
206201 (ı × Ising (" 1" )) => 1 , (τ × Ising (" 1" )) => 1 , (ı × ψ) => 1 , (τ × ψ) => 1
207202 ])
208- @test space_isequal (( @inferred s ⊗ s) , g)
203+ @test space_isequal (s ⊗ s, g)
209204 end
210205
211206 @testset " Fusion of mixed Abelian and NonAbelian products" begin
212207 p2h = U1 (2 ) × SU2 (1 // 2 )
213208 p1h = U1 (1 ) × SU2 (1 // 2 )
214209 @test space_isequal (
215- ( @inferred p2h ⊗ p1h) , gradedrange ([(U1 (3 ) × SU2 (0 )) => 1 , (U1 (3 ) × SU2 (1 )) => 1 ])
210+ p2h ⊗ p1h, gradedrange ([(U1 (3 ) × SU2 (0 )) => 1 , (U1 (3 ) × SU2 (1 )) => 1 ])
216211 )
217212
218213 p1h1 = U1 (1 ) × SU2 (1 // 2 ) × Z {2} (1 )
219214 @test space_isequal (
220- ( @inferred p1h1 ⊗ p1h1) ,
215+ p1h1 ⊗ p1h1,
221216 gradedrange ([(U1 (2 ) × SU2 (0 ) × Z {2} (0 )) => 1 , (U1 (2 ) × SU2 (1 ) × Z {2} (0 )) => 1 ]),
222217 )
223218 end
224219
225220 @testset " Fusion of fully mixed products" begin
226221 s = U1 (1 ) × SU2 (1 // 2 ) × Ising (" σ" )
227222 @test space_isequal (
228- ( @inferred s ⊗ s) ,
223+ s ⊗ s,
229224 gradedrange ([
230225 (U1 (2 ) × SU2 (0 ) × Ising (" 1" )) => 1 ,
231226 (U1 (2 ) × SU2 (1 ) × Ising (" 1" )) => 1 ,
@@ -238,7 +233,7 @@ using Test: @inferred, @test, @testset, @test_throws
238233 τ = Fib (" τ" )
239234 s = SU2 (1 // 2 ) × U1 (1 ) × τ
240235 @test space_isequal (
241- ( @inferred s ⊗ s) ,
236+ s ⊗ s,
242237 gradedrange ([
243238 (SU2 (0 ) × U1 (2 ) × ı) => 1 ,
244239 (SU2 (1 ) × U1 (2 ) × ı) => 1 ,
@@ -248,9 +243,7 @@ using Test: @inferred, @test, @testset, @test_throws
248243 )
249244
250245 s = U1 (1 ) × ı × τ
251- @test space_isequal (
252- (@inferred s ⊗ s), gradedrange ([(U1 (2 ) × ı × ı) => 1 , (U1 (2 ) × ı × τ) => 1 ])
253- )
246+ @test space_isequal (s ⊗ s, gradedrange ([(U1 (2 ) × ı × ı) => 1 , (U1 (2 ) × ı × τ) => 1 ]))
254247 end
255248
256249 @testset " Fusion of different length Categories" begin
@@ -282,7 +275,7 @@ using Test: @inferred, @test, @testset, @test_throws
282275 g1 = gradedrange ([s1 => 2 ])
283276 g2 = gradedrange ([s2 => 1 ])
284277 @test space_isequal (
285- ( @inferred fusion_product (g1, g2) ),
278+ fusion_product (g1, g2),
286279 gradedrange ([U1 (1 ) × SU2 (0 ) × Ising (" σ" ) => 2 , U1 (1 ) × SU2 (1 ) × Ising (" σ" ) => 2 ]),
287280 )
288281 end
305298 @test (@inferred quantum_dimension (s)) == 5
306299 @test (@inferred dual (s)) == (A= U1 (- 1 ),) × (B= SU2 (2 ),)
307300 @test (@inferred trivial (s)) == (A= U1 (0 ),) × (B= SU2 (0 ),)
308- @test (@inferred recover_sector_product_type (
309- typeof (product_sectors (s)), Tuple (product_sectors (s))
310- )) == s
311301 @test s == (B= SU2 (2 ),) × (A= U1 (1 ),)
312302
313303 s = s × (C= Ising (" ψ" ),)
@@ -418,15 +408,15 @@ end
418408 @test (@inferred q01 ⊗ q00) == q01
419409 @test (@inferred q00 ⊗ q01) == q01
420410 @test (@inferred q10 ⊗ q01) == q11
421- @test ( @inferred q11 ⊗ q11) == SectorProduct (; A= U1 (2 ), B= U1 (2 ))
411+ @test q11 ⊗ q11 == SectorProduct (; A= U1 (2 ), B= U1 (2 ))
422412
423413 s11 = SectorProduct (; A= U1 (1 ), B= Z {2} (1 ))
424414 s10 = SectorProduct (; A= U1 (1 ))
425415 s01 = SectorProduct (; B= Z {2} (1 ))
426416 @test (@inferred s01 ⊗ q00) == s01
427417 @test (@inferred q00 ⊗ s01) == s01
428418 @test (@inferred s10 ⊗ s01) == s11
429- @test ( @inferred s11 ⊗ s11) == SectorProduct (; A= U1 (2 ), B= Z {2} (0 ))
419+ @test s11 ⊗ s11 == SectorProduct (; A= U1 (2 ), B= Z {2} (0 ))
430420 end
431421
432422 @testset " Fusion of NonAbelian products" begin
444434 @test space_isequal ((@inferred pha ⊗ phb), gradedrange ([phab => 1 ]))
445435
446436 @test space_isequal (
447- ( @inferred phab ⊗ phab) ,
437+ phab ⊗ phab,
448438 gradedrange ([
449439 SectorProduct (; A= SU2 (0 ), B= SU2 (0 )) => 1 ,
450440 SectorProduct (; A= SU2 (1 ), B= SU2 (0 )) => 1 ,
@@ -458,11 +448,11 @@ end
458448 ı = Fib (" 1" )
459449 τ = Fib (" τ" )
460450 s = SectorProduct (; A= ı, B= ı)
461- @test space_isequal (( @inferred s ⊗ s) , gradedrange ([s => 1 ]))
451+ @test space_isequal (s ⊗ s, gradedrange ([s => 1 ]))
462452
463453 s = SectorProduct (; A= τ, B= τ)
464454 @test space_isequal (
465- ( @inferred s ⊗ s) ,
455+ s ⊗ s,
466456 gradedrange ([
467457 SectorProduct (; A= ı, B= ı) => 1 ,
468458 SectorProduct (; A= τ, B= ı) => 1 ,
480470 SectorProduct (; A= ı, B= ψ) => 1 ,
481471 SectorProduct (; A= τ, B= ψ) => 1 ,
482472 ])
483- @test space_isequal (( @inferred s ⊗ s) , g)
473+ @test space_isequal (s ⊗ s, g)
484474 end
485475
486476 @testset " Fusion of mixed Abelian and NonAbelian products" begin
@@ -494,16 +484,16 @@ end
494484 q21 = (N= U1 (2 ),) × (J= SU2 (1 ),)
495485 q22 = (N= U1 (2 ),) × (J= SU2 (2 ),)
496486
497- @test space_isequal (( @inferred q1h ⊗ q1h) , gradedrange ([q20 => 1 , q21 => 1 ]))
498- @test space_isequal (( @inferred q10 ⊗ q1h) , gradedrange ([q2h => 1 ]))
487+ @test space_isequal (q1h ⊗ q1h, gradedrange ([q20 => 1 , q21 => 1 ]))
488+ @test space_isequal (q10 ⊗ q1h, gradedrange ([q2h => 1 ]))
499489 @test space_isequal ((@inferred q0h ⊗ q1h), gradedrange ([q10 => 1 , q11 => 1 ]))
500- @test space_isequal (( @inferred q11 ⊗ q11) , gradedrange ([q20 => 1 , q21 => 1 , q22 => 1 ]))
490+ @test space_isequal (q11 ⊗ q11, gradedrange ([q20 => 1 , q21 => 1 , q22 => 1 ]))
501491 end
502492
503493 @testset " Fusion of fully mixed products" begin
504494 s = SectorProduct (; A= U1 (1 ), B= SU2 (1 // 2 ), C= Ising (" σ" ))
505495 @test space_isequal (
506- ( @inferred s ⊗ s) ,
496+ s ⊗ s,
507497 gradedrange ([
508498 SectorProduct (; A= U1 (2 ), B= SU2 (0 ), C= Ising (" 1" )) => 1 ,
509499 SectorProduct (; A= U1 (2 ), B= SU2 (1 ), C= Ising (" 1" )) => 1 ,
516506 τ = Fib (" τ" )
517507 s = SectorProduct (; A= SU2 (1 // 2 ), B= U1 (1 ), C= τ)
518508 @test space_isequal (
519- ( @inferred s ⊗ s) ,
509+ s ⊗ s,
520510 gradedrange ([
521511 SectorProduct (; A= SU2 (0 ), B= U1 (2 ), C= ı) => 1 ,
522512 SectorProduct (; A= SU2 (1 ), B= U1 (2 ), C= ı) => 1 ,
527517
528518 s = SectorProduct (; A= τ, B= U1 (1 ), C= ı)
529519 @test space_isequal (
530- ( @inferred s ⊗ s) ,
520+ s ⊗ s,
531521 gradedrange ([
532522 SectorProduct (; B= U1 (2 ), A= ı, C= ı) => 1 , SectorProduct (; B= U1 (2 ), A= τ, C= ı) => 1
533523 ]),
@@ -540,14 +530,14 @@ end
540530 g2 = gradedrange ([s2 => 1 ])
541531 s3 = SectorProduct (; A= U1 (1 ), B= SU2 (0 ), C= Ising (" σ" ))
542532 s4 = SectorProduct (; A= U1 (1 ), B= SU2 (1 ), C= Ising (" σ" ))
543- @test space_isequal (( @inferred fusion_product (g1, g2) ), gradedrange ([s3 => 2 , s4 => 2 ]))
533+ @test space_isequal (fusion_product (g1, g2), gradedrange ([s3 => 2 , s4 => 2 ]))
544534
545535 sA = SectorProduct (; A= U1 (1 ))
546536 sB = SectorProduct (; B= SU2 (1 // 2 ))
547537 sAB = SectorProduct (; A= U1 (1 ), B= SU2 (1 // 2 ))
548538 gA = gradedrange ([sA => 2 ])
549539 gB = gradedrange ([sB => 1 ])
550- @test space_isequal (( @inferred fusion_product (gA, gB) ), gradedrange ([sAB => 2 ]))
540+ @test space_isequal (fusion_product (gA, gB), gradedrange ([sAB => 2 ]))
551541 end
552542end
553543
0 commit comments