amazon-braket-pennylane-plugin


Nameamazon-braket-pennylane-plugin JSON
Version 1.25.0 PyPI version JSON
download
home_pagehttps://github.com/amazon-braket/amazon-braket-pennylane-plugin-python
SummaryAn open source framework for using Amazon Braket devices with the PennyLane quantum machine learning library
upload_time2024-04-22 16:18:50
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python>=3.8.2
licenseApache License 2.0
keywords amazon aws quantum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Amazon Braket PennyLane Plugin
##############################

.. image:: https://img.shields.io/pypi/v/amazon-braket-pennylane-plugin.svg
    :alt: Latest Version
    :target: https://pypi.python.org/pypi/amazon-braket-pennylane-plugin
.. image:: https://img.shields.io/pypi/pyversions/amazon-braket-pennylane-plugin.svg
    :alt: Supported Python Versions
    :target: https://pypi.python.org/pypi/amazon-braket-pennylane-plugin
.. image:: https://img.shields.io/github/actions/workflow/status/amazon-braket/amazon-braket-strawberryfields-plugin-python/python-package.yml?branch=main&logo=github    
    :alt: Build Status
    :target: https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/actions?query=workflow%3A%22Python+package%22
.. image:: https://codecov.io/gh/amazon-braket/amazon-braket-pennylane-plugin-python/branch/main/graph/badge.svg?token=VPPM8BJKW4
    :alt: codecov
    :target: https://codecov.io/gh/amazon-braket/amazon-braket-pennylane-plugin-python
.. image:: https://img.shields.io/readthedocs/amazon-braket-pennylane-plugin-python.svg?logo=read-the-docs
    :alt: Documentation Status
    :target: https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/?badge=latest

The Amazon Braket PennyLane plugin offers four 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)
* ``braket.aws.ahs`` for running with the Amazon Braket service's analog Hamiltonian simulation QPUs
* ``braket.local.ahs`` for running analog Hamiltonian simulation on Amazon Braket SDK's local simulator

.. header-start-inclusion-marker-do-not-remove

The `Amazon Braket Python SDK <https://github.com/amazon-braket/amazon-braket-sdk-python>`__ is an open source
library that provides a framework to interact with quantum computing hardware
devices and simulators through Amazon Braket.

`PennyLane <https://pennylane.readthedocs.io>`__ is a machine learning library for optimization and automatic
differentiation of hybrid quantum-classical computations.

.. header-end-inclusion-marker-do-not-remove

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

Features
========

Provides four devices to be used with PennyLane:

* Two gate-based devices, ``braket.aws.qubit`` for running on the Amazon Braket service,
  and ``braket.local.qubit`` for running on the Amazon Braket SDK's local simulator.
* Two analog Hamiltonian simulation devices, ``braket.aws.ahs`` for running on QPU via the Amazon Braket service,
  and ``braket.local.ahs`` for running on the Amazon Braket SDK's local simulator.
* Combines Amazon Braket with PennyLane's automatic differentiation and optimization.


For the gate-based devices:

* 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.


For the analog Hamiltonian simulation devices:

* The devices support ``ParametrizedEvolution`` operators created via the
  `PennyLane pulse programming <https://docs.pennylane.ai/en/stable/code/qml_pulse.html>`_ module.
* PennyLane observables in the measurement (Z) basis are supported
* Provides translation of user-defined pulse level control to simulation and hardware implementation


.. installation-start-inclusion-marker-do-not-remove

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.9 <https://www.python.org/downloads/>`__ 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 <https://github.com/amazon-braket/amazon-braket-sdk-python#prerequisites>`__.
* Download and install `PennyLane <https://pennylane.ai/install.html>`__:

  .. code-block:: bash

      pip install pennylane


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

.. code-block:: bash

    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:

.. code-block:: bash

    git clone https://github.com/amazon-braket/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``:

.. code-block:: bash

    pip show amazon-braket-pennylane-plugin


or alternatively from within Python:

.. code-block:: python

    from braket import pennylane_plugin
    pennylane_plugin.__version__

Tests
~~~~~

Make sure to install test dependencies first:

.. code-block:: bash

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

Unit tests
**********

Run the unit tests using:

.. code-block:: bash

    tox -e unit-tests


To run an individual test:

.. code-block:: bash

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


To run linters, doc, and unit tests:

.. code-block:: bash

    tox

Integration tests
*****************

To run the integration tests, set the ``AWS_PROFILE`` as explained in the amazon-braket-sdk-python
`README <https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/README.md>`__:

.. code-block:: bash

    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:

.. code-block:: bash

    tox -e integ-tests

To run an individual integration test:

.. code-block:: bash

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

Documentation
~~~~~~~~~~~~~

To build the HTML documentation, run:

.. code-block:: bash

  tox -e docs

The documentation can then be found in the ``doc/build/documentation/html/`` directory.

.. installation-end-inclusion-marker-do-not-remove

Contributing
============

We welcome contributions - simply fork the repository of this plugin, and then make a
`pull request <https://help.github.com/articles/about-pull-requests/>`__ 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-start-inclusion-marker-do-not-remove

Support
=======

- **Source Code:** https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python
- **Issue Tracker:** https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/issues
- **General Questions:** https://quantumcomputing.stackexchange.com/questions/ask (add the tag amazon-braket)
- **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.

.. support-end-inclusion-marker-do-not-remove

.. license-start-inclusion-marker-do-not-remove

License
=======

This project is licensed under the Apache-2.0 License.

.. license-end-inclusion-marker-do-not-remove

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python",
    "name": "amazon-braket-pennylane-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.2",
    "maintainer_email": null,
    "keywords": "Amazon AWS Quantum",
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/59/90/ec8be07b9cb708a689844cc6cd900ab85c0dd948e13fcc4045dd0fc559c2/amazon_braket_pennylane_plugin-1.25.0.tar.gz",
    "platform": null,
    "description": "Amazon Braket PennyLane Plugin\n##############################\n\n.. image:: https://img.shields.io/pypi/v/amazon-braket-pennylane-plugin.svg\n    :alt: Latest Version\n    :target: https://pypi.python.org/pypi/amazon-braket-pennylane-plugin\n.. image:: https://img.shields.io/pypi/pyversions/amazon-braket-pennylane-plugin.svg\n    :alt: Supported Python Versions\n    :target: https://pypi.python.org/pypi/amazon-braket-pennylane-plugin\n.. image:: https://img.shields.io/github/actions/workflow/status/amazon-braket/amazon-braket-strawberryfields-plugin-python/python-package.yml?branch=main&logo=github    \n    :alt: Build Status\n    :target: https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/actions?query=workflow%3A%22Python+package%22\n.. image:: https://codecov.io/gh/amazon-braket/amazon-braket-pennylane-plugin-python/branch/main/graph/badge.svg?token=VPPM8BJKW4\n    :alt: codecov\n    :target: https://codecov.io/gh/amazon-braket/amazon-braket-pennylane-plugin-python\n.. image:: https://img.shields.io/readthedocs/amazon-braket-pennylane-plugin-python.svg?logo=read-the-docs\n    :alt: Documentation Status\n    :target: https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/?badge=latest\n\nThe Amazon Braket PennyLane plugin offers four Amazon Braket quantum devices to work with PennyLane:\n\n* ``braket.aws.qubit`` for running with the Amazon Braket service's quantum devices, both QPUs and simulators\n* ``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)\n* ``braket.aws.ahs`` for running with the Amazon Braket service's analog Hamiltonian simulation QPUs\n* ``braket.local.ahs`` for running analog Hamiltonian simulation on Amazon Braket SDK's local simulator\n\n.. header-start-inclusion-marker-do-not-remove\n\nThe `Amazon Braket Python SDK <https://github.com/amazon-braket/amazon-braket-sdk-python>`__ is an open source\nlibrary that provides a framework to interact with quantum computing hardware\ndevices and simulators through Amazon Braket.\n\n`PennyLane <https://pennylane.readthedocs.io>`__ is a machine learning library for optimization and automatic\ndifferentiation of hybrid quantum-classical computations.\n\n.. header-end-inclusion-marker-do-not-remove\n\nThe plugin documentation can be found here: `<https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/>`__.\n\nFeatures\n========\n\nProvides four devices to be used with PennyLane:\n\n* Two gate-based devices, ``braket.aws.qubit`` for running on the Amazon Braket service,\n  and ``braket.local.qubit`` for running on the Amazon Braket SDK's local simulator.\n* Two analog Hamiltonian simulation devices, ``braket.aws.ahs`` for running on QPU via the Amazon Braket service,\n  and ``braket.local.ahs`` for running on the Amazon Braket SDK's local simulator.\n* Combines Amazon Braket with PennyLane's automatic differentiation and optimization.\n\n\nFor the gate-based devices:\n\n* Both devices support most core qubit PennyLane operations.\n* All PennyLane observables are supported.\n* Provides custom PennyLane operations to cover additional Braket operations: ``ISWAP``, ``PSWAP``, and many more.\n  Every custom operation supports analytic differentiation.\n\n\nFor the analog Hamiltonian simulation devices:\n\n* The devices support ``ParametrizedEvolution`` operators created via the\n  `PennyLane pulse programming <https://docs.pennylane.ai/en/stable/code/qml_pulse.html>`_ module.\n* PennyLane observables in the measurement (Z) basis are supported\n* Provides translation of user-defined pulse level control to simulation and hardware implementation\n\n\n.. installation-start-inclusion-marker-do-not-remove\n\nInstallation\n============\n\nBefore you begin working with the Amazon Braket PennyLane Plugin, make sure\nthat you installed or configured the following prerequisites:\n\n\n* Download and install `Python 3.9 <https://www.python.org/downloads/>`__ or greater.\n  If you are using Windows, choose the option *Add Python to environment variables* before you begin the installation.\n* Make sure that your AWS account is onboarded to Amazon Braket, as per the instructions\n  `here <https://github.com/amazon-braket/amazon-braket-sdk-python#prerequisites>`__.\n* Download and install `PennyLane <https://pennylane.ai/install.html>`__:\n\n  .. code-block:: bash\n\n      pip install pennylane\n\n\nYou can then install the latest release of the PennyLane-Braket plugin as follows:\n\n.. code-block:: bash\n\n    pip install amazon-braket-pennylane-plugin\n\n\nYou can also install the development version from source by cloning this repository and running a\npip install command in the root directory of the repository:\n\n.. code-block:: bash\n\n    git clone https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python.git\n    cd amazon-braket-pennylane-plugin-python\n    pip install .\n\n\nYou can check your currently installed version of ``amazon-braket-pennylane-plugin`` with ``pip show``:\n\n.. code-block:: bash\n\n    pip show amazon-braket-pennylane-plugin\n\n\nor alternatively from within Python:\n\n.. code-block:: python\n\n    from braket import pennylane_plugin\n    pennylane_plugin.__version__\n\nTests\n~~~~~\n\nMake sure to install test dependencies first:\n\n.. code-block:: bash\n\n    pip install -e \"amazon-braket-pennylane-plugin-python[test]\"\n\nUnit tests\n**********\n\nRun the unit tests using:\n\n.. code-block:: bash\n\n    tox -e unit-tests\n\n\nTo run an individual test:\n\n.. code-block:: bash\n\n    tox -e unit-tests -- -k 'your_test'\n\n\nTo run linters, doc, and unit tests:\n\n.. code-block:: bash\n\n    tox\n\nIntegration tests\n*****************\n\nTo run the integration tests, set the ``AWS_PROFILE`` as explained in the amazon-braket-sdk-python\n`README <https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/README.md>`__:\n\n.. code-block:: bash\n\n    export AWS_PROFILE=Your_Profile_Name\n\n\nRunning the integration tests creates an S3 bucket in the same account as the ``AWS_PROFILE``\nwith the following naming convention ``amazon-braket-pennylane-plugin-integ-tests-{account_id}``.\n\nRun the integration tests with:\n\n.. code-block:: bash\n\n    tox -e integ-tests\n\nTo run an individual integration test:\n\n.. code-block:: bash\n\n    tox -e integ-tests -- -k 'your_test'\n\nDocumentation\n~~~~~~~~~~~~~\n\nTo build the HTML documentation, run:\n\n.. code-block:: bash\n\n  tox -e docs\n\nThe documentation can then be found in the ``doc/build/documentation/html/`` directory.\n\n.. installation-end-inclusion-marker-do-not-remove\n\nContributing\n============\n\nWe welcome contributions - simply fork the repository of this plugin, and then make a\n`pull request <https://help.github.com/articles/about-pull-requests/>`__ containing your contribution.\nAll contributers to this plugin will be listed as authors on the releases.\n\nWe also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects\nor applications built with the plugin.\n\n.. support-start-inclusion-marker-do-not-remove\n\nSupport\n=======\n\n- **Source Code:** https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python\n- **Issue Tracker:** https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/issues\n- **General Questions:** https://quantumcomputing.stackexchange.com/questions/ask (add the tag amazon-braket)\n- **PennyLane Forum:** https://discuss.pennylane.ai\n\nIf you are having issues, please let us know by posting the issue on our Github issue tracker, or\nby asking a question in the forum.\n\n.. support-end-inclusion-marker-do-not-remove\n\n.. license-start-inclusion-marker-do-not-remove\n\nLicense\n=======\n\nThis project is licensed under the Apache-2.0 License.\n\n.. license-end-inclusion-marker-do-not-remove\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "An open source framework for using Amazon Braket devices with the PennyLane quantum machine learning library",
    "version": "1.25.0",
    "project_urls": {
        "Homepage": "https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python"
    },
    "split_keywords": [
        "amazon",
        "aws",
        "quantum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64a36b2204ec50aeba01d041bf155c01256064d80f5087c3005d4420cca205f9",
                "md5": "0479f5f011f8685de7477dc33a8c732e",
                "sha256": "4770db5ad1d0837c6d5c49f3edd2ffb494a5a5f698776b4db90ba61b0a22b3e8"
            },
            "downloads": -1,
            "filename": "amazon_braket_pennylane_plugin-1.25.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0479f5f011f8685de7477dc33a8c732e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.2",
            "size": 40314,
            "upload_time": "2024-04-22T16:18:48",
            "upload_time_iso_8601": "2024-04-22T16:18:48.109227Z",
            "url": "https://files.pythonhosted.org/packages/64/a3/6b2204ec50aeba01d041bf155c01256064d80f5087c3005d4420cca205f9/amazon_braket_pennylane_plugin-1.25.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5990ec8be07b9cb708a689844cc6cd900ab85c0dd948e13fcc4045dd0fc559c2",
                "md5": "91817b432eb226940916d45c2de2a6d1",
                "sha256": "ac5cf9bc324eba1f9409eab821ca29a25cf242f12256f48e7274c6ab93569f96"
            },
            "downloads": -1,
            "filename": "amazon_braket_pennylane_plugin-1.25.0.tar.gz",
            "has_sig": false,
            "md5_digest": "91817b432eb226940916d45c2de2a6d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.2",
            "size": 36427,
            "upload_time": "2024-04-22T16:18:50",
            "upload_time_iso_8601": "2024-04-22T16:18:50.658027Z",
            "url": "https://files.pythonhosted.org/packages/59/90/ec8be07b9cb708a689844cc6cd900ab85c0dd948e13fcc4045dd0fc559c2/amazon_braket_pennylane_plugin-1.25.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 16:18:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amazon-braket",
    "github_project": "amazon-braket-pennylane-plugin-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "amazon-braket-pennylane-plugin"
}
        
Elapsed time: 0.24928s