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 `state_vector`, `measurement` class and `simulate` method for the LightningGPU with the new device API #892

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 state_vector, and measurement class for the new device API to achieve the simulate method

Benefits: Integration of LGPU with the new device API

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-70932]

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

Project coverage is 93.55%. Comparing base (b375dd3) to head (96728cb). Report is 2 commits behind head on gpuNewAPI_backend.

Files with missing lines Patch % Lines
pennylane_lightning/lightning_gpu/_mpi_handler.py 41.66% 28 Missing :warning:
pennylane_lightning/lightning_gpu/_state_vector.py 88.88% 12 Missing :warning:
pennylane_lightning/lightning_gpu/_measurements.py 86.66% 6 Missing :warning:
pennylane_lightning/lightning_gpu/lightning_gpu.py 82.14% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## gpuNewAPI_backend #892 +/- ## ====================================================== + Coverage 74.66% 93.55% +18.89% ====================================================== Files 27 76 +49 Lines 1954 8801 +6847 ====================================================== + Hits 1459 8234 +6775 - Misses 495 567 +72 ```

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

LuisAlfredoNu commented 2 months ago

@AmintorDusko

Please let us know if these coverage issues are some fluke.

The coverage issues are related to the MPI part which is under development and has not been tested on the current PR. Although, this does not affect the code for a single device. For LK, I do know why CodeCov never catch the coverage of this device. :confused: