pennylane icon indicating copy to clipboard operation
pennylane copied to clipboard

[WIP][Return-types #7] QNode integration with custom gradient and autograd

Open rmoyard opened this issue 3 years ago • 2 comments

Before submitting

Please complete the following checklist when submitting a PR:

  • [ ] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the test directory!

  • [ ] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running make docs.

  • [ ] Ensure that the test suite passes, by running make test.

  • [ ] Add a new entry to the doc/releases/changelog-dev.md file, summarizing the change, and including a link back to the PR.

  • [ ] The PennyLane source code conforms to PEP8 standards. We check all of our code against Pylint. To lint modified files, simply pip install pylint, and then run pylint pennylane/path/to/file.py.

When all the above are checked, delete everything above the dashed line and fill in the pull request template.


Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-25813]

rmoyard avatar Sep 08 '22 21:09 rmoyard

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.

github-actions[bot] avatar Sep 08 '22 21:09 github-actions[bot]

Codecov Report

Merging #3041 (26d8324) into master (37a4024) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           master    #3041    +/-   ##
========================================
  Coverage   99.69%   99.69%            
========================================
  Files         275      275            
  Lines       24012    24170   +158     
========================================
+ Hits        23938    24097   +159     
+ Misses         74       73     -1     
Impacted Files Coverage Δ
pennylane/_grad.py 100.00% <ø> (ø)
pennylane/gradients/__init__.py 100.00% <100.00%> (ø)
pennylane/gradients/finite_difference.py 100.00% <100.00%> (ø)
pennylane/gradients/parameter_shift.py 100.00% <100.00%> (ø)
pennylane/gradients/vjp.py 100.00% <100.00%> (ø)
pennylane/interfaces/autograd.py 100.00% <100.00%> (ø)
pennylane/interfaces/execution.py 100.00% <100.00%> (ø)
pennylane/qnode.py 100.00% <100.00%> (ø)
pennylane/math/utils.py 100.00% <0.00%> (+0.88%) :arrow_up:

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

codecov[bot] avatar Sep 08 '22 21:09 codecov[bot]

@eddddddy @antalszava It is ready for a new round of reviews!

Two things I could not solve is:

  1. @antalszava Why numpy array with shape () are converted to float, single measurment and single params. I would appreciate your input here.
  2. @eddddddy The sum with axis 0 is not working with ArrayBox and differentiation, see my comment above. I could not simplify compute_vjp more.

Also pls go through the open comments and close the one where my answer was sufficient.

rmoyard avatar Oct 25 '22 16:10 rmoyard

[sc-28429]

rmoyard avatar Oct 26 '22 14:10 rmoyard