last day (21 days later) » 

20:56
I'll tell you what, post a gist link in here and I'll take a look at it for you
which is why I posted this to get code that is shorter to run so people on stack overflow could help me... but it is off-topic... therefore I am just going in circles
well you should fix one of those two things...
@Phrancis have you even seen my question? it isn't people do often and post on the internet...
yourself or somewhere else :/
@Quill you sure you have the time?
20:58
maybe, I can't be 100% until I see some code
it is in the question:
1
Q: Open quantum system modelling

TanMathI have been working for a long time now on modelling an open quantum system using the Lindblad Equation. The Hamiltonian is the following: However, two other matrices are added to the Hamiltonian. One of them has all the diagonal terms equal to -33.3333i and everything else zero. Another is a ...

I will put it in a gist
Have you stepped through the math part of it, and compared the wrong result you are getting to the correct one?
can't you just reduce the list of matrices to reduce run time?
@Quill what is the point of that? then how will I get the result I want??
well the calculation time depends on complexity, right? wouldn't reducing the complexity reduce the run time?
21:01
@Quill but that would be a totally different system, wouldn't it?
I don't know the Lindblad equation, I'm just suggesting
options = Options(nsteps=1000000, atol=1e-10)
@Quill yeah... you would get a different quantum system
@Phrancis what about that?
Any particular reason you are doing this a million times?
@Phrancis um, because I want to plot the result correctly i guess... hides and runs away to check the code
21:04
Like, if you did it say, a thousand times, or a hundred, couldn't you still check the results then?
@Phrancis I am checking if that affects anything right now...
Also, 1e-10 is a REALLY BIG number
It has been a minute now, so it does take longer than a minute if I decrease it to 100 steps
@Phrancis you mean small?
how do you do this whole "Lots of tabs" thing @skiwi? it's really hard
1e-10=1*10^(-10)
(for my own reference, because I don't math)
21:07
@Phrancis yeah.... so it is really small
code still hasn't finished...
No, it's a REALLY BIG negative number, it's not small
So, if you can cut that down by a few factors also, that should help I think
@Phrancis headdesks
2
Phrancis: SQL guy by day... Bug Killer by night
Watch out bugs, he's coming for you!
@Quill and zombie hunter at times
can somebody explain to @Phrancis that 1e-10 is a really small number?
21:10
How many zeroes in 1e-10?
3 mins ago, by Phrancis
No, it's a REALLY BIG negative number, it's not small
@Quill it isn't even negative!!
^^^ @Phrancis
21:11
I'm sorry.
4 mins ago, by Phrancis
(for my own reference, because I don't math)
So, this 0.0000000001 figure, what is it for?
@Phrancis maximum tolerance...
^ go here please
@Mat'sMug OK let me move this stuff over
first
The current discussion topic is the time-complexity issues on this script
2
hi, well I know pretty much nothing on numpy...
21:16
51 messages moved from The 2nd Monitor
ok... so the program still takes forever to run...
oops.. I realized something... the trap matrix was all messed up... it should have been trap[2][2]=-0.03333j
@TanMath Would reducing the precision of this figure while you debug it help performance without screwing up the algorithm?
@TanMath try moving your variables into readable constants
like instead of trap[2][2]=-0.03333j
have:
trap_matrix = -0.03333j
trap[2][2] = trap_matrix
this will help you to be able to read and maintain your code easier
21:24
@Quill what is the point of this? to make a new variable?
34 secs ago, by Quill
this will help you to be able to read and maintain your code easier
it makes it easier to find bugs in your code and to improve things
maybe...
also makes life easier if anyone else ever wants to maintain your code
@Quill ok...
@Phrancis well, the results would be less accurate...
Well, it might be at least worth a try just to see if that's the speed issue, maybe try making the tolerance just 1 and run it and see how long it takes
21:26
wait... sorry!
@Phrancis you are right.. atol should be higher, because then it considers it converged faster and takes less time that way... I will try that...
@TanMath time complexity is usually a byproduct of accuracy, unfortunately
And by the way, please try to run it. Somebody who helped me with this code (@JRichardSnape from StackOverflow) actually got it to run in 10 minutes somehow... Maybe it is something with my computer...
@Quill i guess...
Only problem is you need to install the qutip module...
pip won't even let me install qutip
21:30
@Quill what was the error? what are you using? Mac OS X?
osx:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/5z/r7gx8xxs0zg8bc98tdxnkffh0000gn/T/pip-build-PGoEOQ/qutip
it prefers Linux
right
@Quill haven't seen this error before... do you have all the required modules?
probably not but usually it tries to install all the required modules
21:32
@Quill I tried doing it on a Windows computer and it never worked.. it was because of the requirements... then I used a Linux VM and an online VM...
fair enough
I think I have ubuntu installed on here anyway
good...
Back to the code?
starttime = 0 # this is effectively just a label - `mesolve` alwasys starts from `rho0` - it's just saying what we're going to call the time at t0
endtime = 1000 # Arbitrary - this solves with the options above (max 1 million iterations to converge - tolerance 1e-10)
num_intermediate_state = 10000
What are these for?^
gtg... I will be back...
21:35
thanks for helping me BTW! I appreciate it...
No problem. Just remember this is not "what we normally do" :)
21:54
@Phrancis I totally realize that...
OK good
22:10
@Phrancis how long to run the simulation
@Quill I hope you got qutip installed on your Ubuntu without any problems...
oh sorry I was busy with something else, but it looks like I uninstalled Ubuntu...
@TanMath OK, can you reduce those also while you debug?
@Quill no need to say sorry to me...in fact, I should say sorry for taking up your time...
@Phrancis meaning?
@TanMath decrease these variables
40 mins ago, by Phrancis
starttime = 0 # this is effectively just a label - `mesolve` alwasys starts from `rho0` - it's just saying what we're going to call the time at t0
endtime = 1000 # Arbitrary - this solves with the options above (max 1 million iterations to converge - tolerance 1e-10)
num_intermediate_state = 10000
What Quill said. There's no point running a long simulation if you know the result is likely to be wrong anyways, just run a short simulation until the numbers look accurate enough
Also, floating point calculations are a real PITA lol
22:18
@Phrancis what is PITA?
Pain In The Ass
Oh...
But if you change endtime say from 1000 to 100 or even 10, can you still get enough of a result set to see if it's wrong or if it looks OK?
@Phrancis probably... I will set it to 100 maybe...
And what about num_intermediate_state what is that for?
22:24
I will make num_intermediate_state=100 now...
(Need to use backtick ` to get the monospace formatting)

  last day (21 days later) »