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

catalyst works with numpy 2.0 #1119

Merged
merged 7 commits into from
Sep 19, 2024
Merged

catalyst works with numpy 2.0 #1119

merged 7 commits into from
Sep 19, 2024

Conversation

mehrdad2m
Copy link
Contributor

@mehrdad2m mehrdad2m commented Sep 10, 2024

Context:
After Pennylane support numpy 2.0, catalyst needs to add this support.

Description of the Change:

  1. Bump pennylane version to include the numpy 2.0 support
  2. Since programs built using numpy 1.x would not readily work with numpy 2.0, we upgraded reuirements.txt to install numpy2.0. The reason is that wrapper.cpp uses the numpy C-API that should be built using numpy 2.x.
  3. pyblind11 dependency was upgraded to 2.12.0 which adds support to numpy 2.0
  4. scipy dependency includes 1.13 which adds support for numpy 2.0
  5. removed optax dependancy from requirements (it was a TODO and unrelated to numpy but would cause CI delay)

Benefits:
Adds support for numpy 2.0

Related GitHub Issues:

[sc-61401]

@mehrdad2m mehrdad2m marked this pull request as ready for review September 10, 2024 15:13
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.88%. Comparing base (febd66b) to head (a1040a9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1119   +/-   ##
=======================================
  Coverage   97.88%   97.88%           
=======================================
  Files          75       75           
  Lines       10749    10749           
  Branches     1259     1259           
=======================================
  Hits        10522    10522           
  Misses        179      179           
  Partials       48       48           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

requirements.txt Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
Copy link
Contributor

@erick-xanadu erick-xanadu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still labeled do-not-merge? I'll leave it up to you to decide when to merge.

@mehrdad2m mehrdad2m changed the title [WIP] test if numpy 2.0 works with catalyst catalyst works with numpy 2.0 Sep 18, 2024
@mehrdad2m
Copy link
Contributor Author

Is this still labeled do-not-merge? I'll leave it up to you to decide when to merge.

Sorry, forgot to remove the tag. I think it should be good for merging.

@paul0403
Copy link
Contributor

Should wheels be built to check against the numpy upgrade?

@mehrdad2m
Copy link
Contributor Author

@erick-xanadu, I just pushed a last change, which is to add scipy==1.13 to requirements. I think it is necessary since we have numpy==2.0.

@mehrdad2m mehrdad2m added the author:build-wheels Run the wheel building workflows on this Pull Request label Sep 18, 2024
@mehrdad2m
Copy link
Contributor Author

Should wheels be built to check against the numpy upgrade?

Added the label

@erick-xanadu erick-xanadu removed the author:build-wheels Run the wheel building workflows on this Pull Request label Sep 19, 2024
@mehrdad2m mehrdad2m merged commit b3810be into main Sep 19, 2024
58 checks passed
@mehrdad2m mehrdad2m deleted the support-numpy2 branch September 19, 2024 13:46
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 this pull request may close these issues.

4 participants