PennyLaneAI / catalyst

A JIT compiler for hybrid quantum programs in PennyLane
https://docs.pennylane.ai/projects/catalyst
Apache License 2.0
122 stars 27 forks source link

[Frontend] Update SProd observable tracing #935

Closed erick-xanadu closed 1 month ago

erick-xanadu commented 1 month ago

Context: After change 296316654bd6aabb3ff67eb0bac440fa8d706ee8 in PennyLane, the SProd operation will return the flattened terms.

Description of the Change: This change fixes the tracing of SProd to trace over all terms returned by obs.terms() as opposed to only the first term.

Benefits: Fixes latest/latest/latest

Possible Drawbacks: None

Related GitHub Issues:

[sc-69025]

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 97.92%. Comparing base (bf69c2b) to head (07dff26).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #935 +/- ## ======================================= Coverage 97.92% 97.92% ======================================= Files 71 71 Lines 10243 10246 +3 Branches 1161 1162 +1 ======================================= + Hits 10030 10033 +3 Misses 169 169 Partials 44 44 ```

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