PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.36k stars 604 forks source link

Create a workflow to test PennyLane with NumPy 1.26 #6275

Closed PietropaoloFrisoni closed 1 month ago

PietropaoloFrisoni commented 2 months ago

Context: In #6061, we started using by default NumPy 2 (instead of NumPy 1) on the CI to test every PR targeting the master branch. Some jobs (for example, those requiring tensorflow) still automatically downgrade to NumPy 1.26 since not all interfaces are supported at the current stage.

This PR aims to create another workflow to test some jobs with NumPy 1.26 (those that don't automatically downgrade to NumPy 1 during the day). Such a workflow should run at night to ensure PennyLane is still compatible with NumPy 1.26.

We'll keep this workflow only temporarily (probably a quarter, but this still has to be established). After that, we'll get rid of it.

Finally, It has been verified (see here) that the tests introduced with this PR are green. This has been verified a second time (see here before merging this PR into master).

Description of the Change: As above.

Benefits: We ensure that PennyLane is still compatible with NumPy 1.26.

Possible Drawbacks:

Related GitHub Issues: None.

Related Shortcut Stories: [sc-73744]

github-actions[bot] commented 2 months ago

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

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.70%. Comparing base (de54c54) to head (7691a95). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6275 +/- ## ======================================= Coverage 99.70% 99.70% ======================================= Files 444 444 Lines 42133 42133 ======================================= Hits 42008 42008 Misses 125 125 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

PietropaoloFrisoni commented 2 months ago

@rashidnhm Please ignore the failures related to JAX 0.4.28 and NumPy 1.26.4 (we'll decide what to do with them at a later stage). I asked for your review mostly for the workflow structure. Thanks!