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

Optimize gate cache recording for `lightning.tensor` #879

Closed multiphaseCFD closed 2 months ago

multiphaseCFD 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:

[SC-72517]

Current implementation of applyOperation avoid the overhead of a cutensornetStateUpdateTensorOperator call and the creation of a new DataBuffer object. A new gate_ids_ private data is added for the quick generation of a new key, which does not exist in the gate_cache.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

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

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.13%. Comparing base (756eb7b) to head (ba39cb7). Report is 1 commits behind head on master.

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

HEAD has 40 uploads less than BASE | Flag | BASE (756eb7b) | HEAD (ba39cb7) | |------|------|------| ||48|8|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #879 +/- ## =========================================== - Coverage 98.35% 85.13% -13.22% =========================================== Files 117 59 -58 Lines 19405 5154 -14251 =========================================== - Hits 19086 4388 -14698 - Misses 319 766 +447 ```

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