Skip to main content

Rigetti backend for the PennyLane library

Project description

GitHub Workflow Status (branch) Codecov coverage CodeFactor Grade Read the Docs PyPI PyPI - Python Version

The PennyLane Rigetti plugin allows different 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 Rigetti Quantum Cloud Services (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://docs.pennylane.ai/projects/rigetti.

Features

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

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

Installation

PennyLane-Rigetti, as well as all required Python packages mentioned above, can be installed via pip:

$ python -m pip install pennylane-rigetti

Make sure you are using the Python 3 version of pip.

Alternatively, you can install PennyLane-Rigetti from the source code by navigating to the top-level directory and running

$ python setup.py install

Dependencies

PennyLane-Rigetti requires the following libraries be installed:

as well as the following Python packages:

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) which will allow you to compile your quantum code and run on real QPUs. Note that this requires a valid QCS account and the QCS CLI:

Tests

To test that the PennyLane-Rigetti 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.

Authors

PennyLane-Rigetti is the work of many contributors.

If you are doing research using PennyLane and PennyLane-Rigetti, please cite our paper:

Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, M. Sohaib Alam, Shahnawaz Ahmed, Juan Miguel Arrazola, Carsten Blank, Alain Delgado, Soran Jahangiri, Keri McKiernan, Johannes Jakob Meyer, Zeyue Niu, Antal Száva, and Nathan Killoran. PennyLane: Automatic differentiation of hybrid quantum-classical computations. 2018. arXiv:1811.04968

Support

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-Rigetti 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

PennyLane_Rigetti-0.39.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file PennyLane_Rigetti-0.39.0-py3-none-any.whl.

File metadata

File hashes

Hashes for PennyLane_Rigetti-0.39.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f56b8fa41fa0eff5e111124c315b7487474457b8a5c41e23e645791f9ec03c74
MD5 0cd1f52ba4ee00d3267b739ecd90e261
BLAKE2b-256 00a9a33a3462d7289b7effa26ae9cf46a4f9159e48bb2541c9520802a414d116

See more details on using hashes here.

Supported by

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