Bath terminator for time dependent Hamiltonian

35 views
Skip to first unread message

後藤達也

unread,
Dec 14, 2022, 7:21:39 AM12/14/22
to QuTiP: Quantum Toolbox in Python
Hello, Qutip Team.

Could you tell me how to use the terminator when simulating the time dependent Hamiltonian coupled with the boson bath with the HEOM solver?

I will explain the current situation.
I want to simulate a Landau-Zener model coupled with a Boson bath.
The system Hamiltonian is the image below (time dependent).
v denotes the velocity of driving. 
LZ_Hamiltonian.png

I performed the calculation with reference to the following documents and notebooks, but the success probability exceeded 1 when the sweep speed was slow enough.
Increasing the number of the bath expansion term to retain (Nk in https://qutip.org/docs/latest/guide/heom/bosonic.html) brought the probability of success closer to 1, but greatly increased computation time.
So I thought I should use the terminator, but I have no idea how to handle the time-dependent Hamiltonian.
i.e. the code below will fail where H_sys is QobjEvo.

bath = DrudeLorentzBath(Q, lam, gamma, T, Nk)
delta, terminator = bath.terminator()
HL = liouvillian(H_sys) + terminator

Could you tell me how to use the terminator when simulating the time dependent Hamiltonian coupled with the boson bath with the HEOM solver?
If that is not possible, could you tell me an alternative?

Thank you !

Tatsuya Goto
Jij Inc. 




Jij Inc. : http://www.j-ij.com
Address : SB Building 7F, 1-4-6 NezuBunkyo-ku, Tokyo, Japan, 113-0031
Office Tel: +81 80-2552-3363

ahmed ghareeb

unread,
Dec 14, 2022, 8:07:37 AM12/14/22
to qu...@googlegroups.com
I am not sure about time dependent heom termination

But for low temperature
This decomposition is more efficient than even pade or fano decomposition
Even more you can use time independent termination
Which is already implemented In MATLAB
With best regards
Ahmed


--
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/f9445b6f-2013-4955-90dc-79aeb927134bn%40googlegroups.com.

Simon Cross

unread,
Dec 14, 2022, 8:31:33 AM12/14/22
to qu...@googlegroups.com
Hi Tatsuya,

The following code works for me with QuTiP 4.7.1:

  import qutip
  H = qutip.QobjEvo([[qutip.sigmax(), "-0.5 * t"]])
  L = qutip.liouvillian(H)

So I don't know what has gone wrong in your case. Could you investigate a bit more and reply with a short code snippet that doesn't work and the error you receive if you don't manage to get it to work?

Regarding the bigger picture, it seems a little odd to have the coefficient of sigmaz grow linearly with t. I can't comment on the "probability of success" being larger than 1 without knowing more about what it is.

Regards,
Simon

Simon Cross

unread,
Dec 14, 2022, 8:42:02 AM12/14/22
to qu...@googlegroups.com
Hi Ahmed,

On Wed, Dec 14, 2022 at 2:07 PM ahmed ghareeb <dr.gha...@gmail.com> wrote:
> I am not sure about time dependent heom termination

Termination for time-dependent system Liouvillians is supported in
QuTiP. Indeed the terminator depends only on the bath parameters and
couplings, so it adds only a constant term to the time-dependent
Liouvillian.

> But for low temperature
> This decomposition is more efficient than even pade or fano decomposition
> https://arxiv.org/abs/2211.04089v1

Nice paper. Note that the paper is for a Fermionic bath, and not a
bosonic one. One can use the spectral decomposition described in the
paper in QuTiP by supplying the coefficients directly to Fermionic
Bath (see https://qutip.org/docs/latest/guide/heom/fermionic.html#pade-expansion-coefficients
for a description of how to do this). The TL;DR version is:

bath = FermionicBath(Q, ck_plus_L, vk_plus_L, ck_minus_L, vk_minus_L)

Very happy to add support for another decomposition if there is demand for it.

> Even more you can use time independent termination
> https://aip.scitation.org/doi/10.1063/5.0100365?af=R
> Which is already implemented In MATLAB
> https://github.com/tomfay/heom-lab

As mentioned above, this works in QuTiP too, and in the time-dependent
system case.

Regards,
Simon

ahmed ghareeb

unread,
Dec 14, 2022, 8:46:53 AM12/14/22
to qu...@googlegroups.com
Sorry for my quick reply 
Actually in ref you can find its implementation for bosonic bath 
I am try to add it to qutip 


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

Simon Cross

unread,
Dec 14, 2022, 9:42:31 AM12/14/22
to qu...@googlegroups.com
Hi Ahmed,

> Sorry for my quick reply
> Actually in ref you can find its implementation for bosonic bath
> I am try to add it to qutip

That's awesome! Looking forward to reviewing the pull request.

Could you open the pull request against the dev.major branch if
possible? We're targeting QuTiP 5 (i.e. the dev.major branch) for most
new features.

Regards,
Simon

ahmed ghareeb

unread,
Dec 14, 2022, 10:14:22 AM12/14/22
to qu...@googlegroups.com
Actually now I am working on it 
Within one week I will have free time to complete general function 
To give matsubara and pade 
Three type of it also matsubara as special type of matsubara

About barcentric representatiion 
Stil have bugs on it. now study papers within repo found in mentioned paper above



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

Neill Lambert

unread,
Dec 14, 2022, 10:43:07 AM12/14/22
to qu...@googlegroups.com
Thanks Ahmed, this look very interesting. 

  I am curious if it can outperform direct fitting of the correlations, since in the end it appears to be a way to decompose things more efficiently than normal matsubara or pade approaches into said exponentials?  Though perhaps I am missing some additional trick to it?

All the best
Neill




ahmed ghareeb

unread,
Dec 14, 2022, 10:53:17 AM12/14/22
to qu...@googlegroups.com, Neill Lambert, Simon Cross
@Neill Lambert 
Thanks professor Neil
I am really very thankful for your help when I started learn Heom
Before puplishing bofin
Really I am still silly using git 
And that make a problem with me 
I am still remember it
After I finish work I will send it directly to you and @Simon Cross 
With best wishes 


Simon Cross

unread,
Dec 15, 2022, 6:08:14 AM12/15/22
to 後藤達也, qu...@googlegroups.com, Neill Lambert
On Thu, Dec 15, 2022 at 5:18 AM 後藤達也 <t.g...@j-ij.com> wrote:
> Simon, thank you for your sample code !!
> Your code work fine in my case as well.

Pleasure!

> What effect is max_depth expected to have on the results?

- Nk controls the number of expansion terms used to approximate the
bath correlation function (and hence spectral density).

- The terminator adds a Markovian approximation of the infinite set of
terms discarded from the expansion of the bath correlation function
(terms above Nk).

- max_depth specifies the number of levels to retain in the hierarchy

To tell if a solution has converged, one does typically have to try
higher Nk and max_depths and see if the resulting dynamics change, but
there are also some heuristics:

- If interaction with the environment is weak, one needs only small Nk
and max_depth, and the terminator can capture most of the dynamics.
- If interaction with the environment is strong, one needs a
sufficiently large Nk to accurately model the spectral density of the
environment and then a big enough max_depth to cope with resulting
interactions within the bath / environment itself.

Since with large enough Nk and max_depth the HEOM can potentially
model any open quantum system, fully characterising the dynamics is
challenging, and I'm not aware of any work which does so.

Regards,
Simon

後藤達也

unread,
Dec 15, 2022, 9:25:13 AM12/15/22
to qu...@googlegroups.com, Neill Lambert, Simon Cross
Ahmed, Simon, thank you for your reply.

Ahmed, the papers you sent is very helpful. Thank you.

Simon, thank you for your sample code !!
Your code work fine in my case as well.
My failure was caused by H_sys being a list (this is fine when not using the terminator)
H_sys = [H0, [sigmax(), fx_t], [sigmaz(), fz_t]]

May I ask you two additional questions?

Is there a good way to improve accuracy other than increasing Nk?
Using the terminator solved the problem of the ground state probability exceeding 1, but, it seems that there is a problem with accuracy even if the terminator is used with Nk = 2.
(Increasing to Nk=20 gives reasonable results for the probability of obtaining the ground state).
Is increasing Nk and accepting increased computation time a good way to increase accuracy?

What effect is max_depth expected to have on the results? Could you tell me if there are any tips for adjusting max_depth? 
Like Nk, I expected that increasing max_depth would increase computation time and improve accuracy, but even if max_depth is increased from 5 to 20, computation time and accuracy are almost the same.

Below is my full code.

Thank you !

Tatsuya Goto
Jij Inc.


import numpy as np
import matplotlib.pyplot as plt

from qutip import basis, sigmax, sigmaz, Qobj, QobjEvo, expect, liouvillian

from qutip.nonmarkov.heom import DrudeLorentzBath
from qutip.nonmarkov.heom import DrudeLorentzPadeBath
from qutip.nonmarkov.heom import HEOMSolver
from qutip import Options

# Hamiltonian properties
v = 0.1 # sweep velocity

# Bath properties:
gamma = 0.5  # cut off frequency
lam = 0.1  # coupling strength
T = 0.1  # temperature
Q = sigmaz() # System-bath coupling operator:
Nk = 2 # Number of expansion terms to retain:

# Solver properties:
max_depth = 5 # maximum hierarchy depth to retain
options = Options(nsteps=10000, store_states=True) # solver option

# time step run
tstart = -100
tend = 100
ttotal = 400.
tlist = np.linspace(tstart, ttotal, tend)

# Initial state of the system:
rho0 = basis(2,1)
print(rho0)
system_initial_state = rho0 * rho0.dag()


# Hamiltonian
def fz_t(t):
    return -  v * t / 2

def fx_t(t):
    return - 1 / 2

H0 = 0.0 * sigmaz()
H_sys = QobjEvo([H0, [sigmax(), fx_t], [sigmaz(), fz_t]])

# Matsubara expansion bath:

bath = DrudeLorentzBath(Q, lam, gamma, T, Nk)
delta, terminator = bath.terminator()
HL = liouvillian(H_sys) + terminator

# solver
solver = HEOMSolver(HL, bath, max_depth=max_depth, options=options)

# solve
res = solver.run(system_initial_state, tlist)

# plot result

P0 = expect(res.states, basis(2,0)*basis(2,0).dag())
P1 = expect(res.states, basis(2,1)*basis(2,1).dag())

fig = plt.figure(figsize=(5, 3))
ax = fig.add_subplot(111)

ax.plot(tlist, P0)
ax.plot(tlist, P1)
print(f"the ground state probability:{P0[-1]}")

2022年12月15日(木) 0:53 ahmed ghareeb <dr.gha...@gmail.com>:
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/a8ry7XBq3zU/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/CANchQyL_3taAV3cAFY3gy1SsqfByrhQ2zwtqwUHFRbTkggAJrg%40mail.gmail.com.

ahmed ghareeb

unread,
Dec 15, 2022, 3:03:40 PM12/15/22
to qu...@googlegroups.com, Simon Cross
@Simon Cross 
For mode number could be terminated by tanimura method which is implemented in qutip
But for depth termination
Could br terminated by Markovian approximation which is implemented in pyrho 
But as I see it need to represent q operator in Eiegenbasis of Hamiltonian so it limited to time independent Hamiltonian
However it return time dependent term 
You can see first paper which use new truncation which return time independent 

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

Simon Cross

unread,
Dec 16, 2022, 6:40:48 AM12/16/22
to ahmed ghareeb, qu...@googlegroups.com
Thanks, Ahmed. The pyrho hierarchy termination term idea is super
interesting. I've added it to my (somewhat long) list of features to
look at for QuTiP's implementation.

ahmed ghareeb

unread,
Dec 17, 2022, 4:18:04 PM12/17/22
to qu...@googlegroups.com, Neill Lambert
@Neill Lambert 
If you look at critical damped Brownian motion Spectral Density.
Correlation function at the end is not exponential


On Wed, 14 Dec 2022, 17:43 Neill Lambert, <nwla...@gmail.com> wrote:

ahmed ghareeb

unread,
Dec 17, 2022, 9:48:49 PM12/17/22
to qu...@googlegroups.com, Neill Lambert
I have an idea up till now didn't test it
Even you don't have anlytical formula for correlation function 
You can do it numerically and then fit it in exponential way

Three are two way to get correlation function from spectral density 

First by fast Fourier transforms
Second method by direct numerical integration

Reply all
Reply to author
Forward
0 new messages