HaeffnerLab / IonSim.jl

a simple tool for simulating trapped ion systems
https://ionsim.org
MIT License
70 stars 17 forks source link

Heterogeneous chains #98

Closed marwahaha closed 1 year ago

marwahaha commented 2 years ago

fixes #32

The beginning of what Joe's working on

marwahaha commented 1 year ago

I looked at the test that's failing. It's reporting that the ionposition isn't correct. But it's actually correct, up to a scaling (I think it's off by a factor of 1.3785e-08, but I don't know why.) Hope this helps

        cmode = [-0.06392393573, -0.0202155287427, 0.0202155287427, 0.0639239357]
        if ionposition(lc.ions[1]) > 0
            cmode .*= -1
        end
        @test [ionposition(I) for I in lc.ions] ≈ cmode rtol = 1e-6