PennyLane-Strawberry Fields Plugin¶
This plugin will not be supported in newer versions of Pennylane. It is compatible with versions of PennyLane up to and including 0.29. Please use Strawberry Fields instead.
The PennyLane-SF plugin integrates the StrawberryFields photonic quantum computing framework with PennyLane’s quantum machine learning capabilities.
PennyLane is a machine learning library for optimization and automatic differentiation of hybrid quantum-classical computations.
Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing photonic quantum circuits.
Once the PennyLane-SF plugin is installed, the provided Strawberry Fields devices can be accessed straight away in PennyLane, without the need to import any additional packages.
PennyLane-SF provides various Strawberry Fields devices for PennyLane:
Optimized simulator that supports only Gaussian operations and photon number resolving measurements.
Specialized simulator giving access to analytic gradients in Gaussian boson sampling.
TensorFlow simulator that supports backpropagation and all continuous-variable operations.
The Strawberry Fields plugin only supports continuous-variable (CV) operations,
Check out these demos to see the PennyLane-SF plugin in action:
You can also use any of the continuous-variable based
demos from the PennyLane documentation, for example
the tutorial on Gaussian transformations,
and simply replace
'default.gaussian' with any of the available Strawberry Fields devices,
dev = qml.device('strawberryfields.gaussian', wires=XXX)