Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump tensorflow to 2.15 in CI (#4847)
For some reason in 2.15, the `ndim()` of an abstract tensor with shape specified as `None` was -1, so it didn't raise an error, and didn't get handled with [this exception handling](https://github.com/PennyLaneAI/pennylane/blob/aab9ed91110ac95938fe2275625e1845970d5a9c/pennylane/operation.py#L1091) **Description of the change** `qml.math.ndim(tensor)` always returns `len(tensor.shape)` for tensorflow. this will still raise errors as expected for abstract tensors with abstract shapes (only happens when the user specifies the shape as None before compiling a function). ran a bunch of tests (tf interface tests, the `tf.function` test that failed in test_operation.py) locally with python 3.9, TF 2.10 just to make sure I didn't break old versions of tensorflow, they all passed 🙌
- Loading branch information