dealing w/ N 2-level atoms

229 views
Skip to first unread message

Sofia Pazzagli

unread,
Jun 8, 2015, 6:56:09 AM6/8/15
to qu...@googlegroups.com
Dear all,
I am a complete newb to the coding and programming world and I pre-apologize for my (probably stupid) questions!
I am trying to reproduce the Tavis-Cummings model (M equal 2-level atoms coupled to a single-mode cavity in resonance + dissipation) with the ambition to write a versatile code able to address both individual and collective atomic dynamics.
I am having problem with the tensor product building the matrix representation of the Hamiltonian. As I would like to choose an arbitrary M, I tried with a for-loop for the operators in the composite Hilbert space but when i try to build the collective dipole operator Jm and the sum of sigmap()*sigmam() for all M atoms I end up in the "incompatible Qobj.dims" error. 
------------------
# SYSTEM PARAMETERS #
M = 5      # number of atoms
N = 2      # number of cavity fock states
w = 1.0 * 2 * pi  # cavity frequency = atom frequency
g = 0.5      # coupling strength, equal for all atoms
pump = 0.05  # atom excitation rate
gamma = 0.05  # atom dissipation rate
kappa = 0.05  # cavity dissipation rate

# OPERATORS #
sm_list = []      # list of M sigmam() operators in the composite Hilbert space
spsm_list = []      # list of M sigmap()*sigmam() operators in the composite Hilbert space
for j in range(1,M+1): 
    a = 2**(j-1) 
    b = 2**(M-j)
    smj = tensor(qeye(a), sigmam(), qeye(b), qeye(N))
    sm_list.append(smj)
    spsmj = smj.dag()*smj 
    spsm_list.append(spsmj)
spsm = sum(spsm_list)
Jm = sum(sm_list)       # collective dipole operator
a = tensor (qeye(2**M), destroy(N))

# HAMILTONIAN in RWA #
H = w * a.dag() * a + w * spsm + 1j * g * (a.dag() * Jm + a * Jm.dag())

# DISSIPATION: collapse operators #
c_ops = []

# leakage from the cavity
rate = kappa 
if rate > 0.0:
    c_ops.append(np.sqrt(rate) * a)

# ALL atom relaxation: 
decay_list = [] # list of M Lindblad terms relative to spontaneous emission 
rate = gamma
if rate > 0.0:
    for j in (sm_list):
        decay_list.append(np.sqrt(rate) * j)
c_ops.append(sum(decay_list))
    
# ALL atom pumping: 
pump_list = [] # list of M Lindblad terms relative to the pumping
rate = pump
if rate > 0.0:
    for j in (sm_list):
        pump_list.append(np.sqrt(rate) * j.dag())
c_ops.append(sum(pump_list))


# DYNAMICS: Lindblad master equation solver ? #
psi0 = tensor(??)    # initial state
tlist = np.linspace(0,25,1001)   
output = mesolve(H, psi0, tlist, c_ops, []) 

------------------
these are my questions:
0. from the computational point of view, does it make sense to deal with an arbitrary big number of subsystems or is more convenient to write different scripts for fixed values of M?
1. can I (re-)define the dims of each smj operator such that it is [[2,2],[2,2],...,[2,2],[N,N]] rather than the uncorrect [[a,a],[2,2],[b,b],[N,N]]?
2. is there any smarter way to write the operators? this will help also in writing of the c_ops and psi0...
3. since the composite Hilbert space dimension scales with M as 2^M*N which quantum dynamics solver is better to use? 


thank you for your time!
cheers,
sofia



Sofia Pazzagli

unread,
Jun 10, 2015, 11:55:36 AM6/10/15
to qu...@googlegroups.com
Reading more carefully the description of the tensor function I think I (partially) solved my problem with the following:

sm_list = [] 
spsm_list = [] 
for j in range(1,M+1): 
    a = (j-1) 
    b = (M-j)
    smj = tensor([qeye(2)]*a + [sigmam()] + [qeye(2)]*b + [qeye(N)])
    sm_list.append(smj)
    spsmj = smj.dag()*smj 
    spsm_list.append(spsmj)

At least now I have the proper operators dimensions and this answer my own question n.1 which makes me quite happy :). I will continue working on finding the answers of my other questions. any kind of comment (even bad ones!) is really welcome!

cheers!
sofia

Paul Nation

unread,
Jun 10, 2015, 7:46:52 PM6/10/15
to qu...@googlegroups.com
A similar system consisting on N two-level atoms coupled to a cavity mode is discussed in this tutorial:


Perhaps that can be of help.  Also the spin-chain demo may be of use:


- Paul


--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sofia Pazzagli

unread,
Jun 12, 2015, 5:54:17 AM6/12/15
to qu...@googlegroups.com


Thank you very much, Paul!

Sofia

Kamani Gettapola

unread,
Jul 6, 2018, 2:51:06 AM7/6/18
to QuTiP: Quantum Toolbox in Python
Dear Sofia,

I'm quite new to Qutip and I'm also trying to model a system similar to the one you have mentioned here, but with a large amount of two level atoms (~100), including atom-atom interactions as well. Were you able to get the answers for your questions and model your system in a simpler way? Any response from you is highly appreciated. 

Thank you,
Best Regards,
Kamani Gettapola
Reply all
Reply to author
Forward
0 new messages