Hi Ganesh
If you calculate the operator for unitary evolution you will get a 2x2 qobj propagator that you can multiply your initial state (ket) to get the final state:
T = ...
U = propagator(H, T, [], H_args={..})
psi0 = basis(2.0)
psi_T = U * psi0
If you include collapse operators you will get a 4x4 qobj propagator that describes how the density matrix in vector form is transform. So you need to convert your initial state into a density matrix, like this: rho0 = ket2dm(psi0), and then convert it to vector form. We don't have any pretty functions for this yet so its a bit of a trick, which goes something like:
U = propagator(H, T, c_ops, H_args={...})
rho0 = ket2dm(psi0)
rho_vec = mat2vec(rho0.full())
rho_T = Qobj(vec2mat(U.data * rho_vec))
You could also do the same with with Qobj instead of the underlaying sparse matrix data by doing something like:
def rho_vector_form(rho):
return Qobj(mat2vec(rho.full()), dims=[[rho.dims[0]] * 2, [1]])
def rho_matrix_form(rho_vec):
return Qobj(vec2mat(rho_vec.full()))
rho_T_vec = U * rho_vector_form(rho0)
rho_T = rho_matrix_form(rho_T_vec)
Hope this helps,
Rob