Skip to content

Commit e78f077

Browse files
committed
add isfinite tests for FiniteMPS and InfiniteMPS
1 parent 71010ea commit e78f077

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/states.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module TestStates
2424
L = rand(3:20)
2525
ψ = FiniteMPS(rand, elt, L, d, D)
2626

27+
@test isfinite(ψ)
2728
@test @constinferred physicalspace(ψ) == fill(d, L)
2829
@test all(x -> x D, @constinferred left_virtualspace(ψ))
2930
@test all(x -> x D, @constinferred right_virtualspace(ψ))
@@ -99,6 +100,7 @@ module TestStates
99100

100101
ψ = InfiniteMPS([rand(elt, D * d, D), rand(elt, D * d, D)]; tol)
101102

103+
@test !isfinite(ψ)
102104
@test physicalspace(ψ) == fill(d, 2)
103105
@test all(x -> x D, left_virtualspace(ψ))
104106
@test all(x -> x D, right_virtualspace(ψ))

0 commit comments

Comments
 (0)