Skip to content

Commit

Permalink
add a simple extra test to the steady state solver (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov authored Jun 19, 2023
1 parent 03ccf40 commit 9284519
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_steadystate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ Jdense = map(dense, J)
ψ0_p = fockstate(fockbasis, 0)
ρ0_p = dm(ψ0_p)

Ψ∞ = spindown(spinbasis) fockstate(fockbasis, 0)
ρ∞ = dm(Ψ∞)

tout, ρt = timeevolution.master([0,100], ρ₀, Hdense, Jdense; reltol=1e-7)

tss, ρss = steadystate.master(Hdense, Jdense; tol=1e-4)
@test tracedistance(ρss[end], ρt[end]) < 1e-3
@test tracedistance(ρss[end], ρ∞) < 1e-3
@test tracedistance(ρ∞, ρt[end]) < 1e-3

ρss = steadystate.eigenvector(Hdense, Jdense)
@test tracedistance(ρss, ρt[end]) < 1e-6
Expand Down

0 comments on commit 9284519

Please sign in to comment.