4

Writing Your First Amazon Braket Code Sample

In this chapter, we will go over some very basic code to get started in Amazon Braket. We will create a very simple quantum circuit to represent a binary number on a quantum register. This will demonstrate the basics of how to set up a quantum circuit and then measure it on a quantum device. We will spend some time understanding how to access the devices through the code and estimating the cost of running a quantum circuit on a device. Then, we will create the quantum circuit and run it. Finally, we can get a more accurate picture of the cost of execution. In this chapter, we will only use two simple quantum gates; however, we will use them somewhat classically, so a deep explanation of the complex ...

Get Quantum Computing Experimentation with Amazon Braket now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.