# PennyLane v0.4.0 Released

**URL:** <https://discuss.pennylane.ai/t/pennylane-v0-4-0-released/187>\
**Category:** PennyLane Development\
**Created:** [July 24, 2019, 6:55am UTC](https://discuss.pennylane.ai/t/pennylane-v0-4-0-released/187 "2019-07-24T06:55:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [July 24, 2019, 6:55am UTC](https://discuss.pennylane.ai/t/pennylane-v0-4-0-released/187/1 "2019-07-24T06:55:59Z")

</div>

Hi everyone, we’re excited to announce PennyLane version 0.4.0.

This is a major release, that contains some great new features and improvements. These include:

- **Changes in how we request expectation values**.  
`qml.expval()` is now a top-level function, and is no longer a package of classes. To request an expectation value of an observable, the following syntax is now used:

- **Variance support.**  
QNodes can now return the variance of observables, via the top-level `qml.var()` function. To support this on plugin devices, there is a new `Device.var` method. We also support _analytic gradients on hardware_ of variance values!

- **Multi-qubit observables**  
Adds support for multi-qubit observables using the `qml.Hermitian` observable.

- **New QML Templates**

- **Faster `default.qubit`**  
The `default.qubit` plugin now uses `np.tensordot` when applying quantum operations and evaluating expectations, resulting in significant speedup!

See [the full release notes](https://github.com/XanaduAI/pennylane/releases/tag/v0.4.0) for more details on the latest PennyLane release.

As always, this release would not have been possible without all the help from our contributors:

@quantshah , riveSunder, @AroosaIjaz, @nathan, @Maria_Schuld

---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [July 24, 2019, 6:56am UTC](https://discuss.pennylane.ai/t/pennylane-v0-4-0-released/187/2 "2019-07-24T06:56:44Z")

</div>



---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [September 9, 2019, 11:08pm UTC](https://discuss.pennylane.ai/t/pennylane-v0-4-0-released/187/3 "2019-09-09T23:08:11Z")

</div>


