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

Fix qml.gradients docs examples #5596

Merged
merged 9 commits into from
Apr 30, 2024
Merged

Fix qml.gradients docs examples #5596

merged 9 commits into from
Apr 30, 2024

Conversation

dwierichs
Copy link
Contributor

@dwierichs dwierichs commented Apr 29, 2024

  • Fix last open bug or open issue

Context:
Docs get out of sync over time.
In particular, the output shape of gradient transforms applied to QNodes was changed in #4945 but not updated in the docs.

Description of the Change:
Update examples in docs of qml.gradients module.

Also updates the qml.kernels docs, with a few very small changes.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

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.

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (v0.36.0-rc0@d95390f). Click here to learn what that means.

Additional details and impacted files
@@              Coverage Diff               @@
##             v0.36.0-rc0    #5596   +/-   ##
==============================================
  Coverage               ?   99.69%           
==============================================
  Files                  ?      412           
  Lines                  ?    38280           
  Branches               ?        0           
==============================================
  Hits                   ?    38162           
  Misses                 ?      118           
  Partials               ?        0           

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

@dwierichs dwierichs marked this pull request as ready for review April 30, 2024 06:35
Copy link
Contributor Author

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Hope these comments help with reviewing swiftly.

pennylane/gradients/__init__.py Show resolved Hide resolved
pennylane/gradients/__init__.py Show resolved Hide resolved
pennylane/gradients/classical_jacobian.py Show resolved Hide resolved
pennylane/gradients/finite_difference.py Show resolved Hide resolved
pennylane/gradients/finite_difference.py Show resolved Hide resolved
pennylane/gradients/parameter_shift.py Show resolved Hide resolved
pennylane/gradients/parameter_shift.py Show resolved Hide resolved
pennylane/gradients/parameter_shift_cv.py Show resolved Hide resolved
pennylane/gradients/pulse_gradient_odegen.py Show resolved Hide resolved
pennylane/gradients/spsa_gradient.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

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

Great update @dwierichs !
Looks good to me, just two minor things

pennylane/gradients/finite_difference.py Show resolved Hide resolved
pennylane/gradients/finite_difference.py Show resolved Hide resolved
pennylane/gradients/finite_difference.py Outdated Show resolved Hide resolved
pennylane/gradients/general_shift_rules.py Outdated Show resolved Hide resolved
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

Thanks for doing this pass 🎉

@trbromley trbromley added this to the v0.36 milestone Apr 30, 2024
@dwierichs dwierichs added the merge-ready ✔️ All tests pass and the PR is ready to be merged. label Apr 30, 2024
@dwierichs dwierichs enabled auto-merge (squash) April 30, 2024 15:00
@dwierichs dwierichs merged commit ca31c43 into v0.36.0-rc0 Apr 30, 2024
37 checks passed
@dwierichs dwierichs deleted the doc-fixes-dw branch April 30, 2024 16:03
dwierichs added a commit that referenced this pull request Jun 14, 2024
**Context:**

**Description of the Change:**
As title says.
Also reverts a few invalid changes from #5596 in `qml.kernels` docs.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-ready ✔️ All tests pass and the PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants