Rigetti backend for the PennyLane library
Project description
The PennyLane Forest plugin allows different Rigetti devices to work with PennyLane — the wavefunction simulator, and the Quantum Virtual Machine (QVM).
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 cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations.
The plugin documentation can be found here: https://pennylane-forest.readthedocs.io/en/latest/.
Features
Provides three devices to be used with PennyLane: forest.numpy_wavefunction, forest.wavefunction, and forest.qvm. These provide access to the pyQVM Numpy wavefunction simulator, Forest wavefunction simulator, and quantum virtual machine (QVM) respectively.
All provided devices support all core qubit PennyLane operations and observables.
Provides custom PennyLane operations to cover additional pyQuil operations: ISWAP, PSWAP, and CPHASE. Every custom operation supports analytic differentiation.
Combine Forest and the Rigetti Cloud Services with PennyLane’s automatic differentiation and optimization.
Installation
PennyLane-Forest, as well as all required Python packages mentioned above, can be installed via pip:
$ python -m pip install pennylane-forest
Make sure you are using the Python 3 version of pip.
Alternatively, you can install PennyLane-Forest from the source code by navigating to the top-level directory and running
$ python setup.py install
Dependencies
PennyLane-Forest requires the following libraries be installed:
Python >=3.6
as well as the following Python packages:
Note that the latest PyQuil version 3.0 is not currently supported.
If you currently do not have Python 3 installed, we recommend Anaconda for Python 3, a distributed version of Python packaged for scientific computation.
Additionally, if you would like to compile the quantum instruction language (Quil) and run it locally using a quantum virtual machine (QVM) server, you will need to download and install the Forest software development kit (SDK):
Alternatively, you may sign up for Rigetti’s Quantum Cloud Services (QCS) to acquire a Quantum Machine Image (QMI) which will allow you to compile your quantum code and run on real quantum processing units (QPUs), or on a preinstalled QVM. Note that this requires a valid QCS account.
Tests
To test that the PennyLane-Forest plugin is working correctly you can run
$ make test
in the source folder.
Documentation
To build the HTML documentation, go to the top-level directory and run:
$ make docs
The documentation can then be found in the doc/_build/html/ directory.
Contributing
We welcome contributions - simply fork the repository of this plugin, and then make a pull request containing your contribution. All contributers to this plugin 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.
Support
Source Code: https://github.com/PennyLaneAI/pennylane-forest
Issue Tracker: https://github.com/PennyLaneAI/pennylane-forest/issues
PennyLane Forum: https://discuss.pennylane.ai
If you are having issues, please let us know by posting the issue on our Github issue tracker, or by asking a question in the forum.
License
PennyLane-Forest is free and open source, released under the BSD 3-Clause license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for PennyLane_Forest-0.17.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02397f06c45b3d8d7a41dd03418dcd8b4c9d3bc60c06bbadaff5d7c17d87d37a |
|
MD5 | 4b46c06717f2225485d23c3471988712 |
|
BLAKE2b-256 | 23dc9a3fa3c2c5d95b779ff6140ec280bd358b8bc5ca2aa1824dd103bd55635f |