Giter Site home page Giter Site logo

johannesjmeyer / pennylane-forest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pennylaneai/pennylane-rigetti

0.0 1.0 0.0 2.6 MB

This PennyLane plugin allows the Rigetti Forest QPUs, QVM, and wavefunction simulator to optimize quantum circuits.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.71% Python 99.29%

pennylane-forest's Introduction

PennyLane Forest Plugin

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

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.

pennylane-forest's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.