m_ops in smesolve

95 views
Skip to first unread message

Aniruddha

unread,
Aug 7, 2019, 9:32:33 AM8/7/19
to QuTiP: Quantum Toolbox in Python
I have a qubit-cavity system (annihilation ops ac & aq for cavity and qubit resp) with JC interaction and cavity is driven by sigma x.  I was trying the heterodyne detection part. in heterodyne, I want the values of X quadrature of the cavity and qubit photon number. (i.e ac+ac.dag() and aq.dag()*aq ). However, I'm not sure how to go about it. I tried introducing quadrature of the cavity and qubit photon number in m_ops but I'm not getting expected results.

Eric

unread,
Aug 7, 2019, 12:19:21 PM8/7/19
to QuTiP: Quantum Toolbox in Python
m_ops return the noise + the expected value.
e_ops return the direct expectation value for the given operator.

results.measurement has a measurement for each trajectories.
results.expect return the average over all trajectories.
You can set the keyword "store_all_expect" to True to have results.runs_expect give the expectation values for each trajectories.
Message has been deleted

Jian Zhang

unread,
Aug 7, 2019, 10:39:26 PM8/7/19
to qu...@googlegroups.com
How to get access to expectation values for each trajectories in smesolve? I have set the option as 
options = Options()
options.store_states=True
options.store_all_expect=True
options.average_expect=False
options.average_states=False
and run the simulation for 10 trajectories as "result_sme = smesolve(...)".

When I use the following code to get the expectation for the 10th  trajectory,  it did not work

result_sme.expect[9]
IndexError                                Traceback (most recent call last)
<ipython-input-28-015c4c6cf2cb> in <module>
----> 1 result_sme.expect[9]

IndexError: list index out of range.

By the way, I can get the right result for "mcsolve". I am using qutip-4.3.1.

--
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/c68ae304-5a91-4b1d-9e58-37af5cadf921%40googlegroups.com.

Aniruddha Deshpande

unread,
Aug 8, 2019, 12:20:19 AM8/8/19
to QuTiP: Quantum Toolbox in Python
I know the result.expect and result.measurement. In "result.measurement" does it calculates measurement of given m_ops( for each trajectories ).
I don't want the average over all trajectories. Currently I'm just looking at 1 traj. Also what does giving 2 sc_ops mean ? given sc_ops = [ac , aq] for m_ops = [ac+ac.dag() , aq.dag()*aq] ?

Eric

unread,
Aug 8, 2019, 2:03:50 PM8/8/19
to QuTiP: Quantum Toolbox in Python
Hi zhedie,

store_all_expect is only available from 4.4.0 and is used as smesolve(..., store_all_expect=True).
The result.runs_expect has the non averaged expectation values.
Mcsolve trajectories are similar to those obtained by the photocurrent method of ssesolve, but very different from those of the homodyne and heterodyne method.

4.4.0 has a fully rewritten stochastic solver, faster and supporting higher order algorithm.

Hi Aniruddha Deshpande,

Yes the measurement are computed for each trajectories.
sc_ops are the c_ops that are evolved stochastically. They affect the evolution of the system, not only the measurement.
If you look at http://qutip.org/docs/latest/guide/dynamics/dynamics-stochastic.html#open-system, sc_ops are the C_i and c_ops are the S_n.
In your case, I believe ac should be an sc_ops, but aq should not. e_ops =  [ac+ac.dag() , aq.dag()*aq] and no need to set m_ops. Use homodyne.

The default mesurement operator are build from sc_ops as [[c + c.dag(), -1j * c - c.dag()] for c in sc_ops] (heterodyne), then they are computed as a e_ops but include the Gaussian noise of the stochastic evolution. The noise can easily be stronger than the signal so you probably won't see much with only one trajectory.

zhedie

unread,
Aug 8, 2019, 9:32:45 PM8/8/19
to QuTiP: Quantum Toolbox in Python
Dear Eric, 

Thank you for your reply. I understand how it works now.
Reply all
Reply to author
Forward
0 new messages