Skip to content
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 to Qutip 5 #730

Closed
HGSilveri opened this issue Sep 10, 2024 · 3 comments · Fixed by #783
Closed

Upgrade to Qutip 5 #730

HGSilveri opened this issue Sep 10, 2024 · 3 comments · Fixed by #783
Assignees
Milestone

Comments

@HGSilveri
Copy link
Collaborator

HGSilveri commented Sep 10, 2024

EDIT: On standby for eventual modification to the internals of QutipEmulator - for now, Qutip 5 is substantially worse than Qutip 4.
The changes needed to go to Qutip 5 have been pushed to this branch

@HGSilveri HGSilveri added this to the Pulser v1 milestone Sep 10, 2024
@HGSilveri HGSilveri self-assigned this Sep 20, 2024
@HGSilveri
Copy link
Collaborator Author

HGSilveri commented Sep 23, 2024

I gave this a shot and the conclusions were underwhelming (to say the least):

  • Qobj is no longer ArrayLike, so we have to explicitly call full() to use numpy ufuncs and sometimes go back to Qobj
  • Some methods (eg Qobj.extract_states(), Qobj.eliminate_states()) were deleted without a substitute, so we have to implement them manually
  • Execution became dramatically slower: On my laptop, test_simulation.py ran in 8.55s on qutip==4.7.6, now doesn't even complete in 10 minutes! (I gave up and interrupted it)

It's clear that Qutip 5 introduced changes that are incompatible with our current implementation in pulser-simulation. Until that changes, we should stick with Qutip 4.

@awennersteen
Copy link
Member

Re: performance there appears to have been a few other reports of this that they were able to fix, but in some cases they're pretty low level

qutip/qutip#2443
qutip/qutip#2406

However, given #757 we might not be able to postpone this forever.

@HGSilveri
Copy link
Collaborator Author

Thanks for looking into this @awennersteen . So far, these changes have not been released yet so I can't tell whether they will help without getting into the weeds of installing qutip from source. As this is not urgent, I'll wait for the release before trying again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants