Problem in time dependent hamiltonian

224 views
Skip to first unread message

ham as

unread,
Nov 2, 2021, 12:26:24 PM11/2/21
to QuTiP: Quantum Toolbox in Python
Hi everyone,
I have problem in writing the following time dependent Hamiltonian:
how can correct this code?
omega_n, b and A are operators in matrix form!

thanks

2021-11-02_194700.png

Boxi Li

unread,
Nov 2, 2021, 6:43:02 PM11/2/21
to QuTiP: Quantum Toolbox in Python
Hi,

Two points:
- If Omega_n is an operator, it cannot be given as coefficients. The coefficient should be a function that returns a float/complex number. In this case, there is no need to distinguish between coefficients and Hamiltonian. You can write a Python function that returns HI and give it to the solver.
```
def HI(t, args):
    # type the equation of HI here.
mesolve(HI, ...)
```

- For exponentiation of operators, np.exp is wrong. One should use `(-1.j * Omega * times).expm()`, which is same as scipy.linalg.expm

Best, Boxi

Saumya biswas

unread,
Nov 2, 2021, 7:44:35 PM11/2/21
to qu...@googlegroups.com
Hi. Hamsad.

You only gave us the interaction part, H_I of the Hamiltonian.
I am guessing the complete Hamiltonian has a part H_0 with either  (A+A.dag())   or   i(A.dag()-A) in it?

If so, you can move to a rotating frame and have a time independent Hamiltonian. Simulations are easier to do with time independent Hamiltonians. Are you familiar with this trick called Rotating Wave Approximation (RWA)?

Saumya



 

--
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/298bd020-5386-4778-a17c-ef898e2745b8n%40googlegroups.com.

ham as

unread,
Nov 5, 2021, 2:40:15 PM11/5/21
to qu...@googlegroups.com
THAT'S TRUE! THANK YOU VERY MUCH!

--
You received this message because you are subscribed to a topic in the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qutip/IwrqOm4Dkkw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qutip+un...@googlegroups.com.

ham as

unread,
Nov 5, 2021, 2:46:44 PM11/5/21
to qu...@googlegroups.com
Thanks Saumya biswas, yes i familiar with (RWA), but this hamiltonian is in the RWA, can not be eliminate time dependency,
thanks anywaye




Reply all
Reply to author
Forward
0 new messages