Time-dependent collapse operator

784 views
Skip to first unread message

vaia....@gmail.com

unread,
Aug 9, 2013, 11:52:26 AM8/9/13
to qu...@googlegroups.com
Hello,

I'm new to both QuTip and Python (I'm a Matlab user) and I would be grateful if you could help me with something.

I'm trying to implement a Lindblad equation with time-dependent operators. According to QuTip documentation, a time-dependent operator must be written as [C,C_coef] where C is a constant Qobj and C_coef is a function of time. But I've got an operator that looks like [[f(t),g(t)],[h(t),k(t)]]; ie it can't be written as f(t)[[a,b],[c,d]]. How do I pass that on to mesolve?

Thanks in advance.

Vaia

jrjoh...@gmail.com

unread,
Aug 11, 2013, 11:49:39 AM8/11/13
to qutip group
Hi

It is possible to solve this type of problem with mesolve, but it takes a few tricks.. The best solution would be if the c_ops argument could be a callback function that generates the collapse operators or the liouvillian for a given time step, in the same way as the H argument can be a callback function. However, this is not implemented in the latest qutip release, but I'll create an issue for it on github and we'll try to make implement it before next release.

The way you can solve this problem with mesolve in qutip 2.2 is to work with callback function for the Hamiltonian, which actually should return the Hamiltonian in superoperator form. Since the Hamiltonian callback function return a superoperator, this can equally well be the entire system Liouvillian. For example, the following are all equivalent

1)

result = mesolve(H, rho0, tlist, c_ops, e_ops)

2)

L = liouvillian(H, c_ops)
result = mesolve(L, rho0, tlist, [], e_ops)

3)

L = liouvillian(H, c_ops)
def L_func(t, args):
    """ This callback function is supposed to return the data of a superoperator, hence the L.data """
    return L.data   

result = mesolve(L_func, rho0, tlist, [], e_ops)


In option 3) you have a callback function that is called for each time step and which constructs the system Liouvillian  Here you are free to construct the collapse operators or Liouvillian in whichever way you want, so going back to your question, you could do something like

def f(t):
    return ....  # return a Qobj operator

def g(t):
    return .... # return a C-number coefficient

def L_func(t, args):
    """ This callback function is supposed to return the data of a superoperator, hence the L.data """
    L = liouvillian_fast(H, [[f(t),g(t)],[h(t),k(t)]])
    return L.data

result = mesolve(L_func, ket2dm(psi0), tlist, [], e_ops)


Rob
Reply all
Reply to author
Forward
0 new messages