This section contains the API documentation for the PennyLane-Forest plugin.


Unless you are a PennyLane plugin developer, you likely do not need to use these classes and functions directly.

See the overview page for more details using the available Forest devices with PennyLane.

Plugin overview


load_program(program) Load a pyquil.Program instance as a PennyLane template.
load_quil(quil_str) Load a quil string as a PennyLane template.
load_quil_from_file(file_path) Load a quil file as a PennyLane template.


CPHASE(*params[, wires, do_queue, id]) CHPASE(phi, q, wires) Controlled-phase gate.
ISWAP(wires) iSWAP gate.
NumpyWavefunctionDevice(wires, *[, shots]) NumpyWavefunction simulator device for PennyLane.
PSWAP(wires) Phase-SWAP gate.
QVMDevice(device, *[, wires, shots, noisy]) Forest QVM device for PennyLane.
WavefunctionDevice(wires, *[, shots]) Wavefunction simulator device for PennyLane.

Class Inheritance Diagram

Inheritance diagram of pennylane_forest.ops.CPHASE, pennylane_forest.ops.ISWAP, pennylane_forest.numpy_wavefunction.NumpyWavefunctionDevice, pennylane_forest.ops.PSWAP, pennylane_forest.qvm.QVMDevice, pennylane_forest.wavefunction.WavefunctionDevice