File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,15 @@ module TestOperators
3131 mpo₁ = FiniteMPO (O₁) # type-unstable for now!
3232 mpo₂ = FiniteMPO (O₂)
3333 mpo₃ = FiniteMPO (O₃)
34+
35+ @test @constinferred physicalspace (mpo₁) == fill (V, L)
36+ Vleft = @constinferred left_virtualspace (mpo₁)
37+ Vright = @constinferred right_virtualspace (mpo₂)
38+ for i in 1 : L
39+ @test Vleft[i] == left_virtualspace (mpo₁, i)
40+ @test Vright[i] == right_virtualspace (mpo₁, i)
41+ end
42+
3443 @test convert (TensorMap, mpo₁) ≈ O₁
3544 @test convert (TensorMap, - mpo₂) ≈ - O₂
3645 @test convert (TensorMap, @constinferred complex (mpo₃)) ≈ complex (O₃)
Original file line number Diff line number Diff line change @@ -267,6 +267,11 @@ module TestStates
267267 @test @constinferred physicalspace (ϕ₁) == physicalspace (ψ)
268268 @test @constinferred left_virtualspace (ϕ₁) == left_virtualspace (ψ)
269269 @test @constinferred right_virtualspace (ϕ₁) == right_virtualspace (ψ)
270+ for i in 1 : period
271+ @test physicalspace (ψ, i) == physicalspace (ϕ₁, i)
272+ @test left_virtualspace (ψ, i) == left_virtualspace (ϕ₁, i)
273+ @test right_virtualspace (ψ, i) == right_virtualspace (ϕ₁, i)
274+ end
270275
271276 @test norm (axpy! (1 , ϕ₁, copy (ϕ₂))) ≤ norm (ϕ₁) + norm (ϕ₂)
272277 @test norm (ϕ₁) * 3 ≈ norm (ϕ₁ * 3 )
You can’t perform that action at this time.
0 commit comments