PennyLane-Strawberry Fields Plugin¶
- Release
0.29.1
Warning
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.
Devices¶
PennyLane-SF provides various Strawberry Fields devices for PennyLane:
Note
The Strawberry Fields plugin only supports continuous-variable (CV) operations,
such as Squeezing
, or NumberOperator
.
Tutorials¶
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,
such as 'strawberryfields.gaussian'
:
dev = qml.device('strawberryfields.gaussian', wires=XXX)