Re: Completely Time Dependent Hamiltonian

331 views
Skip to first unread message

Paul Nation

unread,
Oct 25, 2012, 11:33:47 PM10/25/12
to qu...@googlegroups.com
Andrew,

The master equation solver, mesolve, does not need a time-independent
term to work, but the monte carlo method does. I have attached an
example that has a completely time-dependent Hamiltonian on line #45.
If you want to use the monte-carlo method, you could always define an
arbitrary time-independent term H0 and multiply it by zero. This
requirement may be removed in the future, but for now this is the best
way to go.

Cheers,

Paul


On 10/26/2012 03:47 AM, Andrew Glaudell wrote:
> Hello,
>
> My name is Andrew, and I am an undergraduate using this
> nifty software for modeling spin qubits open to the environment with a
> time dependent magnetic field (direction and magnitude). I've been
> using your guide to try and write a time dependent Hamiltonian, and I
> noticed that both the string and function based methods require at
> least one time independent term. This is unfortunately impossible for
> me, because at some point during the simulation, we would like to
> potentially shut off the magnetic field. This means no terms of the
> Hamiltonian are independent of time, of course, regardless of which
> frame is chosen.
>
> This leaves the Hamiltonian function method for me to use; however,
> the collapse operators I am using are dependent on time themselves, as
> we would like to model pure dephasing of the qubit along the direction
> of the magnetic field (which as stated before, is time dependent).
> Thus, the Hamiltonian function method is not usable.
>
> Perhaps it's due to my lack of experience on the topic/ with QuTiP
> (had to run a personal crash course on python coding and density
> matrix theory for this project over the course of a month or so), but
> I don't necessarily see a solution to my problem. Do you have any
> suggestions to aid me?

only_td_H.py

Andrew Glaudell

unread,
Nov 1, 2012, 4:10:00 AM11/1/12
to qu...@googlegroups.com
Thanks for the example, for some reason I had convinced myself it needed a time independent term.

I am also curious as to whether it is possible to utilize the script method if time dependent matrix elements of an operator are needed. Because I am working in a frame with a changing magnetic field direction, I need a dephasing operator that changes under a unitary rotation transformation. Because this rotation transformation is dependent on the time dependent angle of the magnetic field, I would need a time dependent matrix within the script portion of the Collapse operator definition. Is this possible at all, or will I just need to define a function for the time dependence?

Again, sorry for my green thumb with this toolbox, and thanks a lot for your help.

Robert Johansson

unread,
Nov 3, 2012, 9:37:33 PM11/3/12
to qu...@googlegroups.com
Hi Andrew

If you have a Hamiltonian or collapse operators with a time-dependence that is more complicated than what can be described by a time-dependent coefficient for the operator, you might have to use the python function callback method. That is going to be a lot slower but is also much more general. However, in your case I am guessing that you could divide the time dependence of the operator in two terms. For example, if you have an operator that changes between sigmax and sigmaz depending on the direction of the magnetic field, you could split it in two operators 

[[sigmax(), 'cos(theta(t))'], [sigmaz(), 'sin(theta(t))']]

where theta(t) could be the direction of your magnetic field as a function of time (just as an example). If you cant write the operators using this method you have to use the function callback method.

Best regards
Robert
Reply all
Reply to author
Forward
0 new messages