Skip to content

Commit 6f74698

Browse files
committed
Add insertunit tests for HomSpace
1 parent 27953c8 commit 6f74698

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/spaces.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,5 +419,12 @@ println("------------------------------------")
419419
@test W == @constinferred permute(W, ((1, 2), (3, 4, 5)))
420420
@test permute(W, ((2, 4, 5), (3, 1))) == (V2 ⊗ V4' V5' ← V3 ⊗ V1')
421421
@test (V1 V2 V1 V2) == @constinferred TensorKit.compose(W, W')
422+
@test @constinferred(insertunit(W)) == (V1 ⊗ V2 ← V3 ⊗ V4 ⊗ V5 ⊗ oneunit(V5))
423+
@test @constinferred(insertunit(W; conj=true)) == (V1 ⊗ V2 ←
424+
V3 ⊗ V4 ⊗ V5 ⊗ oneunit(V5)')
425+
@test @constinferred(insertunit(W, 1)) == (oneunit(V1) V1 V2 V3 V4 V5)
426+
@test @constinferred(insertunit(W, 3)) == (V1 V2 oneunit(V1) V3 V4 V5)
427+
@test @constinferred(insertunit(W, 3; preferdomain=true)) ==
428+
(V1 V2 oneunit(V1) V3 V4 V5)
422429
end
423430
end

0 commit comments

Comments
 (0)