Skip to content

Commit

Permalink
minor changes for Schatten p-norm runtests
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang committed May 18, 2024
1 parent ef01d3b commit 3fe2450
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/quantum_objects.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@
vd = Qobj( rand(ComplexF64, 10))
vs = Qobj(sprand(ComplexF64, 100, 0.1))
Md = Qobj( rand(ComplexF64, 10, 10))
Ms = Qobj(sprand(ComplexF64, 10, 10, 0.1))
Ms = Qobj(sprand(ComplexF64, 10, 10, 0.5))
@test svdvals(vd)[1] (vd' * vd)
@test svdvals(vs)[1] (vs' * vs)
@test norm(Md, 1) sum(sqrt, abs.(eigenenergies(Md' * Md)))
@test norm(Ms, 1) sum(sqrt, abs.(eigenenergies(Ms' * Ms)))
@test norm(Md, 1) sum(sqrt, abs.(eigenenergies(Md' * Md))) atol=1e-6
@test norm(Ms, 1) sum(sqrt, abs.(eigenenergies(Ms' * Ms))) atol=1e-6

# trace distance
ψz0 = basis(2, 0)
Expand Down

0 comments on commit 3fe2450

Please sign in to comment.