Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Quantum Computing Experimentation with Amazon Braket

You're reading from   Quantum Computing Experimentation with Amazon Braket Explore Amazon Braket quantum computing to solve combinatorial optimization problems

Arrow left icon
Product type Paperback
Published in Jul 2022
Publisher Packt
ISBN-13 9781800565265
Length 420 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Alex Khan Alex Khan
Author Profile Icon Alex Khan
Alex Khan
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Introduction
2. Section 1: Getting Started with Amazon Braket FREE CHAPTER
3. Chapter 1: Setting Up Amazon Braket 4. Chapter 2: Braket Devices Explained 5. Chapter 3: User Setup, Tasks, and Understanding Device Costs 6. Chapter 4: Writing Your First Amazon Braket Code Sample 7. Section 2: Building Blocks for Real-World Use Cases
8. Chapter 5: Using a Quantum Annealer – Developing a QUBO Function and Applying Constraints 9. Chapter 6: Using Gate-Based Quantum Computers – Qubits and Quantum Circuits 10. Chapter 7: Using Gate Quantum Computers – Basic Quantum Algorithms 11. Chapter 8: Using Hybrid Algorithms – Optimization Using Gate-Based Quantum Computers 12. Chapter 9: Running QAOA on Simulators and Amazon Braket Devices 13. Section 3: Real-World Use Cases
14. Chapter 10: Amazon Braket Hybrid Jobs, PennyLane, and other Braket Features 15. Chapter 11: Single-Objective Optimization Use Case 16. Chapter 12: Multi-Objective Optimization Use Case 17. Other Books You May Enjoy Appendix: Knapsack BQM Derivation

A QAOA example using Amazon Braket Hybrid Jobs

In this example, we want to execute the QAOA code on the ionq-matrix.csv input file. Remember that this file contains Binary Quadratic Model (BQM) data in an 11x11 matrix. We have already found the optimal value of this input as -2.5. In this section, we will split the code used before, into the structure needed for Amazon Braket Hybrid Jobs. We will review Job Control Code first in its entirety and then review the Job Source Module code.

Note on Charges

Please carefully consider the potential charges of executing the following job. The code will execute multiple runs to an Amazon Braket device. If p is the number of QAOA parameter trial values, then the code will execute p2 tasks with the base number of shots, and then one extra task with 10 times the base number of shots. In addition, there is a charge for the time the Amazon Braket Hybrid Jobs instance is active. More information on pricing can be found at https://aws.amazon.com...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime