-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
DeviceDerivatives
jacobian product calculator (#4527)
This PR follows on from #4435 , and adds a child class that can handle device-provided derivatives. It has two private caches, `_results_cache` and `_jacs_cache`. This handles storing the jacobian between the forward pass and the backward pass. The caches will also store results and jacobians between successive calls to the same instance. The class can handle both device interfaces, `qml.Device` and `qml.devices.Device`. Name for the class is still up in the air. This class takes the full jacobian from the device and then performs the dot product. The class in #4637 takes the jacobian product itself from the device. --------- Co-authored-by: David Wierichs <[email protected]> Co-authored-by: Mudit Pandey <[email protected]>
- Loading branch information
1 parent
a296806
commit fad9939
Showing
10 changed files
with
831 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.