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-0-12Q-A', 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.9.0.tar.gz (18.7 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.9.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PennyLane-Forest-0.9.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for PennyLane-Forest-0.9.0.tar.gz
Algorithm Hash digest
SHA256 cfde4a1833a2c903f7a24339785bc3f77943938eded0ceaf660979f9e3664a8b
MD5 0b0f1fce2f331555787baf1852431491
BLAKE2b-256 308122439cc5d31a57f74c71e3cd3f8b57583eb4dec40c6d5dfc653d76b98c91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PennyLane_Forest-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for PennyLane_Forest-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8959eecd56fa057b8fa729f2f4778b4854051995cf64083bdaf47d045c3963d
MD5 0c0d43cf2c4fd631621cf2f0dc0bb9d0
BLAKE2b-256 02ee0d4dda9713be5b074498be23cfe481ec265241e2827888468352b3ec026c

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