-
Notifications
You must be signed in to change notification settings - Fork 65
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
Upgrade pulser-simulation to qutip 5 #783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of question but it LGTM, very nice job!
For the record, I have investigated the influence of the data type of the initial state. If the initial state is specified with a string (the default behaviour, as in the tutorials above), then the initial state in CSR. If the user defines his own initial state with an array, then the data type of "Dense". In qutip/qutip#2328, it is said that in the idea of qutip developers, kets should be stored in the data type "Dense" and not "CSR", because CSR @ Dense is faster than CSR @ CSR. I have investigated whether or not having a "Dense" initial state influences the duration of the computation: this is not clear. I drop here the tests I have made by converting all the data to "Dense" before simulation: |
In the end it seems that it is always better to have the initial state in CSR (but it's being picky for few tens of ms) benchmark_qutip_5_operators_as_CSR_state_as_CSR.pdf |
Based on general sparse linear algebra CSR x CSR is faster than CSR x CSR if the ket is sufficiently sparse. It's also the sort of thing that can depend a lot on your system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Bumps the requirements to qutip 5.
Handles the introduction of the new data type "Dense" in qutip (previously, there was only "CSR"): by default, all the operators used to be initialized as "CSR", but they were now stored as "Dense". This PR converts any Qobj to CSR, such that the performances are kept the same (notably, having CSR in collapse operators is very important, see qutip/qutip#2328).
benchmark_qutip_5_all_CSR.pdf
benchmark_qutip_5_all_CSR_no_norm.pdf
Closes #730