Closed lillian542 closed 1 month ago
Attention: Patch coverage is 85.71429%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 97.90%. Comparing base (
eb25b44
) to head (045db46
).
Files | Patch % | Lines |
---|---|---|
frontend/catalyst/jax_tracer.py | 0.00% | 0 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context: Verification so far checks that the observables are supported, but not that the measurement type is.
Description of the Change:
We add a check to
validate_observables
, and change its name tovalidate_measurements
, as it now more generally validates that both theMeasurementProcess
and the observables on a measurement are valid.Adding this verification caused many tests fail with a
CompilationError
, claiming the measurement is unsupported. This happened in two cases:StateMP
measurements: There was a bug whereProgramFeatures
records any device from the new device API as being in finite-shot mode, even when no shots are passed. This caused theqjit_capabilities.measurement_processes
(which the transform relies on) to be incorrect for the new device API andshots=None
. This PR updates howProgramFeatures
are initialized to fix the bug.shots
, using sample based measurements withoutshots
, or mixing state and sample based measurements in a singleqnode
). These tests have been updated.Related Shortcut Stories: [sc-69062]
Note: I haven't updated any TOML files. The OQC device and all the Lightning TOML files already include measurement processes. The CUDA TOML doesn't, but I'm not sure which MPs it supports, and it's not affected by these changes yet because it still uses the old device API.