-
Notifications
You must be signed in to change notification settings - Fork 62
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
Migrating to NumPy 2.0 #1403
Comments
Ciao @MatteoRobbiati, @scarrazza, are you going to look into this migration any time soon? I've got a request about this from the SWAN service at CERN, as they plan to move to numpy 2.0 and would potentially need to uninstall Qibo. |
Ciao @glpatcern! |
Hey @MatteoRobbiati, I guess this will take some time yet, right? I see there's also #1484 that is kind of related, but did not find any PR specifically addressing numpy 2. At the moment, the SWAN team is ready to migrate to a new set of packages that support numpy 2 and python 3.12, and unless we (you) provide some context or roadmap, they may drop Qibo to give precedence to all the rest. |
Hi @glpatcern. Indeed, the two are actually unrelated.
Python 3.12 is fully supported (it came in #1231). Concerning NumPy 2, I do not see any special dependency issue, nor any major problem. The API is in general pretty similar, so it is mostly (and most likely) a matter of testing, and fixing the minor differences that will arise in the process. @MatteoRobbiati we may discuss the issue at the next meeting, to see if there is anyone willing to actually perform the migration. |
Hi @alecandido, thanks for jumping in - good to learn that the TensorFlow dependency should not be an issue with going to NumPy 2 (with Python 3.12). Have you had your meeting / did you assess what the migration would entail in terms of actual work? |
I would say, no one volunteered. I will directly check with the most likely candidates (one of which is @MatteoRobbiati himself :P), but otherwise it will just stall... |
At some point, we should also take into account migrating to NumPy 2.0, now that is out.
A much relevant improvement (to us) could be the following:
https://numpy.org/doc/stable/release/2.0.0-notes.html#array-api-compatible-functions-aliases
https://numpy.org/doc/stable/release/2.0.0-notes.html#array-api-compatible-functions-for-numpy-linalg
https://numpy.org/doc/stable/release/2.0.0-notes.html#array-api-standard-support-in-the-main-namespace
It was already documented for v1, and there are compatibility packages available
https://numpy.org/doc/stable/reference/array_api.html
but now it is available by default, and it should improve the compatibility with the other array frameworks (i.e. TensorFlow, PyTorch, JAX, CuPy, ...), since the Python API has been standardized (not all of them adopted it already, but they might do it).
Originally posted by @alecandido in #1395 (comment)
The text was updated successfully, but these errors were encountered: