Skip to content

Commit

Permalink
Fix instability
Browse files Browse the repository at this point in the history
  • Loading branch information
ddahlbom committed Oct 10, 2024
1 parent e4c7be4 commit e811fcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_entangled_units.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ end
ω_ref(q, J, J′) = J*sqrt(1 + 2(J′/J) * cos(2π*q))
ωs_analytical = ω_ref.([q[1] for q in qs], J, J′)

set_field!(esys, [0, 0, 0])
for unit in Sunny.eachunit(esys)
set_coherent!(esys, [0, 1/√2, -1/√2, 0], unit)
end
swt = SpinWaveTheory(esys; measure=Sunny.empty_measurespec(sys), regularization=0.0)
disp = dispersion(swt, qptss)
disp = dispersion(swt, qpts)
ωs_numerical = disp[1,:]

@test all(both -> isapprox(both[1], both[2]; atol=1e-12), zip(ωs_analytical, ωs_numerical))
Expand Down

0 comments on commit e811fcb

Please sign in to comment.