using IonSim
using QuantumOptics
# Construct the system
C = Ca40([("S1/2", -1/2), ("D5/2", -1/2)])
set_sublevel_alias!(C, Dict("S" => ("S1/2", -1/2),
"D" => ("D5/2", -1/2)))
L1 = Laser(ϕ=π); L2 = Laser() # note the π-phase between L1/L2
chain = LinearChain(ions=[C, C], com_frequencies=(x=3e6, y=3e6, z=2.5e5),
vibrational_modes=(;z=[1]))
T = Trap(configuration=chain, B=6e-4, Bhat=(x̂ + ẑ)/√2,
lasers=[L1, L2])
mode = T.configuration.vibrational_modes.z[1]
# Set the laser parameters
ϵ = 10e3
d = 350 # correct for single-photon coupling to sidebands
L1.λ = transitionwavelength(C, ("S", "D"), T)
L2.λ = transitionwavelength(C, ("S", "D"), T)
L1.Δ = mode.ν + ϵ - d
L2.Δ = -mode.ν - ϵ + d
L1.k = L2.k = ẑ
L1.ϵ = L2.ϵ = x̂
# set 'resonance' condition: ηΩ = 1/2ϵ
η = abs(get_η(mode, L1, C))
E = Efield_from_pi_time!(η/ϵ, T, 1, 1, ("S", "D"))(0)
Ω = t -> t < 20 ? E * sin(2π * t / 80)^2 : E # ampl. ramp
L1.E = L2.E = Ω
# Build Hamiltonian
h = hamiltonian(T, lamb_dicke_order=1, rwa_cutoff=Inf)
# Solve
t, sol = timeevolution.schroedinger_dynamic(0:.1:220, C["S"] ⊗ C["S"] ⊗ mode[0], h);
|
import PyPlot
const plt = PyPlot
SS = expect(ionprojector(T, "S", "S"), sol)
DD = expect(ionprojector(T, "D", "D"), sol)
SD = expect(ionprojector(T, "S", "D"), sol)
DS = expect(ionprojector(T, "D", "S"), sol)
plt.plot(t, SS, label="SS")
plt.plot(t, DD, label="DD")
plt.plot(t, SD, label="SD")
plt.plot(t, DS, label="DS")
plt.plot(t, @.(Ω(t) / 2E), ls="--", label="scaled ramp")
plt.legend(loc=1)
plt.xlim(t[1], t[end])
plt.ylim(0, 1)
plt.xlabel("Time (μs)")
plt.grid()
|