Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement assert equal for operators (PennyLaneAI#5780)
**Context:** PennyLane currently has a `qml.equal` function which can be used to check the equality of operators, measurements, and tapes. New framework `assert_equal` has been developed which along with checking equality tells the reason for equality failure. **Description of the Change:** - Implement support for `assert_equal` for different type of operators mentioned in [PennyLaneAI#5644](PennyLaneAI#5644) and [PennyLaneAI#5648](PennyLaneAI#5648) - Implementation for the above has been changed such that the negative paths return error messages. - Existing unit tests have been updated to verify the error message. **Benefits:** `assert_equals` for mentioned operators above return more granular reason of failure. This eases debugging of tests. **Possible Drawbacks:** More maintenance **Related GitHub Issues:** Fixes PennyLaneAI#5644 Fixes PennyLaneAI#5648 --------- Co-authored-by: Thomas R. Bromley <[email protected]>
- Loading branch information