Skip to content

Commit 14698c4

Browse files
committed
let full and partial trace tests run for every sector
1 parent 9e90f78 commit 14698c4

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

test/tensors/tensors.jl

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,15 @@ for V in spacelist
293293
@tensor s2 = t[a, b, b, a]
294294
@tensor t3[a, b] := t[a, c, c, b]
295295
@tensor s3 = t3[a, a]
296-
else
297-
t = rand(ComplexF64, V1 V2 V1 V2) # avoid permutes
298-
ss = @constinferred tr(t)
299-
@test conj(ss) tr(t')
300-
@planar s2 = t[a b; a b]
301-
@planar t3[a; b] := t[a c; b c]
302-
@planar s3 = t3[a; a]
296+
@test ss s2
297+
@test ss s3
303298
end
299+
t = rand(ComplexF64, V1 V2 V1 V2) # avoid permutes
300+
ss = @constinferred tr(t)
301+
@test conj(ss) tr(t')
302+
@planar s2 = t[a b; a b]
303+
@planar t3[a; b] := t[a c; b c]
304+
@planar s3 = t3[a; a]
304305

305306
@test ss s2
306307
@test ss s3
@@ -311,12 +312,12 @@ for V in spacelist
311312
@tensor t2[a; b] := t[c d b; c d a]
312313
@tensor t4[a b; c d] := t[e d c; e b a]
313314
@tensor t5[a; b] := t4[a c; b c]
314-
else
315-
t = rand(ComplexF64, V3 V4 V5 V3 V4 V5) # compatible with module fusion
316-
@planar t2[a; b] := t[c a d; c b d]
317-
@planar t4[a b; c d] := t[e a b; e c d]
318-
@planar t5[a; b] := t4[a c; b c]
315+
@test t2 t5
319316
end
317+
t = rand(ComplexF64, V3 V4 V5 V3 V4 V5) # compatible with module fusion
318+
@planar t2[a; b] := t[c a d; c b d]
319+
@planar t4[a b; c d] := t[e a b; e c d]
320+
@planar t5[a; b] := t4[a c; b c]
320321
@test t2 t5
321322
end
322323
if BraidingStyle(I) isa Bosonic && hasfusiontensor(I)

0 commit comments

Comments
 (0)