PennyLane v0.5.0 Released

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

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

Better optimization

Adds support for a new optimizer, qml.QNGOptimizer, which optimizes QNodes using quantum natural gradient descent. See [1909.02108] Quantum Natural Gradient for more details.

A new QNode method, QNode.metric_tensor(), has also been added, which returns the block-diagonal approximation to the Fubini-Study metric tensor evaluated on the attached device.

New QNode outputs

QNodes can now return a specified number of samples from a given observable via the top-level pennylane.sample() function. To support this on plugin devices, there is a new Device.sample method.

New operations

Added controlled rotation gates to PennyLane operations and default.qubit plugin.

Faster default.qubit

The default.qubit plugin is now slightly faster, as rotation gates are implemented directly instead of using scipy.linalg.expm.

Better tutorials

Tutorials are now collated into the top-level examples/ folder, and all are executable Python scripts. They are also now automatically built and included in the documentation, check them out here: https://pennylane.readthedocs.io/en/latest/tutorials.html

Links are now also provided at the top of every tutorial page for downloading the tutorial as an executable python script, or downloading the tutorial as a Jupyter notebook.

Breaking changes

Note that there has also been one breaking change for the CV operations. The following CV observables were renamed to comply with the new Operation/Observable scheme:

  • MeanPhoton to NumberOperator
  • Homodyne to QuadOperator
  • NumberState to FockStateProjector

See the full release notes for more details on the latest PennyLane release.

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

Simon Cross, @AroosaIjaz, @nathan , @johannesjmeyer , Rohit Midha, Nicolás Quesada, @Maria_Schuld , Antal Száva, @rooler.

1 Like