Package: amazon-braket-pennylane-plugin
The Amazon Braket PennyLane plugin offers four Amazon Braket quantum devices to work with PennyLane:braket.aws.qubitfor running with the Amazon Braket service’s quantum devices, both QPUs and simulatorsbraket.local.qubitfor running the Amazon Braket SDK’s local simulator where you can optionally specify the backend (“default”, “braket_sv”, “braket_dm” etc)braket.aws.ahsfor running with the Amazon Braket service’s analog Hamiltonian simulation QPUsbraket.local.ahsfor running analog Hamiltonian simulation on Amazon Braket SDK’s local simulatorTheAmazon Braket Python SDKis an open source
library that provides a framework to interact with quantum computing hardware
devices and simulators through Amazon Braket.PennyLaneis 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/.FeaturesProvides four devices to be used with PennyLane:Two gate-based devices,braket.aws.qubitfor running on the Amazon Braket service,
andbraket.local.qubitfor running on the Amazon Braket SDK’s local simulator.Two analog Hamiltonian simulation devices,braket.aws.ahsfor running on QPU via the Amazon Braket service,
andbraket.local.ahsfor 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 supportParametrizedEvolutionoperators created via thePennyLane pulse programmingmodule.PennyLane observables in the measurement (Z) basis are supportedProvides translation of user-defined pulse level control to simulation and hardware implementationInstallationBefore you begin working with the Amazon Braket PennyLane Plugin, make sure
that you installed or configured the following prerequisites:Download and installPython 3.9or greater.
If you are using Windows, choose the optionAdd Python to environment variablesbefore you begin the installation.Make sure that your AWS account is onboarded to Amazon Braket, as per the instructionshere.Download and installPennyLane:pipinstallpennylaneYou can then install the latest release of the PennyLane-Braket plugin as follows:pipinstallamazon-braket-pennylane-pluginYou 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:gitclonehttps://github.com/amazon-braket/amazon-braket-pennylane-plugin-python.gitcdamazon-braket-pennylane-plugin-pythonpipinstall.You can check your currently installed version ofamazon-braket-pennylane-pluginwithpip show:pipshowamazon-braket-pennylane-pluginor alternatively from within Python:frombraketimportpennylane_pluginpennylane_plugin.__version__TestsMake sure to install test dependencies first:pipinstall-e"amazon-braket-pennylane-plugin-python[test]"Unit testsRun the unit tests using:tox-eunit-testsTo run an individual test:tox-eunit-tests---k'your_test'To run linters and unit tests:toxIntegration testsTo run the integration tests, set theAWS_PROFILEas explained in the amazon-braket-sdk-pythonREADME:exportAWS_PROFILE=Your_Profile_NameRunning the integration tests creates an S3 bucket in the same account as theAWS_PROFILEwith the following naming conventionamazon-braket-pennylane-plugin-integ-tests-{account_id}.Run the integration tests with:tox-einteg-testsTo run an individual integration test:tox-einteg-tests---k'your_test'DocumentationTo build the HTML documentation, run:tox-edocsThe documentation can then be found in thedoc/build/documentation/html/directory.ContributingWe welcome contributions - simply fork the repository of this plugin, and then make apull requestcontaining 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.SupportSource Code:https://github.com/amazon-braket/amazon-braket-pennylane-plugin-pythonIssue Tracker:https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/issuesGeneral Questions:https://quantumcomputing.stackexchange.com/questions/ask(add the tag amazon-braket)PennyLane Forum:https://discuss.pennylane.aiIf 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.LicenseThis project is licensed under the Apache-2.0 License.