Master equation with QuTiP

524 views
Skip to first unread message

Simone Incardona

unread,
May 30, 2020, 10:02:12 AM5/30/20
to QuTiP: Quantum Toolbox in Python
Hi
I would like to simulate this master equation with QuTiP

Schermata 2020-05-28 alle 16.58.14.png

but I don't know how insert the term in the second line in the code. This is the so called "cascaded formalism" used for eliminate any feedback from the system (reservoir) to the input modes. This term is different from the classical term in the master equation. I'd like to know how insert this term in the "mesolve" function to evaluate the temporal evolution.
Thanks for future answers.

Jake Lishman

unread,
May 30, 2020, 12:54:23 PM5/30/20
to QuTiP: Quantum Toolbox in Python
Hi Simone,

If your equation can't be put in a Lindblad form, then you can simulate this in QuTiP by providing a callback function to mesolve which returns the Liouvillian superoperator at any point in time.  Instead of passing a separate c_ops list, define something like
# Constant terms (first line)
constant_liouvillian
= qutip.liouvillian(H, c_ops)

def my_liouvillian(t: float, args: dict):
 
out = constant_liouvillian.copy()
 
# second line
 
for k in range(ks):
   
for j in range(js):
     
out = out + 1j * f[k](t) * W[j](...)
 
# third line
 
for k in range(ks):
   
out += (0.5j*eta/gamma) * f[k](t) * qutip.lindblad_dissipator(a[k])
 
return out
so that the function my_liouvillian returns the right-hand side of your expression.  In mine, I use qutip.liouvillian to create the constant part that can be expressed in Lindblad form, and then the for loops are just adding in the extra terms of your second line, and the time-dependent parts of the last line.  Without knowing what is going on in the $W^{in}_j$ function, it's hard to know how you'd write it explicitly in super-operator form, but you'll want to use the functions in `qutip.superoperator` to make sure that you're constructing the correct thing.

You then pass this directly to mesolve
state = qutip.basis(20, 0)
times
= np.linspace(0, 1, 101)
result
= qutip.mesolve(my_liouvillian, state, times)
Notice how I didn't pass any c_ops to mesolve, because they're included in my_liouvillian.

Jake

Paul Nation

unread,
May 30, 2020, 1:01:06 PM5/30/20
to qu...@googlegroups.com
Also look into the spre and spost functions. You can give them any operator you like. 

On May 30, 2020, at 12:54, Jake Lishman <jakel...@gmail.com> wrote:


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/20486c48-7933-46ad-bc60-3bafaa1cbb8a%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages