-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance drop in QuTiP 5.0.1 vs QuTiP 4.7.6 #2406
Comments
Thanks for pointing this out.. I had a quick play around, this seems to be some overhead from the normalization flag in mesolve. In v5 if I use To make it really "like for like" you can also wrap it so that it uses CSR format for everything
Which data-type is best for is a bit problem dependent. let us know if this gives you comparable results! On the topic of dynamiqs, you might be interested in trying out the jax/jaxdia data layer, there's some examples here We also tried this example with dynamiqs (with its double precision setting), I think you guys came out slightly ahead speed-wise because I think you dont vectorize/use superoperators, which seems to suit jax/diffrax! though if i did that manually with qutip we essentially get the same, which I guess makes sense. The jaxdia data layer lets us go to a few more spins (more with sesolve, not so many with mesolve!) |
Thanks, indeed the
Yes we're in the process of implementing a sparse DIA format as well. This is something I had suggested to @Ericgig when visiting Sherbrooke in early 2023, but you guys were much faster than us to make it work! I'm quite happy that this is being spread around. Maybe we'll be able to push cuSPARSE for a native DIA format at some point. |
I looked at it too and the issue is with the norm function. The norm trace function is used ( |
Bug Description
While benchmarking dynamiqs vs QuTiP, I've noticed a large performance drop of
qutip.mesolve
when going from v4.7.6 to v5.0.1. On the example below, the benchmarks show:Found similar behavior on two different CPUs (mac M2, and AMD Ryzen 7).
Code to Reproduce the Bug
Your Environment
The text was updated successfully, but these errors were encountered: