Closed lillian542 closed 1 month ago
[sc-60188] [sc-60187]
Hello. You may have forgotten to update the changelog!
Please edit doc/changelog.md
on your branch with:
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.92%. Comparing base (
1e5c6d6
) to head (3444494
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context: Some backends do not natively support sums of observables (e.g.
qml.expval(X(0) + Y(1))
).This is already taken care of by the
split_non_commuting
transform if the backend in question also doesn't support non-commuting observables, but applyingsplit_non_commuting
to handle sums on for devices that support non-commuting measurements will result in unnecessarily splitting executions into multiple tapes.Description of the Change: If
split_non_commuting
is not being added to the transform program already, and the device does not support sum observables, we add the transformsplit_to_single_terms
, which splits the sums but leaves them all on a single tape. Supporting eitherHamiltonian
orSum
is taken to indicate support for summed observables.