Comments (5)
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)
.
from quantumcumulants.jl.
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.
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
from quantumcumulants.jl.
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.
from quantumcumulants.jl.
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
.
from quantumcumulants.jl.
@ChristophHotter Thanks a lot for your reply! I will have it a go!
from quantumcumulants.jl.
Related Issues (20)
- Adjoint of CNumber not defined HOT 4
- MTKParameterCtx ist not defined HOT 1
- Defining Pauli Matrices
- CorrelationFunction with steady_state = false HOT 2
- Superradiant Example: Correlation between atoms
- _new_operator(nOp::NumberedOperator) HOT 1
- scale sums: prefactor N or (N-1) HOT 4
- Correlation functions with time dependent Hamiltonians fails to solve HOT 1
- define real number parameter? HOT 3
- How can I define the transition operator with two subscripts? HOT 1
- Including noise terms in the symbolic derivation HOT 2
- How to choose the right algorithm to compute the differential equation HOT 1
- How to represent sigma_z ? HOT 1
- Sums with different sum indices don't get simplified HOT 1
- Sums with IndexedVariable simplifies incorrectly HOT 1
- ⟨σ_112⟩(t) exceed 1 when setting `order=3` HOT 3
- Periodic boundary conditions HOT 1
- `change_index` not working for a summed term HOT 2
- `IndexedVariable` with a time-dependence HOT 3
- Typed parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantumcumulants.jl.