Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update Lightning device TOML files to the new schema #988

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

astralcai
Copy link
Contributor

Context:

This PR is part of the new device capabilities initiative to improve feature parity across the ecosystem. See this ADR for more context. A new TOML schema has been defined, and the relevant module implemented in PennyLane:

As well as updates made to Catalyst:

Description of the Change:

  • Updates lightning_qubit.toml, lightning_kokkos.toml, lightning_gpu.toml to the new schema
  • Removes _operations and _observables from LightningQubit, LightningKokkos, and LightningGPU as they are now available via Device.capabilities that is loaded from the TOML file.

Benefits:

A step towards feature parity across the ecosystem.

Possible Drawbacks:

  • Per discussions when the ADR was developed, operator.gates.decomp and operator.gates.matrix are removed, and the TOML file no longer prescribes to the framework how an operator should be handled. To ensure consistency of behaviour, this information is temporarily moved to a _to_matrix_ops class property to be used by Catalyst, until we have better support for customizable multi-pathway decompositions.

Related GitHub Issues:

[sc-71729]

Copy link
Contributor

github-actions bot commented Nov 7, 2024

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

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 59.09091% with 9 lines in your changes missing coverage. Please review.

Project coverage is 28.46%. Comparing base (b491a37) to head (3e9f732).

Files with missing lines Patch % Lines
pennylane_lightning/lightning_gpu/lightning_gpu.py 57.14% 3 Missing ⚠️
...ane_lightning/lightning_kokkos/lightning_kokkos.py 57.14% 3 Missing ⚠️
...ylane_lightning/lightning_qubit/lightning_qubit.py 57.14% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b491a37) and HEAD (3e9f732). Click for more details.

HEAD has 34 uploads less than BASE
Flag BASE (b491a37) HEAD (3e9f732)
38 4
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #988       +/-   ##
===========================================
- Coverage   97.97%   28.46%   -69.51%     
===========================================
  Files         221       28      -193     
  Lines       33726     2508    -31218     
===========================================
- Hits        33043      714    -32329     
- Misses        683     1794     +1111     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@astralcai astralcai marked this pull request as ready for review November 12, 2024 16:35
@@ -18,4 +18,4 @@ cmake
custatevec-cu12
cutensornet-cu12
pylint==2.7.4
git+https://github.com/PennyLaneAI/pennylane.git@master
git+https://github.com/PennyLaneAI/pennylane.git@device-api-cap
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: revert this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge PR until this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants