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 bug in Tensor equal check #5877

Closed astralcai closed 1 week ago

astralcai commented 1 week ago

Fixes bug where qml.equal incorrectly returns True when a Tensor is not equal with another non-Tensor observable.

github-actions[bot] commented 1 week ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md with:

astralcai commented 1 week ago

[sc-66438]

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 99.67%. Comparing base (ab8b6d5) to head (f8d6db9). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5877 +/- ## ========================================== - Coverage 99.68% 99.67% -0.01% ========================================== Files 421 421 Lines 40499 40272 -227 ========================================== - Hits 40370 40142 -228 - Misses 129 130 +1 ```

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