PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.17k stars 568 forks source link

Fix `hadamard_grad` with wires-broadcasted measurements #5860

Closed dwierichs closed 1 week ago

dwierichs commented 1 week ago

Context:

Description of the Change: Takes the case into account where qml.probs does not have wires specified, requiring hadamard_grad to consider tape wires.

Benefits:

Possible Drawbacks:

Related GitHub Issues: Fixes #5840

[sc-65711]

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 99.66%. Comparing base (248a808) to head (1990579).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5860 +/- ## ========================================== - Coverage 99.67% 99.66% -0.01% ========================================== Files 422 422 Lines 40655 40362 -293 ========================================== - Hits 40522 40228 -294 - Misses 133 134 +1 ```

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