GithubHelp home page GithubHelp logo

test-mass-forker-org-1 / amazon-braket-pennylane-plugin-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amazon-braket/amazon-braket-pennylane-plugin-python

0.0 0.0 0.0 712 KB

A plugin for allowing Xanadu PennyLane to use Amazon Braket devices

Home Page: https://amazon-braket-pennylane-plugin-python.readthedocs.io/

License: Apache License 2.0

Python 100.00%

amazon-braket-pennylane-plugin-python's Introduction

Amazon Braket PennyLane Plugin

Latest Version

Supported Python Versions

Build Status

codecov

Documentation Status

Code Style: Black

The Amazon Braket PennyLane plugin offers two Amazon Braket quantum devices to work with PennyLane:

  • braket.aws.qubit for running with the Amazon Braket service's quantum devices, both QPUs and simulators
  • braket.local.qubit for running the Amazon Braket SDK's local simulator where you can optionally specify the backend ("default", "braket_sv", "braket_dm" etc)

The Amazon Braket Python SDK is an open source library that provides a framework to interact with quantum computing hardware devices and simulators through Amazon Braket.

PennyLane is a machine learning library for optimization and automatic differentiation of hybrid quantum-classical computations.

The plugin documentation can be found here: https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/.

Features

  • Provides two devices to be used with PennyLane: braket.aws.qubit for running on the Amazon Braket service, and braket.local.qubit for running on the Amazon Braket SDK's local simulator.
  • Both devices support most core qubit PennyLane operations.
  • All PennyLane observables are supported.
  • Provides custom PennyLane operations to cover additional Braket operations: ISWAP, PSWAP, and many more. Every custom operation supports analytic differentiation.
  • Combines Amazon Braket with PennyLane's automatic differentiation and optimization.

Installation

Before you begin working with the Amazon Braket PennyLane Plugin, make sure that you installed or configured the following prerequisites:

  • Download and install Python 3.7.2 or greater. If you are using Windows, choose the option Add Python to environment variables before you begin the installation.
  • Make sure that your AWS account is onboarded to Amazon Braket, as per the instructions here.
  • Download and install PennyLane:

    pip install pennylane

You can then install the latest release of the PennyLane-Braket plugin as follows:

pip install amazon-braket-pennylane-plugin

You can also install the development version from source by cloning this repository and running a pip install command in the root directory of the repository:

git clone https://github.com/aws/amazon-braket-pennylane-plugin-python.git
cd amazon-braket-pennylane-plugin-python
pip install .

You can check your currently installed version of amazon-braket-pennylane-plugin with pip show:

pip show amazon-braket-pennylane-plugin

or alternatively from within Python:

from braket import pennylane_plugin
pennylane_plugin.__version__

Tests

Make sure to install test dependencies first:

pip install -e "amazon-braket-pennylane-plugin-python[test]"

Unit tests

Run the unit tests using:

tox -e unit-tests

To run an individual test:

tox -e unit-tests -- -k 'your_test'

To run linters and unit tests:

tox

Integration tests

To run the integration tests, set the AWS_PROFILE as explained in the amazon-braket-sdk-python README:

export AWS_PROFILE=Your_Profile_Name

Running the integration tests creates an S3 bucket in the same account as the AWS_PROFILE with the following naming convention amazon-braket-pennylane-plugin-integ-tests-{account_id}.

Run the integration tests with:

tox -e integ-tests

To run an individual integration test:

tox -e integ-tests -- -k 'your_test'

Documentation

To build the HTML documentation, run:

tox -e docs

The documentation can then be found in the doc/build/documentation/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 with the plugin.

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

This project is licensed under the Apache-2.0 License.

amazon-braket-pennylane-plugin-python's People

Contributors

speller26 avatar shpface avatar licedric avatar lundql avatar josh146 avatar ajberdy avatar antalszava avatar albi3ro avatar trbromley avatar krneta avatar math411 avatar avawang1 avatar virajvchaudhari avatar yitchen-tim avatar amazon-braket-ci-bot avatar co9olguy avatar randalld-aws avatar amazon-auto avatar mariaschuld avatar floralph 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.