PennyLaneAI / pennylane-lightning

The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ for use with PennyLane
https://docs.pennylane.ai/projects/lightning
Apache License 2.0
92 stars 40 forks source link

Add the support class for the Adjoint Jacobian to the new device #907

Closed LuisAlfredoNu closed 2 months ago

LuisAlfredoNu commented 2 months ago

Before submitting

Please complete the following checklist when submitting a PR:

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


Context: Migrate LightningGPU to the new device API

Description of the Change: Create the adjoint-jacobian class for the new device API to achieve the jacobian and vjp methods

Benefits: Unlocking the adjoint-jacobian capabilities with the new device API for LGPU

Possible Drawbacks:

Related GitHub Issues:

Freezzed PR :warning: :snowflake:

To make a smooth integration of LightningGPU with the new device API, we set the branch gpuNewAPI_backend as the base branch target for future developments related to this big task.

The branch gpuNewAPI_backend has the mock of all classes and methods necessary for the new API. Also, several tests were disabled with

if device_name == "lightning.gpu":
    pytest.skip("LGPU new API in WIP.  Skipping.",allow_module_level=True)

However, these tests will unblocked as the implementation progresses.

After all the developments for integrating LightningGPU with the new API have been completed then the PR will be open to merge to master

[sc-70936] [sc-70939]

github-actions[bot] commented 2 months ago

Hello. You may have forgotten to update the changelog! Please edit .github/CHANGELOG.md with:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (gpuNewAPI_backend@fdc3f32). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ylane_lightning/lightning_gpu/_adjoint_jacobian.py 96.96% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## gpuNewAPI_backend #907 +/- ## ==================================================== Coverage ? 76.06% ==================================================== Files ? 28 Lines ? 2202 Branches ? 0 ==================================================== Hits ? 1675 Misses ? 527 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AmintorDusko commented 2 months ago

Hey @LuisAlfredoNu, is this PR ready for review? Apparently, we have several test fails.

LuisAlfredoNu commented 2 months ago

Hey @LuisAlfredoNu, is this PR ready for review? Apparently, we have several test fails.

@AmintorDusko Sorry, I realize that right now it has several errors after the merge of the last commit of simulate branch :disappointed:. I will fix it and call to review it again. :smile:

AmintorDusko commented 2 months ago

Hey @LuisAlfredoNu, is this PR ready for review? Apparently, we have several test fails.

@AmintorDusko Sorry, I realize that right now it has several errors after the merge of the last commit of simulate branch 😞. I will fix it and call to review it again. 😄

Thank you, @LuisAlfredoNu!