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 LightningAdjointJacobian to support lightning.qubit2 #631

Merged
merged 120 commits into from
Mar 8, 2024

Conversation

AmintorDusko
Copy link
Contributor

@AmintorDusko AmintorDusko commented Mar 7, 2024

Context: This PR adds a new Python class LightningAdjointJacobian bringing support to adjoint Jacobian and VJP calculation for the lightning.qubit2 device.

Description of the Change: The new class attaches itself with the calculated statevector and calculates the adjoint jacobian or VJP when requested.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@AmintorDusko AmintorDusko marked this pull request as ready for review March 7, 2024 19:08
Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

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

Just a few suggestions, but mostly looks good to me.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Outdated Show resolved Hide resolved
pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

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

Looks good to me, let's merge @AmintorDusko !

Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

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

Really nice work @AmintorDusko ! Some blocking comments below, would love to hear your thoughts. Please let me know if I've incorrectly assumed stuff in my comments below. Very excited to get this in. I will start integrating this into #607 so that it doesn't return dummy jacobians.

Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Nice work! 💯

pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

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

🎉

@AmintorDusko AmintorDusko merged commit 958bc36 into master Mar 8, 2024
83 checks passed
@AmintorDusko AmintorDusko deleted the lightning-qubit2-add-jacobian branch March 8, 2024 19:29
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.

5 participants