Is it a numerical problem for g^{(2)}(\tau) to have quite wild oscillations?

43 views
Skip to first unread message

Pu ZHANG

unread,
Oct 22, 2016, 3:09:56 AM10/22/16
to qu...@googlegroups.com
Dear all, 

When I look at the correlation function g^{(2)}(\tau), which is calculated by calling the function coherence_function_g2(H, taus, c_ops, a), the function shows quite wild oscillations. One such example is enclosed with this email. I'm not sure whether the result really tells the physics, or it's just some numerical noises. In case it's numerical error, how could I improve the precision? 

Thanks! 

Best regards, Pu Zhang

--
Faculty at School of Physics, Huazhong University of Science and Technology
Room 819 (N.), Yifu Science and Technology Building
1037 Luoyu Road, Wuhan, China
g2tau_g0.1_pumps400.0-400.0_N30.png

Pu ZHANG

unread,
Oct 22, 2016, 3:12:11 AM10/22/16
to qu...@googlegroups.com
I'm sorry this is the figure I meant to show... 

Best regards, Pu Zhang

--
Faculty at School of Physics, Huazhong University of Science and Technology
Room 819 (N.), Yifu Science and Technology Building
1037 Luoyu Road, Wuhan, China

g2tau_g0.1_pumps100.0-0.02_N20.png

Andrew Dawes

unread,
Oct 22, 2016, 10:41:51 AM10/22/16
to qu...@googlegroups.com
It is likely that something is going wrong, but without the code to review, we can't say much to help. In general, if those fast oscillations are part of the system, you'd need a shorter time-scale (I.e. More points per unit time). Using too coarse a time grid creates many issues but usually the solver throws some warnings if it suspects problems.

Andy

Sent from my phone using voice-recognition software and/or clumsy thumbs, please forgive any typos.
--
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.
For more options, visit https://groups.google.com/d/optout.
<g2tau_g0.1_pumps100.0-0.02_N20.png>

Pu ZHANG

unread,
Oct 23, 2016, 5:00:06 AM10/23/16
to qu...@googlegroups.com
Hi, Andrew! 

Thanks for your reply! Here I enclose an example script to generate the g^{(2)}(\tau) with oscillations. Could you help take a look? 

Best regards, Pu Zhang

--
Faculty at School of Physics, Huazhong University of Science and Technology
Room 819 (N.), Yifu Science and Technology Building
1037 Luoyu Road, Wuhan, China

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.
<g2tau_g0.1_pumps100.0-0.02_N20.png>

--
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.
g2tau.png
g2tau.py

Andrew M.C. Dawes

unread,
Oct 23, 2016, 10:39:01 AM10/23/16
to qu...@googlegroups.com
Yes, looking at your simulation (and this more recent graph), this looks reasonable. The graph you sent before showed very fast oscillations so they were aliasing in the plot. The system is evolving and the oscillations correspond to population and cavity occupation changes. For comparison, here is a notebook that I made for a prior question on this list. It covers a similar system and serves to verify a recent paper by Rebic et al. PRA 69, 035804 (2004):


Of course, QuTiP just does what you tell it to, and I don’t know exactly what system you intend to model so if the oscillations surprise you, I suggest a careful study of the system using other means as well. If your question is “can g2 show oscillations?” then the answer is yes.

Hope that helps,
Andy


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.
<g2tau.png><g2tau.py>

Andrew M.C. Dawes

unread,
Oct 23, 2016, 12:10:51 PM10/23/16
to qu...@googlegroups.com
Also, for anyone else using the notebook I linked, you will need to update the calls to coherence_function_** if you are using the latest dev version (4.0.0-dev) from github. For example:

g1, G1 = coherence_function_g1(H, None, taus, c_ops, a)

since the new implementation requires an initial state ("None", in this case) and returns two results (both the normalized and un-normalized, g1/G1 respectively.

This change gives the same results as the linked notebook gives for QuTiP 3.1

Andy

Pu ZHANG

unread,
Oct 23, 2016, 8:46:59 PM10/23/16
to qu...@googlegroups.com
I follow your script in the notebook, and observe oscillations in photon number as well. Then I guess the oscillations physical processes. Thanks again, Andrew! 

Best regards, Pu Zhang

--
Faculty at School of Physics, Huazhong University of Science and Technology
Room 819 (N.), Yifu Science and Technology Building
1037 Luoyu Road, Wuhan, China

<g2tau.png><g2tau.py>


Reply all
Reply to author
Forward
0 new messages