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

Unify Lightning Kokkos device and Lightning Qubit device under a Lightning Base device #876

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: Following the design of *Lightning Qubit uses the New Device API end to end, we can now migrate lightning.kokkos device to the new device API.

Description of the Change: Increase the reusability of the code by creating base classes for Lightning StateVector, Measurements, and AjointJacobian. Create a new device base class for LightningQubit and LightningKokkos.

Benefits: Improve the maintenance and readability of the Python front-end devices for LQ and LK.

Possible Drawbacks:

Related GitHub Issues:

[sc-71783]

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 35.72895% with 313 lines in your changes missing coverage. Please review.

Project coverage is 61.36%. Comparing base (db98cbc) to head (efa3005). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pennylane_lightning/core/_measurements_base.py 24.24% 100 Missing :warning:
pennylane_lightning/core/_adjoint_jacobian_base.py 28.86% 69 Missing :warning:
pennylane_lightning/core/lightning_newAPI_base.py 45.33% 41 Missing :warning:
pennylane_lightning/core/_state_vector_base.py 56.25% 28 Missing :warning:
...ylane_lightning/lightning_qubit/lightning_qubit.py 28.57% 20 Missing :warning:
...ane_lightning/lightning_kokkos/lightning_kokkos.py 30.76% 18 Missing :warning:
...nylane_lightning/lightning_kokkos/_state_vector.py 20.00% 12 Missing :warning:
...ane_lightning/lightning_qubit/_adjoint_jacobian.py 38.88% 11 Missing :warning:
...ne_lightning/lightning_kokkos/_adjoint_jacobian.py 36.36% 7 Missing :warning:
...nnylane_lightning/lightning_qubit/_state_vector.py 50.00% 3 Missing :warning:
... and 2 more

:exclamation: There is a different number of reports uploaded between BASE (db98cbc) and HEAD (efa3005). Click for more details.

HEAD has 45 uploads less than BASE | Flag | BASE (db98cbc) | HEAD (efa3005) | |------|------|------| ||52|7|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #876 +/- ## =========================================== - Coverage 96.50% 61.36% -35.14% =========================================== Files 208 24 -184 Lines 28812 2146 -26666 =========================================== - Hits 27805 1317 -26488 + Misses 1007 829 -178 ```

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

AmintorDusko commented 2 months ago

@LuisAlfredoNu, it looks like you still have problems with the formatting check.

LuisAlfredoNu commented 2 months ago

@AmintorDusko All the suggestions are done or commented on. Could you make a second review, please? :smile: