New features since last release
* Add C++ only benchmark for a given list of gates. [(199)](https://github.com/PennyLaneAI/pennylane-lightning/pull/199)
* Wheel-build support for Python 3.10. [(186)](https://github.com/PennyLaneAI/pennylane-lightning/pull/186)
* C++ support for probability, expectation value and variance calculations. [(185)](https://github.com/PennyLaneAI/pennylane-lightning/pull/185)
Improvements
* `setup.py` adds debug only when --debug is given [(208)](https://github.com/PennyLaneAI/pennylane-lightning/pull/208)
* Add new highly-performant C++ kernels for quantum gates. [(202)](https://github.com/PennyLaneAI/pennylane-lightning/pull/202)
The new kernels significantly improve the runtime performance of PennyLane-Lightning
for both differentiable and non-differentiable workflows. Here is an example workflow
using the adjoint differentiation method with a circuit of 5 strongly entangling layers:
python
import pennylane as qml
from pennylane import numpy as np
from pennylane.templates.layers import StronglyEntanglingLayers
from numpy.random import random
np.random.seed(42)
n_layers = 5
n_wires = 6
dev = qml.device("lightning.qubit", wires=n_wires)
qml.qnode(dev, diff_method="adjoint")
def circuit(weights):
StronglyEntanglingLayers(weights, wires=list(range(n_wires)))
return [qml.expval(qml.PauliZ(i)) for i in range(n_wires)]
init_weights = np.random.random(StronglyEntanglingLayers.shape(n_layers=n_layers, n_wires=n_wires))
params = np.array(init_weights,requires_grad=True)
jac = qml.jacobian(circuit)(params)
The latest release shows improved performance on both single and multi-threaded evaluations!
<img src="https://raw.githubusercontent.com/PennyLaneAI/pennylane-lightning/v0.21.0-rc0/doc/_static/lightning_v20_v21_bm.png" width=50%/>
* Ensure debug info is built into dynamic libraries. [(201)](https://github.com/PennyLaneAI/pennylane-lightning/pull/201)
Documentation
* New guidelines on adding and benchmarking C++ kernels. [(202)](https://github.com/PennyLaneAI/pennylane-lightning/pull/202)
Bug fixes
* Update clang-format version [(219)](https://github.com/PennyLaneAI/pennylane-lightning/pull/219)
* Fix failed tests on Windows. [(218)](https://github.com/PennyLaneAI/pennylane-lightning/pull/218)
* Fix failed tests for the non-binary wheel. [(213)](https://github.com/PennyLaneAI/pennylane-lightning/pull/213)
* Add virtual destructor to C++ state-vector classes. [(200)](https://github.com/PennyLaneAI/pennylane-lightning/pull/200)
Contributors
This release contains contributions from (in alphabetical order):
Ali Asadi, Amintor Dusko, Chae-Yeun Park, Lee James O'Riordan