Skip to content

Commit

Permalink
fix bugs for multi-dimension trajectories
Browse files Browse the repository at this point in the history
  • Loading branch information
EigenSolver committed Aug 20, 2024
1 parent fc0af56 commit 77cef6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SpinShuttling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function OneSpinModel(Ψ::Vector{<:Complex}, T::Real, N::Int,
B::GaussianRandomField, x::Function)

t = range(0, T, N)
P = collect(zip(t, x.(t)))
f(x::Function, t::Real) = (t, x(t)...)
P = f.(x, t)
R = RandomFunction(P, B)
model = ShuttlingModel(1, Ψ, T, N, B, [x], R)
return model
Expand Down

0 comments on commit 77cef6d

Please sign in to comment.