# Qml.expval is returning Tensor object

**URL:** <https://discuss.pennylane.ai/t/qml-expval-is-returning-tensor-object/4885>\
**Category:** PennyLane Challenges\
**Created:** [July 15, 2024, 1:00pm UTC](https://discuss.pennylane.ai/t/qml-expval-is-returning-tensor-object/4885 "2024-07-15T13:00:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [July 18, 2024, 2:32am UTC](https://discuss.pennylane.ai/t/qml-expval-is-returning-tensor-object/4885/4 "2024-07-18T02:32:20Z")

</div>

Hi @phani.bharath ,

You’re using a very old version of PennyLane. Please make sure to update it with `pip install pennylane --upgrade`

Also, for future questions about this challenge it’s better to ask them on [this thread](https://discuss.pennylane.ai/t/pennylane-challenge-keeping-expectations-low/4501/5) so that others can find answers there too!

I hope this solves your issue.

---

_[View the full topic](https://discuss.pennylane.ai/t/qml-expval-is-returning-tensor-object/4885)._
