Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failing
test_specs
test cases for legacy opmath (#5871)
**Context:** Latest failures with legacy opmath: https://github.com/PennyLaneAI/pennylane/actions/runs/9557831967/job/26346373805 **Description of the Change:** - Replaces `qml.X(0) + qml.Y(1)` with `qml.sum(qml.X(0), qml.Y(1))` because the `Sum` here does not have `data` but `Hamiltonian` does (it treats the two coefficients of `1` and `1` as data), which caused `test_int_specs_level` to fail at verifying the number of parameters. - Adds a `__len__` to the legacy `Hamiltonian` such that `assert len(specs_list) == len(H)` in `test_splitting_transforms` passes correctly. [sc-66284]
- Loading branch information