Skip to content
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

Negative photon number with a coherent driving #107

Open
eric940109 opened this issue Jun 17, 2022 · 5 comments
Open

Negative photon number with a coherent driving #107

eric940109 opened this issue Jun 17, 2022 · 5 comments

Comments

@eric940109
Copy link

Dear QuantumCumulants developer,

I attempted to add a coherent driving term \eta*(a'-a) in the Hamiltonian, and the resultant time evolution of the photon number <a'a> contains huge negative values when \eta was simply chosen to be 1 (ode solver failed when \eta becomes larger, e.g. 10^5). When \eta is 0, the time evolution of the photon number looks correct. Please see the attached figure.

May I ask whether QuantumCumulants is suitable for simulating the coupling between many atoms and a single cavity mode under a coherent driving of the cavity mode?
Coherent driving

Thank you!

Best wishes,
Eric

@ChristophHotter
Copy link
Member

Hi @eric940109

Yes QuantumCumulants is usually well suited for this problem (depending on the parameter regime).
I think in your case the mistake is that the Hamiltonian is not hermitian (which is unphysical).
For a real eta (eta = 1) the drive term needs to be eta (a' + a) or i eta (a' - a).

@eric940109
Copy link
Author

Hi @ChristophHotter

Thanks a lot for your comment! After correcting the drive term, the negative photon numbers seem to still remain. Does this mean my setting of parameters are out of the reasonable parameter regime?

The code and typical results are attached.

issues_220619


M = 2 #order
@cnumbers N Δc Δs g κ γ12 η γ22
hf = FockSpace(:cavity)
ha1 = NLevelSpace(:atom, 2)
ha = ClusterSpace(ha1, N, M)
h = tensor(hf, ha);

@qnumbers a::Destroy(h)
σ(i, j, k) = Transition(h, :σ, i, j)[k]

#Hamiltonian
H = Δc*a'*a + Δs*sum(σ(2,1,i)*σ(1,2,i) for i = 1:M) + g*sum(a'*σ(1,2,i) + a*σ(2,1,i) for i=1:M) + η*(a'+a)

#Collapse operators
J = [a;[σ(1,2,i) for i = 1:M];[σ(2,2,i) for i = 1:M]]
rates = [κ;[γ12 for i = 1:M];[γ22 for i = 1:M]]

#Derive equation
eqs = meanfield([σ(2,2,1)],H,J;rates = rates, order = 2)
eqs_c = complete(eqs, order = 2)

using OrdinaryDiffEq, ModelingToolkit
@named sys = ODESystem(eqs_c)
u0 = zeros(ComplexF64, length(eqs_c))
u0[1] = 1.0
ps = [N, Δc, Δs, g, κ, γ12, η, γ22] #N Δc Δs g κ γ12 η γ22
p0 = [1e14, 0.0, 0.0, 2*π*0.022, 2*π*0.18e6, 1e4, 1e5, 2*π*0.42e6]
prob0 = ODEProblem(sys, u0, (0.0, 8e-5), ps.=>p0)
alg = RK4()
sol0 = solve(prob0, alg)
t0 = sol0.t
q = real.(sol0[a'*a])
using Plots
plot(t0,q)```

Best wishes,
Eric

@ChristophHotter
Copy link
Member

The program itself seems fine.
I think the problem is your parameter set, you have very small and very large numbers at the same time, which is usually hard to solve numerically.

@ChristophHotter
Copy link
Member

I just saw this again. You could also try to reduce the tolerance of the numerics with e.g. sol0 = solve(prob0, Tsit5(); abstol=1e-10, reltol=1e-10.

@eric940109
Copy link
Author

@ChristophHotter Thanks a lot for your reply! I will have it a go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants