Speed up of time evolution of simple Hamiltonian

206 views
Skip to first unread message

wgo...@googlemail.com

unread,
Sep 30, 2016, 9:42:24 AM9/30/16
to QuTiP: Quantum Toolbox in Python
Hello QuTiP,

This is probably a question, which is probably not so  intersting, 
because it concerns a Hamiltonian, which is very simple.
I'm trying to calculate the free evolution of a qubit
under a AC field which goes like H(t) = alpha(t) * sigma_z
with a initial state lying in the equatorial plane of the Bloch sphere.
The prefactor is defined through alpha(t) = gamma * sin(omega*t).

I calculate the free evolution using mesolve and a string based Hamiltonian.
Thanks for the feature btw. This brought a great speedup. 
exp_lists = mesolve(H_free_c, t, c_ops,
                    args=args)
For 1000 points this takes about 2 seconds and I wonder if I this can be somehow 
speed up. Of course for this simple Hamiltonian I can just integrate the additional 
phase factor myself, but I thought about extending it by using master equations
and introducing decoherence through bath, which was my original intention of
using QuTiP.

Greetings

nonher...@gmail.com

unread,
Sep 30, 2016, 11:19:50 AM9/30/16
to qu...@googlegroups.com
Sure, for a system as simple as a qubit then yes things could be made faster. The main thing to do would be to use dense matrices instead of sparse ones for small systems. However, we have 300+ functions that assume a sparse format, so supporting such a change is nontrivial. Moreover, there are several other things behind the scenes that take a but of time. For example, there is a Python call between the ode solver and the RHS function that is likely non trivial for such a small system. That being said, once you start going to larger systems, and adding dissipation then these issues go away. 

-P
--
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.

wgo...@googlemail.com

unread,
Oct 4, 2016, 4:29:31 AM10/4/16
to QuTiP: Quantum Toolbox in Python
Ok no problem, 
just wondered if something like that existed. 
Thanks for the explanation. 

Greetings
Reply all
Reply to author
Forward
0 new messages