Skip to main content

Rigetti backend for the PennyLane library

Project description

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 three devices to be used with PennyLane: forest.wavefunction, forest.qvm, and forest.qpu. These provide access to the Forest wavefunction simulator, quantum virtual machine (QVM), and quantum processing unit (QPU) respectively.

  • All provided devices support all core qubit PennyLane operations.

  • In addition, forest.wavefunction supports all core qubit PennyLane expectation values. forest.qvm and forest.qpu only support PauliZ expectation values.

  • 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_simulator = qml.device('forest.wavefunction', wires=2)
dev_qvm = qml.device('forest.qvm', device='2q-qvm', wires=2, 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

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.1.1.tar.gz (12.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: PennyLane-Forest-0.1.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for PennyLane-Forest-0.1.1.tar.gz
Algorithm Hash digest
SHA256 913c5bfa62141aba0eb954786980af8f4d0d7d5488fb3d1014267f6d232b8b0f
MD5 72ef3931bed675099095699c7ba3582a
BLAKE2b-256 d1641298e2373f345dd0f2ed0684df42272190fba92022c562cd0683f36525cc

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