@@ -279,6 +279,7 @@ println("------------------------------------")
279279 @test @constinferred (⊗ (V1, V2, V3 ⊗ V4)) == P
280280 @test @constinferred (⊗ (V1, V2 ⊗ V3, V4)) == P
281281 @test @constinferred (insertunit (P, 3 )) == V1 * V2 * oneunit (V1) * V3 * V4
282+ @test @constinferred (removeunit (V1 * V2 * oneunit (V1)' * V3 * V4, 3 )) == P
282283 @test fuse (V1, V2' , V3) ≅ V1 ⊗ V2' ⊗ V3
283284 @test fuse (V1, V2' , V3) ≾ V1 ⊗ V2' ⊗ V3
284285 @test fuse (V1, V2' , V3) ≿ V1 ⊗ V2' ⊗ V3
@@ -339,6 +340,7 @@ println("------------------------------------")
339340 @test @constinferred (⊗ (V1, V2, V3)) == P
340341 @test @constinferred (adjoint (P)) == dual (P) == V3' ⊗ V2' ⊗ V1'
341342 @test @constinferred (insertunit (P, 3 ; conj= true )) == V1 * V2 * oneunit (V1)' * V3
343+ @test P == @constinferred (removeunit (insertunit (P, 3 ), 3 ))
342344 @test fuse (V1, V2' , V3) ≅ V1 ⊗ V2' ⊗ V3
343345 @test fuse (V1, V2' , V3) ≾ V1 ⊗ V2' ⊗ V3 ≾ fuse (V1 ⊗ V2' ⊗ V3)
344346 @test fuse (V1, V2' ) ⊗ V3 ≾ V1 ⊗ V2' ⊗ V3
@@ -420,11 +422,14 @@ println("------------------------------------")
420422 @test permute (W, ((2 , 4 , 5 ), (3 , 1 ))) == (V2 ⊗ V4' ⊗ V5' ← V3 ⊗ V1' )
421423 @test (V1 ⊗ V2 ← V1 ⊗ V2) == @constinferred TensorKit. compose (W, W' )
422424 @test @constinferred (insertunit (W)) == (V1 ⊗ V2 ← V3 ⊗ V4 ⊗ V5 ⊗ oneunit (V5))
425+ @test @constinferred (removeunit (insertunit (W), numind (W) + 1 )) == W
423426 @test @constinferred (insertunit (W; conj= true )) == (V1 ⊗ V2 ←
424427 V3 ⊗ V4 ⊗ V5 ⊗ oneunit (V5)' )
425428 @test @constinferred (insertunit (W, 1 )) == (oneunit (V1) ⊗ V1 ⊗ V2 ← V3 ⊗ V4 ⊗ V5)
426429 @test @constinferred (insertunit (W, 3 )) == (V1 ⊗ V2 ⊗ oneunit (V1) ← V3 ⊗ V4 ⊗ V5)
430+ @test @constinferred (removeunit (insertunit (W, 3 ))) == W
427431 @test @constinferred (insertunit (W, 3 ; preferdomain= true )) ==
428432 (V1 ⊗ V2 ← oneunit (V1) ⊗ V3 ⊗ V4 ⊗ V5)
433+ @test @constinferred (removeunit (insertunit (W, 3 ; preferdomain= true ), 3 )) == W
429434 end
430435end
0 commit comments