I have to simulate the wavefunction of a quantum driven duffing oscillator coupled to a bath of harmonic oscillators. The master equation is given by $\frac{d\rho}{dt}=\frac{i}{\hbar}[\rho,H_{sys}]-\frac{\gamma}{2}(1+\bar n)(a^+a\rho+\rho a^+a-2a\rho a^+)-\frac{\gamma}{2}\bar n(aa^+\rho+\rho aa^+-2a^+\rho a)$. the initial wave-function is a coherent state $|\alpha\gt$.

Note: $a=\frac{1}{\sqrt{2\hbar}}(x+ip)$ and $a^+=\frac{1}{\sqrt{2\hbar}}(x-ip)$ and $\rho$ is density matrix of oscillator.

One method is Monte Carlo Wavefunction method, where I need to perform the following computation:

$|\phi(t+\delta t)\gt=(1-\frac{iH\delta t}{\hbar})|\phi(t)\gt$ where

$H=\frac{p^2}{2}+\frac{x^2}{2}+\frac{x^4}{4}-xFcos\omega t-\frac{i\hbar}{2}\gamma[(1+\bar n)a^+a+\bar n aa^+]$

Q) How to simulate the above dynamical relation?

I had two ideas in mind:

a)  Express everything in position basis(operators and wavefunction) and perform appropraite 
    multiplications and numerical double differentiations.
b)  Express the wavefunction and operator in quantum simple harmonic oscillator hamiltonian 
    eigenstates and truncate the number of basis states to get finite dimensional matrices and 
    vectors for operators and wave functions respectively. Now the task becomes that of matrix 

I was wondering if one of these would be appropriate.

Any comments on the above approaches or any other approaches are really appreciated.

Note 1) for approach 2 where we operate in a truncated fock state space, one way of fixing truncation is to look at occupation probabilities for fock states, observed during the duration of evolution. e.g. in my application $H_{sys}$ describes a mechanical oscillator driven by a weak drive. So the occupation probabilities is going to be low so we can trucate basis states to as low as 10. But if the drive were stronger, we would have to take more basis states.

In photonic oscillators, some applications like second harmonic generation require as high as 512 fock states for numerical studies.

  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it is asking about simulations and not about the physics behind them. $\endgroup$ Apr 9, 2020 at 14:38
  • $\begingroup$ sure, but there should be scope to ask computation based questions which require heavy understanding of physics. That might be hard to find in another stackexchange for simulations like computational science stackexchange $\endgroup$ Apr 9, 2020 at 14:41
  • $\begingroup$ I agree, a SE site devoted to simulating physical systems would be very useful. In my opinion this question does not fit with PSE, but I do not think my opinion is law, which is why there are votes to close. If no one else agrees then your question is fine :) $\endgroup$ Apr 9, 2020 at 14:43

1 Answer 1


Not a direct answer to the question, but there is a python module QuTiP that has built in functions for simulating open quantum system. For instance there is a function to solve the master equation in question using both matrix differential equation approach and monte carlo wavefunction approach. It can be used for much more. It is best used in a Linux anaconda environment as getting it set up in a windows pc might have issues.


Not the answer you're looking for? Browse other questions tagged or ask your own question.