-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update Lightning device TOML files to the new schema #988
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #988 +/- ##
==========================================
- Coverage 97.72% 92.14% -5.59%
==========================================
Files 228 104 -124
Lines 36378 16267 -20111
==========================================
- Hits 35550 14989 -20561
- Misses 828 1278 +450 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! No blocker from me!
@AmintorDusko The doc build is failing because it's building with latest PL, which still doesn't contain the changes that this PR depends on. Once we merge the PR into PL, it will unblock the doc build for Lightning. |
Ohh. Thank you for clarifying, Good job here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @astralcai! Feel free to merge this after CIs are completed 🏖️
**Context:** This PR is part of the new device capabilities initiative to improve feature parity between PennyLane and Catalyst. See [this ADR](PennyLaneAI/adrs#78) for more context. A new TOML schema has been defined, and the relevant module implemented in PennyLane: - PennyLaneAI/pennylane#6407 - PennyLaneAI/pennylane#6433. **Description of the Change:** - Removes the `toml` module and replaces all usages with imports from PennyLane - Update usages of `DeviceCapabilities` to match the new definition in PennyLaneAI/pennylane#6407 - Removes use of about-to-be-deprecated return_type of MPs - Updates all TOML files to use the new schema. - A PR opened in Lightning PennyLaneAI/pennylane-lightning#988 that updates the TOML file of the Lightning devices to the new schema. **Benefits:** A step towards feature parity between PennyLane and Catalyst. **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. This will change the behaviour of decomposition for some circuits. **Related GitHub Issues:** [sc-71888] [sc-71728] [sc-71730] --------- Co-authored-by: Romain Moyard <[email protected]>
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:
DeviceCapabilities
data class and the TOML module. pennylane#6407capabilities
to the device API pennylane#6433.As well as updates made to Catalyst:
Description of the Change:
lightning_qubit.toml
,lightning_kokkos.toml
,lightning_gpu.toml
to the new schema_operations
and_observables
fromLightningQubit
,LightningKokkos
, andLightningGPU
as they are now available viaDevice.capabilities
that is loaded from the TOML file.Benefits:
A step towards feature parity across the ecosystem.
Possible Drawbacks:
operator.gates.decomp
andoperator.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]
[sc-77214]