Tag: gradients

How to perform parameter initialization of PennyLane’s built-in templates


Category: how-to | Author: Elies Gil-Fuster (Xanadu Resident)
QML algorithms often involve a set of trainable parameters, in most cases, these parameters need to be initialized in a certain fashion before, say, starting a gradient descent. In this how-to, we’ll see how to do precisely that.

How to build a model with chained QNodes


Category: how-to | Author: Josh Izaac (PennyLane team)
In PennyLane, we can easily construct VQE and QAOA-like models. However, the flexibility of PennyLane allows much more interesting models to be constructed. In this how-to, we’ll show you how to chain two QNodes together.

How to calculate the Hessian of a classical-quantum hybrid model


Category: how-to | Author: Josh Izaac (PennyLane Team)
PennyLane QNodes don’t just support computing the derivative—they also support computing the second derivative. Further, the second derivative can be computed on both simulators and quantum hardware. In this how-to, we’ll show you how you can extract the Hessian of a hybrid model using PennyLane in three …