Parallel calculation was invalid when resolve a high dimension Bloch-Redfield equation

34 views
Skip to first unread message

lee Albert

unread,
Nov 1, 2017, 8:32:06 AM11/1/17
to QuTiP: Quantum Toolbox in Python
Qutip is a very nice tool of quantum optics. It even is a non-markovian system friendly solver.
The Bloch-Redfield master equation solver(BRMES) work efficiently when the dimension is low, but lose parallel computing ability as I think.

My Hamiltionian have two mode which I want use N=20 built operators.

a_1 =tensor( destroy(N), qeye(N))

When N is small such as N=8, CPU using rate is near 2000%(There  are 32 core or processor in my server). when N = 16 or high cpu using rate always 100% even N = 40 also is 100% which show only core work in this situation.

I import  cProfile module to analyze the program. I'd like to show the picture.


Qutip pay its most computing time in call integrator of scipy module. The function scipy.integrate._ode.run() take most calculation.


Considering my limited knowledge of python, this problem is very difficult for me. Are there some master-hand can help me?



 your sincerely

Hanqing  



lee Albert

unread,
Nov 1, 2017, 8:36:05 AM11/1/17
to QuTiP: Quantum Toolbox in Python
uTiP: Quantum Toolbox in Python
Copyright (c) 2011 and later.
A. J. Pitchford, P. D. Nation, R. J. Johansson, A. Grimsmo, and C. Granade

QuTiP Version:      4.2.0
Numpy Version:      1.13.3
Scipy Version:      1.0.0
Cython Version:     0.27.2
Matplotlib Version: 2.0.2
Python Version:     3.5.2
Number of CPUs:     16
BLAS Info:          OPENBLAS
OPENMP Installed:   False
INTEL MKL Ext:      False
Platform Info:      Linux (x86_64)
Installation path:  /usr/local/lib/python3.5/site-packages/qutip



%%time
N = 40
a_1 = destroy(N)
a_2 = destroy(N)
a_1 = tensor(a_1,qeye(N))
a_2 = tensor(qeye(N),a_2)
H = a_1.dag() * a_1 +  2 *  a_2.dag() * a_2+  0.1 * (a_1.dag() * a_2 + a_2.dag() * a_1)
psi0 = tensor(basis(N,3),basis(N,1))
kappa = 0.2
a_ops = [ [a_1 + a_1.dag(), '{kappa} * exp(-t) * (w >= 0)'.format(kappa=kappa)]]
tlist = np.linspace(0,1,10)
cProfile.run('out = brmesolve(H, psi0, tlist, a_ops, e_ops=[a_1.dag() * a_1, a_2.dag() *a_2])','cprofile40.log')
actual_answer = 9.0 * np.exp(-kappa * (1.0 - np.exp(-tlist)))


在 2017年11月1日星期三 UTC+8下午8:32:06,lee Albert写道:

Paul Nation

unread,
Nov 1, 2017, 8:54:27 AM11/1/17
to QuTiP Group
The parallelism in the BR solver is mainly controlled by the underlying BLAS implimentation.  My guess is that maybe at large system sizes the serial parts of the code dominate the runtime.

-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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lixun.dlut

unread,
Nov 1, 2017, 9:22:03 AM11/1/17
to nonher...@gmail.com, qu...@googlegroups.com
as your view, large size should be better. BLAS may have a better advantage ?



发自我的小米手机
在 Paul Nation <nonher...@gmail.com>,2017年11月1日 下午8:54写道:
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.

--
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/olXNyh20mxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qutip+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages