Skip to content

Commit

Permalink
De precision fix (#48)
Browse files Browse the repository at this point in the history
* Change tolerances to account for DiffEq.jl version changes

* Remove lower bound on precision in de_tests which failed
  • Loading branch information
zmorrell authored May 24, 2024
1 parent 1ecb807 commit fbb7826
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/simulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ end
ρ = simulate_magnus_generic(one_spin_model, 1.0, AS_CIRCULAR, 100, 4, constant_field_x=[1], constant_field_z=[1])
ρ_de = simulate_de(one_spin_model, 1.0, AS_CIRCULAR, 1e-6, constant_field_x=[1], constant_field_z=[1])

@test isapprox(ρ, ρ_de, atol=1e-9)
@test !isapprox(ρ, ρ_de, atol=1e-10)
@test isapprox(ρ, ρ_de, atol=1e-7)
end

@testset "1 qubit, csv schedule, analytical solution" begin
Expand All @@ -476,8 +475,7 @@ end
ρ = simulate_magnus_optimized(ising_model, 1.0, AS_CIRCULAR, 100, 4)
ρ_de = simulate_de(ising_model, 1.0, AS_CIRCULAR, 1e-6)

@test isapprox(ρ, ρ_de, atol=1e-9)
@test !isapprox(ρ, ρ_de, atol=1e-10)
@test isapprox(ρ, ρ_de, atol=1e-7)
end

@testset "2 qubit, function schedule, long annealing time" begin
Expand Down

0 comments on commit fbb7826

Please sign in to comment.