PennyLane-Strawberry Fields Plugin¶
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 two provided Strawberry Fields devices can be accessed straight away in PennyLane, without the need to import any additional packages.
PennyLane-SF provides two Strawberry Fields devices for PennyLane:
Optimized simulator that supports only Gaussian operations and photon number resolving measurements.
To see the PennyLane-SF plugin in action, you can 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)
'strawberryfields.fock' device is explicitly used in the
quantum neural net tutorial.
To filter tutorials that use a StrawberryFields device, use the “Strawberry Fields” filter on the right panel of the demos.