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

Torch boundary uses JacobianProductCalculator #4654

Merged
merged 122 commits into from
Nov 13, 2023
Merged

Torch boundary uses JacobianProductCalculator #4654

merged 122 commits into from
Nov 13, 2023

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Oct 5, 2023

This PR is a follow on to #4557 .

It updates the torch interface to rely on the JacobianProductCalculator class to compute vjp's.

Note: I cannot figure out how to replicate the failing test locally. It's finite shots, which always makes me a bit suspect. But passes fine locally 😕

albi3ro and others added 30 commits August 2, 2023 16:11
@albi3ro albi3ro requested a review from dwierichs October 27, 2023 16:27
Copy link
Contributor

@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.

Looks great, thanks @albi3ro! 🎉
Might make sense to rebase to autograd-use-jpc, or to native-jpc-devices, again after the auto-rebase?
Otherwise I only had some minor comments, and a changelog entry is needed :)

pennylane/devices/qubit/adjoint_jacobian.py Outdated Show resolved Hide resolved
pennylane/devices/execution_config.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Show resolved Hide resolved
tests/interfaces/test_torch.py Show resolved Hide resolved
pennylane/interfaces/execution.py Outdated Show resolved Hide resolved
@albi3ro albi3ro added the gpu label Nov 7, 2023
@albi3ro albi3ro removed the gpu label Nov 7, 2023
Copy link
Contributor

@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.

Looks great, good to go from my side! 🎉
Just two tiny things in the initial torch registration example.

pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

sweetness. just a few questions about what's going on

pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Show resolved Hide resolved
pennylane/interfaces/torch.py Outdated Show resolved Hide resolved
pennylane/interfaces/torch.py Show resolved Hide resolved
Co-authored-by: Matthew Silverman <[email protected]>
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

🎉

@albi3ro albi3ro enabled auto-merge (squash) November 13, 2023 15:51
@albi3ro albi3ro merged commit 1cea8c6 into master Nov 13, 2023
32 checks passed
@albi3ro albi3ro deleted the torch-use-jpc branch November 13, 2023 16:08
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