« first day (2 days earlier)      last day (8 days later) » 

9:27 AM
I'm intrigued. What is your context for doing this? Are you studying?
It's entirely plausible for the code to give the same (or similar) output. You are trying to evaluate an infinite integral. You're gradually increasing the upper limit. You believe that the infinite integral should give you a positive scalar, so, as you increase the upper limit, I'd expect a similar number to be produced, possibly increasing slightly with each increase of the upper integration limit
It's quite possible that for the system your studying (I have no information about the physical system under consideration) that integral will reach most of its value within the first e.g. 0.001 seconds, depending on the shape of the <3|rho(t)|3> function.
I'm intrigued why you have tried this, rather than testing out the mesolve as I suggested. You seem determined not to work out how that's working and if / when it fails.
 
9:44 AM
@TanMath You still aren't checking your values here. Look at what gamma is. When you do *(35/150) in python 2, the 35/150 is an integer division, so returns zero, hence your gamma is zero. We've already identified that the value of gamma is critical. Print it out on every run
This means that all of your Ln that you passed into mesolve were all zeros. So your states were just rho0 at all times (plus a little bit of numerical noise making the numbers have some vanishingly small imag components)
 
10:37 AM
from qutip import *
from matplotlib import *
import numpy as np
import scipy
from scipy.constants import *
import matplotlib.pyplot as plt

hamiltonian = np.array([[215, -104.1, 5.1, -4.3  ,4.7,-15.1 ,-7.8 ],
[-104.1,  220.0, 32.6 ,7.1, 5.4, 8.3, 0.8],
      [ 5.1, 32.6, 0.0, -46.8, 1.0 , -8.1, 5.1],
     [-4.3, 7.1, -46.8, 125.0, -70.7, -14.7, -61.5],
       [ 4.7, 5.4, 1.0, -70.7, 450.0, 89.7, -2.5],
    [-15.1, 8.3, -8.1, -14.7, 89.7, 330.0, 32.7],
     [-7.8, 0.8, 5.1, -61.5,  -2.5, 32.7,  280.0]])
The code above should get you going. It evolves your system from t=0 to t=25 and then plots (using matplotlib) <3|rho(t)|3> for you to get a feel of it.
I hope this is what you're trying to do. Without full context, it's hard to know.
Note - I plot 1000 intermediate times. You might want to do fewer, or evolve the time further - play around!
It should give you an output like:
Again, I hope that's what you were expecting. It does look like the kind of curve where the integration to infinity might have a finite result
@TanMath Just a ping to alert you to me putting the above comments. I won't be around this evening, probably.
 
 
4 hours later…
2:46 PM
actually - I let it run to 250 seconds. It looks like it stabilises around 0.1428570..., so the integral from 0 to infinity of that number definitely won't be finite.
So, it looks like it's back to the physics books to work out why you think it should be a finite quantity and why this scheme is not producing such a result
 
 
3 hours later…
5:45 PM
@JRichardSnape thanks for the debug code.. I totally forgot about the gamma equalling zero...
 

« first day (2 days earlier)      last day (8 days later) »