Skip to content

Commit 672c220

Browse files
kshitijcchristianbmadsenlicedricspeller26yitchen-tim
authored
Add examples for Amazon Braket Hybrid Jobs (amazon-braket#96)
Co-authored-by: Christian Bruun Madsen <cbmadsen@amazon.com> Co-authored-by: Cedric Lin <67704428+licedric@users.noreply.github.com> Co-authored-by: ℂ𝓞𝔇𝚈 <caw@amazon.com> Co-authored-by: Tim <91688157+yitchen-tim@users.noreply.github.com> Co-authored-by: mbeach-aws <drbeach@amazon.com> Co-authored-by: Lin <licedric@amazon.com> Co-authored-by: emkessler <33257078+emkessler@users.noreply.github.com> Co-authored-by: Aaron Berdy <berdy@amazon.com> Co-authored-by: Viraj Chaudhari <chauvira@amazon.com>
1 parent 2efbc0a commit 672c220

20 files changed

+3320
-10
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ dmypy.json
136136

137137
# Data intermediates
138138
*.pck
139+
examples/hybrid_jobs/2_Using_PennyLane_with_Braket_Jobs/input-data.adjlist

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The repository is structured as follows:
99
- [Quantum machine learning and optimization with PennyLane](#pennylane)
1010
- [Quantum annealing with D-Wave](#annealing)
1111
- [Amazon Braket features](#braket)
12+
- [Amazon Braket Hybrid Jobs](#jobs)
1213
- [Creating a Conda environment](#conda)
1314

1415
---
@@ -141,6 +142,26 @@ This folder contains examples that illustrate the usage of individual features o
141142

142143
This notebook provides a detailed overview of noise simulation on Amazon Braket. You will learn how to define noise channels, apply noise to new or existing circuits, and run those circuits on the Amazon Braket noise simulators.
143144

145+
---
146+
## <a name="jobs">Amazon Braket Hybrid Jobs</a>
147+
This folder contains examples that illustrate the use of Amazon Braket Hybrid Jobs (Braket Jobs for short).
148+
149+
* [**Getting started with Amazon Braket Hybrid Jobs**](examples/hybrid_jobs/0_Getting_started/Getting_started.ipynb)
150+
151+
This notebook provides a demonstration of running a simple Braket Job. You will learn how to create a Braket Job using the Braket SDK or the Braket console, how to set the output S3 folder for a job, and how to retrieve results. You will also learn how to specify the Braket device to run your job on simulators or QPUs. Finally, you will learn how to use local mode to quickly debug your code.
152+
153+
* [**Quantum machine learning in Amazon Braket Hybrid Jobs**](examples/hybrid_jobs/1_Hyperparameter_tuning/Hyperparameter_tuning.ipynb)
154+
155+
This notebook shows a typical quantum machine learning workflow using Braket Jobs. In the process, you will learn how to upload input data, how to set up hyperparameters for your job, and how to retrieve and plot metrics. Finally, you will see how to run multiple Braket Jobs in parallel with different sets of hyperparameters.
156+
157+
* [**QAOA with Amazon Braket Hybrid Jobs and PennyLane**](examples/hybrid_jobs/2_Using_PennyLane_with_Braket_Jobs/Using_PennyLane_with_Braket_Jobs.ipynb)
158+
159+
This notebook shows how to run the QAOA algorithm with PennyLane (similar to a [previous notebook](examples/pennylane/2_Graph_optimization_with_QAOA.ipynb)), but this time using Braket Jobs. In the process, you will learn how to select a container image that supports PennyLane, and how to use checkpoints to save and load training progress of a job.
160+
161+
* [**Bring your own containers to Braket Jobs**](examples/hybrid_jobs/3_Bring_your_own_container/bring_your_own_container.ipynb)
162+
163+
This notebook demonstrates the use of the Bring-Your-Own-Container (BYOC) functionality of Braket Jobs. While Amazon Braket has pre-configured environments which support most use cases of Braket Jobs, BYOC enables you to define fully customizable environments using Docker containers. You will learn how to use BYOC, including preparing a Dockerfile, creating a private Amazon Elastic Container Registry (ECR), building the container, and submitting a Braket Job using the custom container.
164+
144165
---
145166
## <a name="conda">Creating a conda environment</a>
146167
To install the dependencies required for running the notebook examples in this repository you can create a conda environment with below commands.

0 commit comments

Comments
 (0)