diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d3be7edd9..819c43010 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,7 +12,7 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating - [ ] I have read the [CONTRIBUTING](https://github.com/aws/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md) doc - [ ] I used the commit message format described in [CONTRIBUTING](https://github.com/aws/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md#commit-your-change) -- [ ] I have updated any necessary documentation, including [READMEs](https://github.com/aws/amazon-braket-sdk-python/blob/main/README.md) and [API docs](https://github.com/aws/amazon-braket-sdk-python#braket-python-sdk-api-reference-documentation) (if appropriate) +- [ ] I have updated any necessary documentation, including [READMEs](https://github.com/aws/amazon-braket-sdk-python/blob/main/README.md) and [API docs](https://github.com/aws/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md#documentation-guidelines) (if appropriate) #### Tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcbee924b..88373f012 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,7 +123,7 @@ For the rest of the message, use imperative style and keep things concise but in ### Send a Pull Request -GitHub provides additional document on [Creating a Pull Request](https://help.github.com/articles/creating-a-pull-request/). +GitHub provides additional documentation on [Creating a Pull Request](https://help.github.com/articles/creating-a-pull-request/). Please remember to: * Use commit messages (and PR titles) that follow the guidelines under [Commit Your Change](#commit-your-change). diff --git a/README.md b/README.md index 304657713..1164c68df 100644 --- a/README.md +++ b/README.md @@ -1,175 +1,58 @@ -**This prerelease documentation is confidential and is provided under the terms of your nondisclosure agreement with Amazon Web Services (AWS) or other agreement governing your receipt of AWS confidential information.** +## Amazon Braket Python SDK -The Amazon Braket Python SDK is an open source library that provides a framework that you can use to interact with quantum computing hardware devices through Amazon Braket. This document describes how to configure your environment to use the Amazon Braket (Private Beta) locally on your computer. It does not include information about how to use Amazon Braket (Private Beta) in the AWS console. +The Amazon Braket Python SDK is an open source library that provides a framework that you can use to interact with quantum computing hardware devices through Amazon Braket. -**Getting the latest version** - -Get the latest version of the SDK. If you receive a notice that a new version of the SDK is available, you can update to the latest version. For more information, see [Updating to the latest release](https://github.com/aws/amazon-braket-sdk-python/tree/main#updating-to-the-latest-release). View the [Releases](https://github.com/aws/amazon-braket-sdk-python/releases) page for more information. - -**Providing Feedback and Getting Help** - -To provide feedback or request support, please contact the Amazon Braket team at [amazon-braket-preview-support@amazon.com](mailto:amazon-braket-preview-support@amazon.com?subject=Add%20a%20brief%20description%20of%20the%20issue). - -**Important** - -If you **Star**, **Watch**, or submit a pull request for this repository, other users that have access to this repository are able to see your user name in the list of watchers. If you want to remain anonymous, you should not Watch or Star this repository, nor post any comments or submit a pull request. ## Prerequisites Before you begin working with the Amazon Braket SDK, make sure that you've installed or configured the following prerequisites. ### Python 3.7.2 or greater Download and install Python 3.7.2 or greater from [Python.org](https://www.python.org/downloads/). -If you are using Windows, choose **Add Python to environment variables** before you begin the installation. - -### Using a Virtual Environment -If you want to use a virtual environment for interacting with the Amazon Braket SDK, first install virtualenv with the following command: -```bash -pip install virtualenv -``` - -To learn more, see [virtualenv](https://virtualenv.pypa.io/en/stable/installation/). - -On Windows, you should open a new terminal window to install `virtualenv`. If you use a terminal window that was open before you installed Python, the terminal window does not use the Python environment variables needed. - -After you install `virtualenv`, use the following command to create a virtual environment. When you run this command, it creates a folder named `braketvirtenv`, and uses that folder as the root folder of the virtual environment. You should run the command from a location where you want to create the virtual environment. - -**To create a virtual environment** -```bash -virtualenv braketvirtenv -``` - -Then use one of the following options to activate the virtual environment. - -**To activate the virtual environment on Mac and Linux**: -```bash -source braketvirtenv/bin/activate -``` - -**To activate the virtual environment on Windows** -```bash -cd braketvirtenv\scripts -``` - -```bash -activate -``` - -Then run this command to return the cursor to the parent folder -```bash -cd .. -``` ### Git Install Git from https://git-scm.com/downloads. Installation instructions are provided on the download page. -### Access to Amazon Braket (Private Beta) -You can configure your environment for the Amazon Braket Python SDK, but you need to be granted permission to access Amazon Braket (Private Beta) before you can start making code requests to Amazon Braket. If you’ve not received notification that you have been added to the beta, please contact the Amazon Braket team for assistance using this email address: [amazon-braket-preview-support@amazon.com](mailto:amazon-braket-preview-support@amazon.com?subject=Add%20a%20brief%20description%20of%20the%20issue). - ### IAM user or role with required permissions -To perform the steps in this document and to interact with Amazon Braket, use an account with administrator privileges, such as one with the AdministratorAccess policy applied. To learn more about IAM user, roles, and policies, see [Adding and Removing IAM Identity Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html). - -### AWS CLI +As a managed service, Amazon Braket performs operations on your behalf on the AWS hardware that is managed by Amazon Braket. Amazon Braket can perform only operations that the user permits. You can read more about which permissions are necessary in the AWS Documentation. -#### Install and configure the AWS Command Line Interface (CLI) -Install the [AWS CLI](https://github.com/aws/aws-cli#installation) so that you can interact with AWS via the command line. This is required to perform some steps in this document. Instructions to install and configure the CLI are included on the installation page. +The Braket Python SDK should not require any additional permissions aside from what is required for using Braket. However, if you are using an IAM role with a path in it, you should grant permission for iam:GetRole. -#### Use the following command to install the AWS CLI -```bash -pip install awscli -``` +To learn more about IAM user, roles, and policies, see [Adding and Removing IAM Identity Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html). -#### Configure a profile for the AWS CLI -Configure a CLI profile to use your account to interact with AWS. To learn more, see [Configure AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). - -After you create a profile, use the following command to set the `AWS_PROFILE` so that all future commands can access your AWS account and resources. +### Boto3 and setting up AWS credentials -```bash -export AWS_PROFILE=YOUR_PROFILE_NAME -``` +Follow the installation [instructions](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html) for Boto3 and setting up AWS credentials. ### Configure your AWS account with the resources necessary for Amazon Braket -Use the following link to an AWS CloudFormation template to automatically create the resources that Amazon Braket uses or interacts with in your account. - -**Important** - -If you are using IAM roles for multiple users in your organization to access the Amazon Braket Private Beta from the same account, only open the template and create the stack once for the account. Each role in the account then has access to the resources Amazon Braket needs in the account. - -The template creates the following resources: -- An S3 bucket to store job output. The bucket is named `braket-output-AWSaccountId` where AWSAccountId is your account ID. For example, if your AWS account ID is 123456789012, the bucket is named `braket-output-123456789012`. -- IAM roles named AmazonBraketJobExecutionRole, which is used to run jobs, and AQxFullAccess which is used to interact with the AWS resources that Amazon Braket needs. -- An IAM policy, AmazonBraketFullAccess, that includes permission to use Amazon Braket actions, as well as the permissions necessary to access the S3 bucket created. If you want to use a role that does not have admin permissions, you can apply the AmazonBraketFullAccess policy to the user or role you are using to grant the permissions required to use Amazon Braket beta. - -If you are already logged in to AWS when you click the link to open the template, the resources are created in the current account. If you want to use Amazon Braket beta in a different account, first log in using that account. - -[Amazon Braket CloudFormation Stack Creation template](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://braket-external-assets-prod-us-west-2.s3-us-west-2.amazonaws.com/templates/braket-resources.yaml&stackName=BraketResources) - -When the template loads, select the **I acknowledge that AWS CloudFormation might create IAM resources with custom names** checkbox, and then choose **Create Stack**. - -Wait until the Status changes to **CREATE_COMPLETE**. You may need to refresh the page to see the current status of the stack creation. - -## Setting up the Amazon Braket Python SDKs -Use the steps in this section to install and configure the Amazon Braket Python SDKs for your environment. You should perform the steps in the order in which they are included in this document. +If you are new to Amazon Braket, onboard to the service and create the resources necessary to use Amazon Braket using the [AWS console](https://aws.amazon.com/braket/). -### Download the Amazon Braket GitHub Repositories -The easiest way to get the SDKs is to download them directly from the GitHub site. Because the repositories are private during the Private Beta period, an SSH key is required to access the files remotely from a terminal session. If you download them directly from the GitHub site, you can just extract the files to your system or virtual environment without the extra steps of using an SSH key. You need to log in to GitHub using the account that was whitelisted for the Amazon Braket (Private Beta). +## Installing the Amazon Braket Python SDK +Use the steps in this section to install and configure the Amazon Braket Python SDK for your environment. -Use the following links to download the Amazon Braket Python SDK repos: -- [amazon-braket-schemas-python](https://github.com/aws/amazon-braket-schemas-python/archive/main.zip) -- [amazon-braket-default-simulator-python](https://github.com/aws/amazon-braket-default-simulator-python/archive/main.zip) -- [amazon-braket-sdk-python](https://github.com/aws/amazon-braket-sdk-python/archive/main.zip) - -### Extract the SDK .zip files -Because the files were downloaded directly from GitHub, the folder in the .zip file includes the name of the branch of the GitHub repo that was downloaded, in this case the `main` branch. But to use the files in the SDK, we need to rename the folder to the original name. - -**To rename the folders in the SDK .zip files** -First, extract the .zip files to a location of your choosing. Then open the location where you extracted the folders to. You can use either the GUI file system tools in your OS, or the command line. You should see 3 folders with the following names: -- amazon-braket-schemas-python-main -- amazon-braket-default-simulator-python-main -- amazon-braket-sdk-python-main - -Rename the folders to the following: -- amazon-braket-schemas-python -- amazon-braket-default-simulator-python -- amazon-braket-sdk-python - -Then copy the renamed files and paste them into the `braketvirtenv` folder where you created a virtual environment. Your folder structure should look like this: -```bash -..\YourFolder\braketvirtenv\amazon-braket-sdk-python\ -``` - -### Install the SDK packages -Use the following commands to install the SDKs in the order that they appear: +You can install from source by cloning this repository and running a pip install command in the root directory of the repository: ```bash -pip install -e amazon-braket-schemas-python -``` - -```bash -pip install -e amazon-braket-default-simulator-python +git clone https://github.com/aws/amazon-braket-sdk-python.git +cd amazon-braket-sdk-python +pip install . ``` +### Check the version you have installed +You can view the version of the amazon-braket-sdk you have installed by using the following command: ```bash -pip install -e amazon-braket-sdk-python +pip show amazon-braket-sdk ``` -### Install latest Amazon Braket model in AWS CLI -Run the following commands to install the Braket model. The file is downloaded to the current location. Position the cursor in the folder where you want to download the file before running the command. +You can also check your version of `amazon-braket-sdk` from within Python: -```bash -aws s3 cp s3://braket-external-assets-prod-us-west-2/models/braket-2019-09-01.normal.json braket-model.json ``` -```bash -aws configure add-model --service-model "file://braket-model.json" --service-name braket +>>> import braket._sdk as braket_sdk +>>> braket_sdk.__version__ ``` -## Validate the Configuration -Your environment should now be configured to successfully use the Braket Python SDK to interact with Amazon Braket. You can use the following example to confirm that your settings are correct. -You can confirm that your environment is correctly configured in either of the following ways: -- Create a Python file -- Use a Jupyter notebook +## Usage -## Code sample for validating your configuration -Use the following code sample to validate your environment configuration. +### Running a circuit on an AWS simulator ```python import boto3 @@ -179,72 +62,28 @@ from braket.circuits import Circuit aws_account_id = boto3.client("sts").get_caller_identity()["Account"] device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1") -s3_folder = (f"braket-output-{aws_account_id}", "folder-name") +s3_folder = (f"amazon-braket-output-{aws_account_id}", "folder-name") bell = Circuit().h(0).cnot(0, 1) task = device.run(bell, s3_folder, shots=100) print(task.result().measurement_counts) ``` -The code sample imports the Amazon Braket framework, then defines the execution environment as the AWSQuantumSimulator and the device to use. The `s3_folder` statement defines the Amazon S3 bucket for job output and the folder in the bucket to store job output. This folder is created when you run the job. It then creates a Bell Pair circuit, executes the circuit on the simulator and prints the results of the job. +The code sample imports the Amazon Braket framework, then defines the device to use (the SV1 AWS simulator). The `s3_folder` statement defines the Amazon S3 bucket for the task result and the folder in the bucket to store the task result. This folder is created when you run the task. It then creates a Bell Pair circuit, executes the circuit on the simulator and prints the results of the job. This example can be found in `../examples/bell.py`. ### Available Simulators There is currently one AWS simulator available: - `arn:aws:braket:::device/quantum-simulator/amazon/sv1` – a Schrödinger simulator. Simulates exactly running a job on a quantum computer. Limit of 25 qubits. This simulator samples only from the state vector and outputs an array of bit strings that appears as though it came from a quantum computer. Does not provide a state vector. -#### To validate your configuration using a Python file -1. Open a text editor with example file `../amazon-braket-sdk-python/examples/bell.py`. -1. If desired, modify `folder-name` to the name of the folder to create/use for results in following line: - `s3_folder = (f"braket-output-{aws_account_id}", "folder-name")`. Save the file. -1. Make sure the virtualenv (`braketvirtenv`) is activated, and then position the cursor in the `/examples` folder of the repo. Assuming you created a virtual environment on your `C:` drive in a folder named `braket`, the cursor should be at the following location: -`c:\braket\braketvirtenv\amazon-braket-sdk-python\examples\`. -1. Then use the following command to run the sample: - - ```bash - python bell.py - ``` - -You should see a result similar to the following: -```Counter({'11': 52, '00': 48})``` - -#### To validate your configuration using a Jupyter notebook -See [Installing the Jupyter Software](https://jupyter.org/install) for information about how to install Jupyter. You can use either JupyterLab or classic Jupyter Notebook. - -Run the following commands to install Jupyter and then create a Braket kernel. -```bash -pip install jupyter ipykernel -``` - -```bash -python -m ipykernel install --user --name braket -``` - -After you have installed Jupyter, use this command to open a Jupyter notebook so you can use the SDK within the notebook: -```bash -jupyter notebook -``` -Jupyter opens in a browser window. Choose **New**, and then under **Notebooks**, choose **braket**. - -**Note** If you are using a Jupyter notebook from an prior installation and did not create a Braket kernel, you will not see braket available for the notebook type. Choose Python3 instead. If you choose Python3, you must have the Braket packages installed globally. +### Running a circuit locally -Copy the code sample (above) into the notebook. If you want to use a different folder in the bucket, change `folder-name` to the name of the folder to create. If the folder already exists it uses the existing folder. +The Amazon Braket Python SDK comes bundled with an implementation of a quantum simulator that you can run locally. You can use the local simulator to test quantum tasks constructed using the SDK before you submit them to the Amazon Braket service for execution. An example of how to execute the task locally is included in the repo `../examples/local_bell.py`. -Choose **Run** to execute the code to confirm that your environment is configured correctly. +### Debugging logs -When the job completes, you should see output similar to the following: -`Counter({'00': 52, '11': 48})` +Tasks sent to QPUs don't always run right away. To view task status, you can enable debugging logs. An example of how to enable these logs is included in repo: `../examples/debug_bell.py`. This example enables task logging so that status updates are continuously printed to the terminal after a quantum task is executed. The logs can also be configured to save to a file or output to another stream. You can use the debugging example to get information on the tasks you submit, such as the current status, so that you know when your task completes. -**Important** Tasks may not run immediately on the QPU. IonQ runs tasks once every 24 hours. Rigetti tasks run when the QPU is available, with times varying day to day. - -#### To validate your quantum algorithm locally - -Braket Python SDK comes bundled with an implementation of a quantum simulator that you can run locally. You can use the local simulator to test quantum tasks constructed using the SDK before you submit them to the Amazon Braket service for execution. An example of how to execute the task locally is included in the repo `../examples/local_bell.py`. - -#### Debugging logs - -Tasks sent to QPUs don't always run right away. For IonQ, jobs are run once every 24 hours. For Rigetti, tasks are queued and run when the QPU is available, with the time varying day to day. To view task status, you can enable debugging logs. An example of how to enable these logs is included in repo: `../examples/debug_bell.py`. This example enables task logging so that status updates are continuously printed to console after a quantum task is executed. The logs can also be configured to save to a file or output to another stream. You can use the debugging example to get information on the tasks you submit, such as the current status, so that you know when your task completes. - -## Running a Quantum Algorithm on a Quantum Computer +### Running a Quantum Algorithm on a Quantum Computer With Amazon Braket, you can run your quantum circuit on a physical quantum computer. The following example executes the same Bell Pair example described to validate your configuration on a Rigetti quantum computer. @@ -257,14 +96,14 @@ from braket.aws import AwsDevice aws_account_id = boto3.client("sts").get_caller_identity()["Account"] device = AwsDevice("arn:aws:braket:::device/qpu/rigetti/Aspen-8") -s3_folder = (f"braket-output-{aws_account_id}", "RIGETTI") +s3_folder = (f"amazon-braket-output-{aws_account_id}", "RIGETTI") bell = Circuit().h(0).cnot(0, 1) task = device.run(bell, s3_folder) print(task.result().measurement_counts) ``` -When you execute your task, Amazon Braket polls for a result. By default, Braket polls for 5 days; however, it is possible to change this by modifying the `poll_timeout_seconds` parameter in `AwsDevice.run` (or `AwsQuantumTask`), as in the example below. Keep in mind that if your polling timeout is too short, results may not be returned within the polling time, such as when a QPU is unavailable, and a local timeout error is returned. You can always restart the polling by using `task.result()`. +When you execute your task, Amazon Braket polls for a result. By default, Braket polls for 5 days; however, it is possible to change this by modifying the `poll_timeout_seconds` parameter in `AwsDevice.run`, as in the example below. Keep in mind that if your polling timeout is too short, results may not be returned within the polling time, such as when a QPU is unavailable, and a local timeout error is returned. You can always restart the polling by using `task.result()`. ```python task = device.run(bell, s3_folder, poll_timeout_seconds=86400) # 1 day @@ -272,85 +111,26 @@ print(task.result().measurement_counts) ``` Specify which quantum computer hardware to use by changing the value of the `device_arn` to the value for quantum computer to use: -- **IonQ** "arn:aws:braket:::device/qpu/ionq/ionQdevice" (Available 9:00 AM to 1:00 PM ET M-F) -- **Rigetti** "arn:aws:braket:::device/qpu/rigetti/Aspen-8" (Available 11:00 AM to 1:00 PM ET daily) -- **D-Wave** "arn:aws:braket:::device/qpu/d-wave/DW_2000Q_6" (Available 24/7. See the next section in this document for more information about using D-Wave.) +- **IonQ** "arn:aws:braket:::device/qpu/ionq/ionQdevice" +- **Rigetti** "arn:aws:braket:::device/qpu/rigetti/Aspen-8" +- **D-Wave** "arn:aws:braket:::device/qpu/d-wave/DW_2000Q_6" (See the next section in this document for more information about using D-Wave.) + +**Important** Tasks may not run immediately on the QPU. The QPUs only execute tasks during execution windows. To find their execution windows, please refer to the [AWS console](https://aws.amazon.com/braket/) in the "Devices" tab. ### Using Amazon Braket with D-Wave QPU If you want to use [Ocean](https://docs.ocean.dwavesys.com/en/latest/) with the D-Wave QPU, you can install the [braket-ocean-python-plugin](https://github.com/aws/braket-ocean-python-plugin). Information about how to install the plugin is provided in the [README](https://github.com/aws/braket-ocean-python-plugin/blob/master/README.md) for the repo. -### Using Amazon Braket with PennyLane -To use Amazon Braket with Xanadu [PennyLane](https://pennylane.ai/), install the [Amazon Braket plugin for PennyLane](https://github.com/aws/amazon-braket-pennylane-plugin-python). -Instructions for setting up and using the plugin are provided in the README in the repository. - -### Deactivate the virtual environment -After you are finished using the virtual environment to interact with Amazon Braket, you can deactivate it using the following command. - -**To deactivate the virtual environment on Mac or Linux** -```bash -source braketvirtenv/bin/deactivate -``` - -**To deactivate the virtual environment on Windows** -```bash -cd braketvirtenv\scripts -``` - -```bash -deactivate -``` - -When you want to use it again, you can reactivate it with the same command you used previously. - -## Updating to the latest release -We will periodically make updates and changes the SDK or the model. When you are notified of a change that requires action on your part, use the following steps to update your environment to the latest version. - -### Check the version you have installed -You can view the version of the braket packages that you have installed by using the following commands in the virtual environment: -```bash -pip show amazon-braket-default-simulator -pip show amazon-braket-schemas -pip show amazon-braket-sdk -``` - -You can also check your version of `amazon-braket-sdk-python` from within Python: - -``` ->>> import braket._sdk as braket_sdk ->>> braket_sdk.__version__ -``` - -Compare the version displayed in your local environment with the latest version listed for each of the following release pages: -- [amazon-braket-default-simulator-python](https://github.com/aws/amazon-braket-default-simulator-python/releases) -- [amazon-braket-schemas-python](https://github.com/aws/amazon-braket-schemas-python/releases) -- [amazon-braket-sdk-python](https://github.com/aws/amazon-braket-sdk-python/releases) - -If the version listed is higher than your local version, you should update to the latest release. - -### To get the lastest updates -Perform the steps described in the [Setting up the Amazon Braket Python SDKs](https://github.com/aws/amazon-braket-sdk-python/tree/main#setting-up-the-amazon-amazon-braket-sdk-pythons) section of this document. The links in that section point to the most recent version of the amazon-braket-sdk-python, amazon-braket-schemas-python, amazon-braket-default-simulator-python, and model file you need to set up the new version of the SDK. - -You can extract the file to the same location you are using and replace the existing files with the updated SDK. This lets you continue to use the same virtual environment. - ## Sample Notebooks Coming soon ## Braket Python SDK API Reference Documentation -To view the API Reference for the SDK, either download the .zip file or building it in your local environment. - -**To download the API Reference .zip file** - -Use the following command to download the .zip file -```bash -aws s3 cp s3://braket-external-assets-prod-us-west-2/sdk-docs/built-sdk-documentation.zip braket-sdk-documentation.zip -``` -Then extract the `braket-sdk-documentation.zip` file to your local environment. After you extract the file, open the index.html file in the `SDK Documentation` folder. **To generate the API Reference HTML in your local environment** To generate the HTML, first change directories (`cd`) to position the cursor in the `amazon-braket-sdk-python` directory. Then, run the following command to generate the HTML documentation files: ```bash +pip install tox tox -e docs ``` @@ -380,9 +160,13 @@ tox ``` ### Integration Tests -Set the `AWS_PROFILE` information in the Prerequisites section of this document. + +First, configure a profile to use your account to interact with AWS. To learn more, see [Configure AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). + +After you create a profile, use the following command to set the `AWS_PROFILE` so that all future commands can access your AWS account and resources. + ```bash -export AWS_PROFILE=Your_Profile_Name +export AWS_PROFILE=YOUR_PROFILE_NAME ``` Run the tests diff --git a/doc/index.rst b/doc/index.rst index 12bb3c4ca..cfa6e2c0c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,7 +1,7 @@ -Amazon Braket (Private Beta) Python SDK +Amazon Braket Python SDK ======================================= -Amazon Braket Python SDK is an open source library for interacting with quantum devices on Amazon Braket (Private Beta). +Amazon Braket Python SDK is an open source library for interacting with quantum devices on Amazon Braket. This documentation provides information about the Amazon Braket Python SDK API. For information about how to configure your environment to use the braket-python-sdk, please see the README in the GitHub repo for this project at https://github.com/aws/amazon-braket-sdk-python. diff --git a/examples/bell.py b/examples/bell.py index 69780390c..43321eee2 100644 --- a/examples/bell.py +++ b/examples/bell.py @@ -19,7 +19,7 @@ aws_account_id = boto3.client("sts").get_caller_identity()["Account"] device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1") -s3_folder = (f"braket-output-{aws_account_id}", "folder-name") +s3_folder = (f"amazon-braket-output-{aws_account_id}", "folder-name") # https://wikipedia.org/wiki/Bell_state bell = Circuit().h(0).cnot(0, 1) diff --git a/examples/debug_bell.py b/examples/debug_bell.py index a1e35b15f..947275518 100644 --- a/examples/debug_bell.py +++ b/examples/debug_bell.py @@ -26,7 +26,7 @@ aws_account_id = boto3.client("sts").get_caller_identity()["Account"] device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1") -s3_folder = (f"braket-output-{aws_account_id}", "folder-name") +s3_folder = (f"amazon-braket-output-{aws_account_id}", "folder-name") bell = Circuit().h(0).cnot(0, 1) # pass in logger to device.run, enabling debugging logs to print to console diff --git a/src/braket/_sdk/_version.py b/src/braket/_sdk/_version.py index e784cda2c..2a47eb0f5 100644 --- a/src/braket/_sdk/_version.py +++ b/src/braket/_sdk/_version.py @@ -15,4 +15,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.6.0" +__version__ = "1.0.0"