Deviation between analytical and numerical solutions

25 views
Skip to first unread message

Or Golan

unread,
Mar 26, 2024, 9:50:13 AMMar 26
to QuTiP: Quantum Toolbox in Python
Hi,

I'm trying to simulate the Hamiltonian

H = g1 Z1 (b+bdagger) + g2 Z2 (b + bdagger) + ϵ bdagger*b

where Z1, Z2 are the Pauli Z operators on qubits 1,2, and b is the destroy operator on some QHO (say a 3 level system). And I want to find the expectation value of b over time.

This can be solved analytically in the rotating frame to obtain

<b> = b + (1-exp(-iϵt))(g1 Z1 + g2 Z2)/ϵ
Which results in a circle when we plot the imaginary/real parts.

When I try to find the expectation value numerically, by evolving in time a set of states (either specific states or the eigenstates of the Hamiltonian), I get a dramatically different result. Here is the code:
-------------------
import qutip
import numpy as np
import matplotlib.pyplot as plt

g1 = 5.6
g2 = 6.0

z1 = qutip.tensor(qutip.sigmaz(), qutip.qeye(3), qutip.qeye(2))
z2 = qutip.tensor(qutip.qeye(2), qutip.qeye(3), qutip.sigmaz())
b = qutip.tensor(qutip.qeye(2), qutip.destroy(3), qutip.qeye(2))

H = g1 * z1 * (b.dag() + b) + g2 * z2 * (b.dag() + b) + ϵ*b.dag()*b

energies, states = H.eigenstates()
# states = [qutip.tensor(qutip.basis(2, i), qutip.basis(3, 0), qutip.basis(2, j)) for i in range(2) for j in range(2)]

for s in states:
    solve = qutip.sesolve(H, s, np.linspace(0, tau/ϵ))
    p = [qutip.expect(b, x) for x in solve.states]
    plt.plot(np.real(p), np.imag(p))
    plt.show()

--------------

Any idea what I'm doing wrong?

Paul Menczel

unread,
Mar 27, 2024, 3:01:00 AMMar 27
to QuTiP: Quantum Toolbox in Python
Hi,

I am not exactly sure how you got to that analytical solution, but you say it is in a rotating frame. Are you maybe missing a transformation into that rotating frame?
Also, I think 3 might be a bit low for the Fock space cutoff.

Best
Paul

Or Golan

unread,
Mar 27, 2024, 4:14:49 AMMar 27
to qu...@googlegroups.com
Thanks,

To solve analytically:

We have
Going to the Magnus expansion, we see that the 3rd order is already 0, so the analytical solution is just the second order Magnus expansion.
Returning to the lab frame will just be a e^{-I\epsilon t} factor.


I went for 3 as a cutoff since I’m not populating the QHO at any time.

Cheers,
Or

--
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/zlQ5lsul4yI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/e15b83e2-301e-4f88-872e-bdf0e1a6b473n%40googlegroups.com.

Or Golan

unread,
Mar 27, 2024, 4:25:24 AMMar 27
to qu...@googlegroups.com
You were right - a higher cutoff fixed the problem. Thanks!
Reply all
Reply to author
Forward
0 new messages