@@ -151,26 +151,16 @@ for V in spacelist
151151 end
152152 end
153153 @timedtestset "Trivial space insertion and removal" begin
154- W = V1 ⊗ V2 ⊗ V3 ← V4 ⊗ V5
154+ W = V1 ⊗ V2 ← V3 ⊗ V4 ⊗ V5
155155 for T in (Float32, ComplexF64)
156156 t = @constinferred rand(T, W)
157- if isa(UnitStyle(I), SimpleUnit)
158- t2 = @constinferred insertleftunit(t)
159- @test t2 == @constinferred insertrightunit(t)
160- @test space(t2) == insertleftunit(space(t))
161- @test @constinferred(removeunit(t2, $(numind(t2)))) == t
162- t3 = @constinferred insertleftunit(t; copy = true)
163- @test t3 == @constinferred insertrightunit(t; copy = true)
164- @test @constinferred(removeunit(t3, $(numind(t3)))) == t
165- else
166- t2 = @constinferred insertleftunit(t, 5)
167- @test t2 == @constinferred insertrightunit(t, 4)
168- @test space(t2) == insertleftunit(space(t), 5)
169- @test @constinferred(removeunit(t2, $(numind(t2) - 1))) == t
170- t3 = @constinferred insertleftunit(t, 5; copy = true)
171- @test t3 == @constinferred insertrightunit(t, 4; copy = true)
172- @test @constinferred(removeunit(t3, $(numind(t3) - 1))) == t
173- end
157+ t2 = @constinferred insertleftunit(t)
158+ @test t2 == @constinferred insertrightunit(t)
159+ @test space(t2) == insertleftunit(space(t))
160+ @test @constinferred(removeunit(t2, $(numind(t2)))) == t
161+ t3 = @constinferred insertleftunit(t; copy = true)
162+ @test t3 == @constinferred insertrightunit(t; copy = true)
163+ @test @constinferred(removeunit(t3, $(numind(t3)))) == t
174164
175165 @test numind(t2) == numind(t) + 1
176166 @test scalartype(t2) === T
@@ -182,7 +172,7 @@ for V in spacelist
182172 end
183173
184174 t4 = @constinferred insertrightunit(t, 3; dual = true)
185- @test numin(t4) == numin(t) && numout(t4) == numout(t) + 1
175+ @test numin(t4) == numin(t) + 1 && numout(t4) == numout(t)
186176 for (c, b) in blocks(t)
187177 @test b == block(t4, c)
188178 end
@@ -288,6 +278,7 @@ for V in spacelist
288278 end
289279 end
290280 symmetricbraiding && @timedtestset "Full trace: test self-consistency" begin
281+ # TODO: extend to multifusion but keep these @tensor tests
291282 t = rand(ComplexF64, V1 ⊗ V2' ← V1 ⊗ V2' )
292283 s = @constinferred tr(t)
293284 @test conj(s) ≈ tr(t' )
@@ -446,7 +437,7 @@ for V in spacelist
446437 end
447438 end
448439 @timedtestset "diag/diagm" begin
449- W = V1 ⊗ V2 ⊗ V3 ← V4 ⊗ V5
440+ W = V1 ⊗ V2 ← V3 ⊗ V4 ⊗ V5
450441 t = randn(ComplexF64, W)
451442 d = LinearAlgebra.diag(t)
452443 D = LinearAlgebra.diagm(codomain(t), domain(t), d)
0 commit comments