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

Add check for auto interface and device that do not support backprop #3752

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

rmoyard
Copy link
Contributor

@rmoyard rmoyard commented Feb 10, 2023

Description of the Change:

With the "auto" interface raises an error at initialization of QNode if the device does not support backprop.

It allows checks for all diff_method expect best and backprop as they require the interface.

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md 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.

@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #3752 (84ccdbf) into master (f175f2d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3752   +/-   ##
=======================================
  Coverage   99.82%   99.82%           
=======================================
  Files         330      330           
  Lines       28925    28929    +4     
=======================================
+ Hits        28874    28878    +4     
  Misses         51       51           
Impacted Files Coverage Δ
pennylane/qnode.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@albi3ro albi3ro added this to the Release v0.29 milestone Feb 10, 2023
@rmoyard rmoyard requested a review from mlxd February 10, 2023 20:15
Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Thanks @rmoyard
All lightning packages throw/warn as required as with 0.28.x

@rmoyard rmoyard merged commit c4fcb1a into master Feb 10, 2023
@rmoyard rmoyard deleted the fix_auto_backprop_device branch February 10, 2023 21:52
mudit2812 pushed a commit that referenced this pull request Apr 13, 2023
…3752)

* Add check

* Add a test

* Checks run but not for backprop

* Merge if

* Fix diff method test
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