Skip to main content

Rigetti backend for the PennyLane library

Project description

Build Status Documentation Status

Contains the PennyLane Forest plugin. This plugin allows three Rigetti devices to work with PennyLane — the wavefunction simulator, the Quantum Virtual Machine (QVM), and Quantum Processing Units (QPUs).

pyQuil is a Python library for quantum programming using the quantum instruction language (Quil) — resulting quantum programs can be executed using the Rigetti Forest SDK and the Rigetti QCS.

PennyLane is a machine learning library for optimization and automatic differentiation of hybrid quantum-classical computations.

Features

  • Provides four devices to be used with PennyLane: forest.numpy_wavefunction, forest.wavefunction, forest.qvm, and forest.qpu. These provide access to the pyQVM Numpy wavefunction simulator, Forest wavefunction simulator, quantum virtual machine (QVM), and quantum processing unit (QPU) respectively.

  • All provided devices support all core qubit PennyLane operations and observables.

  • Provides custom PennyLane operations to cover additional pyQuil operations: T, S, ISWAP, CCNOT, PSWAP, and many more. Every custom operation supports analytic differentiation.

  • Combine Forest and the Rigetti Cloud Services with PennyLane’s automatic differentiation and optimization.

Installation

PennyLane-Forest requires both PennyLane and pyQuil. It can be installed via pip:

$ python -m pip install pennylane-forest

Getting started

Once the PennyLane-Forest plugin is installed, the three provided pyQuil devices can be accessed straight away in PennyLane.

You can instantiate these devices for PennyLane as follows:

import pennylane as qml
dev_numpy = qml.device('forest.numpy_wavefunction', wires=2)
dev_simulator = qml.device('forest.wavefunction', wires=2)
dev_pyqvm = qml.device('forest.qvm', device='2q-pyqvm', shots=1000)
dev_qvm = qml.device('forest.qvm', device='2q-qvm', shots=1000)
dev_qpu = qml.device('forest.qpu', device='Aspen-8', shots=1000)

These devices can then be used just like other devices for the definition and evaluation of QNodes within PennyLane. For more details, see the plugin usage guide and refer to the PennyLane documentation.

Contributing

We welcome contributions - simply fork the PennyLane-Forest repository, and then make a pull request containing your contribution. All contributers to PennyLane-Forest will be listed as authors on the releases.

We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on PennyLane and pyQuil.

Authors

Josh Izaac, Keri A. McKiernan, M. Sohaib Alam, Johannes Jakob Meyer

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

License

PennyLane-Forest is free and open source, released under the BSD 3-Clause license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PennyLane-Forest-0.12.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PennyLane_Forest-0.12.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file PennyLane-Forest-0.12.0.tar.gz.

File metadata

  • Download URL: PennyLane-Forest-0.12.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for PennyLane-Forest-0.12.0.tar.gz
Algorithm Hash digest
SHA256 276baa655dd6e9df04d207a5d279bc38f5e8933acff93f7209564babcb965bc2
MD5 886adc10b1487619f9c8e0a6c87920b1
BLAKE2b-256 2fea485b13535e824548ea737942c737934bf567491199aaec1fc77bc49fc35a

See more details on using hashes here.

File details

Details for the file PennyLane_Forest-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: PennyLane_Forest-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for PennyLane_Forest-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16671347be6e12c7aca63b6a74cb3e942444367c656fa33436126a1f532034fe
MD5 53393659de3a6fbf8e128c602e839aff
BLAKE2b-256 04e8e3b122039580fcf5e50f23cc9d12a0e7bc4b6bf87d1592fd8deb4a1b47d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page