Skip to content

Commit

Permalink
Merge branch 'master' of github.com:araujoms/Ket.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendesignolle committed Jun 27, 2024
2 parents 918556c + a303bec commit d9f08f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
@test isa(ψ, Vector{R})
ρ = random_state(R, 3)
@test tr(ρ) 1
@test rank(ρ) == 3
@test rank; rtol = Ket._rtol(R)) == 3
ρ = random_state(R, 3, 2)
@test tr(ρ) 1
@test rank(ρ) == 2
@test rank; rtol = Ket._rtol(R)) == 2
ρ = random_state(R, 3, 1)
@test tr(ρ) 1
@test rank(ρ) == 1
@test minimum(eigvals(ρ)) > -Base.rtoldefault(R)
@test rank; rtol = Ket._rtol(R)) == 1
@test minimum(eigvals(ρ)) > -Ket._rtol(R)
@test isa(ρ, Hermitian{R})
T = Complex{R}
ψ = random_state_vector(T, 3)
@test ψ' * ψ 1
@test isa(ψ, Vector{T})
ρ = random_state(R, 3)
@test tr(ρ) 1
@test rank(ρ) == 3
@test rank; rtol = Ket._rtol(R)) == 3
ρ = random_state(T, 3, 2)
@test tr(ρ) 1
@test rank(ρ) == 2
@test rank; rtol = Ket._rtol(R)) == 2
ρ = random_state(T, 3, 1)
@test tr(ρ) 1
@test rank(ρ) == 1
@test minimum(eigvals(ρ)) > -Base.rtoldefault(R)
@test rank; rtol = Ket._rtol(R)) == 1
@test minimum(eigvals(ρ)) > -Ket._rtol(R)
@test isa(ρ, Hermitian{T})
end
end
Expand Down

0 comments on commit d9f08f2

Please sign in to comment.