-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing the Ion position after time evolution #117
Comments
You can construct a position operator from the creation and annihilation operators of some chosen vibrational mode: So if |
Thanks! What about the By the way the result I get: What I did was basically: # define the x position operator in the composite basis of sol:
m = mass(ca)
ω = 2π*ν
ion1=ions(chamber)[1]
ion2=ions(chamber)[2]
ion3=ions(chamber)[3]
mode_x=modes(chamber)[1]
mode_y=modes(chamber)[2]
mode_z=modes(chamber)[3]
x̂_op = sqrt(ħ/(2. *m*ω))*(IonSim.destroy(mode_x) + IonSim.create(mode_x))
x̂₍composite₎ = one(ion1) ⊗ one(ion2) ⊗ one(ion3)⊗ x̂_op ⊗ one(mode_y) ⊗ one(mode_z); # we need to adapt to the basis of sol
ŷ_op = sqrt(ħ/(2. *m*ω))*(IonSim.destroy(mode_y) + IonSim.create(mode_y))
ŷ₍composite₎ = one(ion1) ⊗ one(ion2) ⊗ one(ion3)⊗ one(mode_x) ⊗ ŷ_op ⊗ one(mode_z); # we need to adapt to the basis of sol
ẑ_op = sqrt(ħ/(2. *m*ω))*(IonSim.destroy(mode_z) + IonSim.create(mode_z))
ẑ₍composite₎ = one(ion1) ⊗ one(ion2) ⊗ one(ion3)⊗ one(mode_x) ⊗ one(mode_y) ⊗ ẑ_op; # we need to adapt to the basis of sol
x_vals = real.(expect(x̂₍composite₎, sol))
y_vals = real.(expect(ŷ₍composite₎, sol))
z_vals = real.(expect(ẑ₍composite₎, sol));
p=plot(T,x_vals*1e12,label=L"x")
plot!(T,y_vals*1e12,label=L"y")
plot!(T,z_vals*1e12,label=L"z")
xlabel!("time [μs]")
ylabel!("position [fm]")
savefig("plot.png")
@show p |
Hmm, okay, I think I understood that The 2nd thing which I find confusing: what dimension are these positions along? Do we just always assume a ### trap and then it's along the long axis? Looking at https://github.com/HaeffnerLab/IonSim.jl/blob/master/src/iontraps.jl#L112, the distances are basically just a function of the number of ions ... |
You are correct; there is not built-in position operator, so you would need to construct it yourself for each ion as the appropriate sum of contributions from all motional modes. To answer your second question, yes, in IonSim the ions are always along a single axis, the z-axis. The position is always along that axis. |
Alright, thanks, this already brought some clarity :) |
Hi,
it is not clear to me how can I access the position of the ion after performing time evolution of the system, as described in https://examples.ionsim.org/
I guess it should also be done via
expect()
, but how should I construct (and use) the right ion position operator if the solution has a composite basis like:Sorry if it's a noob question, but this is who I am in this context 🙈
The text was updated successfully, but these errors were encountered: