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

Deprecate the internal switching of a backpropagation device #6032

Merged
merged 49 commits into from
Jul 26, 2024

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Jul 23, 2024

Context:

The internal switching of one device for another backpropagation-compatible device was developed to allow the substitution of default.qubit.legacy with either default.qubit.autograd, default.qubit.jax, default.qubit.torch, or default.qubit.tf. This logic has caused a lot of pain over the years, and all five of those devices are now deprecated. In order to complete the removal of the 5 legacy devices, we need to also deprecate and remove the backprop device switching logic.

Otherwise, it would be very difficult and painful to test the switching of a backpropagation device.

Description of the Change:

Deprecates the switching of a device with a different device. A warning is only raised when the device is not default.qubit.legacy, as default.qubit.legacy raises it's own deprecation warnings.

Benefits:

We can finally clean up QNode 🎉 💥

Possible Drawbacks:

Related GitHub Issues:

Shiro-Raven and others added 30 commits July 13, 2024 01:47
Co-authored-by: Thomas R. Bromley <[email protected]>
Co-authored-by: Thomas R. Bromley <[email protected]>
Base automatically changed from ad/deprecate-legacy-devices to master July 24, 2024 21:40
tests/resource/test_specs.py Outdated Show resolved Hide resolved
@albi3ro albi3ro enabled auto-merge (squash) July 26, 2024 14:04
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (b7675ca) to head (8d48d9e).
Report is 299 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6032      +/-   ##
==========================================
- Coverage   99.66%   99.65%   -0.01%     
==========================================
  Files         428      428              
  Lines       41182    40889     -293     
==========================================
- Hits        41042    40748     -294     
- Misses        140      141       +1     

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

@albi3ro albi3ro merged commit d9b284a into master Jul 26, 2024
40 checks passed
@albi3ro albi3ro deleted the deprecate-backprop-device-switching branch July 26, 2024 15:07
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.

3 participants