catalyst
catalyst copied to clipboard
[Frontend] Make tests toml-schema independent
Context: Transition to the quantum device config schema 2
Description of the Change: Solve a regarding toml schema 2 udpate in tests by switching our test custom devices from toml text manipulations to the device capability manipulations
Benefits:
- Tests no longer require toml text manipulations.
- Tests now contain simple examples of custom devices.
- toml-specific code is now locates in
catalyst.utils.toml.
Possible Drawbacks:
Related GitHub Issues: https://github.com/PennyLaneAI/pennylane-lightning/pull/642
Good point, we could just make it compatible with both. I was just going to move to version 2 entirely once the PR is merged. I'm happy with this as well though.
Note there are several other tests that need this update though :)
Note there are several other tests that need this update though :)
@dime10 , are there? I think I changed the device which is used by several tests, and can't see other places.
Note there are several other tests that need this update though :)
@dime10 , are there? I think I changed the device which is used by several tests, and can't see other places.
Have a look at the test_decomposition and test_quantum_control lit tests
Codecov Report
Attention: Patch coverage is 97.01493% with 4 lines in your changes missing coverage. Please review.
Project coverage is 98.07%. Comparing base (
47b3482) to head (eadeb91). Report is 175 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| frontend/catalyst/device/qjit_device.py | 95.12% | 2 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #712 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 70 70
Lines 9599 9601 +2
Branches 754 756 +2
=======================================
+ Hits 9414 9416 +2
Misses 151 151
Partials 34 34
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Have a look at the test_decomposition and test_quantum_control lit tests
@dime10 right, thanks! I have made these tests toml-independent. It required some further code reshaping, could you please review?