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
pip show amazon-braket-pennylane-plugin
or alternatively from within Python:
from braket import pennylane_plugin pennylane_plugin.__version__
Make sure to install test dependencies first:
pip install -e "amazon-braket-pennylane-plugin-python[test]"
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:
To run the integration tests, set the
AWS_PROFILE as explained in the amazon-braket-sdk-python
Running the integration tests creates an S3 bucket in the same account as the
with the following naming convention
Run the integration tests with:
tox -e integ-tests
To run an individual integration test:
tox -e integ-tests -- -k 'your_test'
To build the HTML documentation, run:
tox -e docs
The documentation can then be found in the