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 Algorithms

You're reading from   Quantum Computing Algorithms Discover how a little math goes a long way

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781804617373
Length 342 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Barry Burd Barry Burd
Author Profile Icon Barry Burd
Barry Burd
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Introduction to Quantum Computing 2. Part 1 Nuts and Bolts FREE CHAPTER
3. Chapter 1: New Ways to Think about Bits 4. Chapter 2: What Is a Qubit? 5. Chapter 3: Math for Qubits and Quantum Gates 6. Chapter 4: Qubit Conspiracy Theories 7. Part 2 Making Qubits Work for You
8. Chapter 5: A Fanciful Tale about Cryptography 9. Chapter 6: Quantum Networking and Teleportation 10. Part 3 Quantum Computing Algorithms
11. Chapter 7: Deutsch’s Algorithm 12. Chapter 8: Grover’s Algorithm 13. Chapter 9: Shor’s Algorithm 14. Part 4 Beyond Gate-Based Quantum Computing
15. Chapter 10: Some Other Directions for Quantum Computing 16. Assessments 17. Index 18. Other Books You May Enjoy

Epilogue – what does have to do with Grover’s algorithm?

When you run Grover’s algorithm, the optimal number of iterations is {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac><msqrt><mi>N</mi></msqrt></mstyle></math>"}, where {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mi>N</mi></mstyle></math>"} is the number of things you’re searching through. In this formula, you have {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mi>n</mi></mstyle></math>"} qubits and {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mi>N</mi><mo>&#xA0;</mo><mo>=</mo><mo>&#xA0;</mo><msup><mn>2</mn><mi>n</mi></msup></mstyle></math>"}.

Usually, the formula requires a few tweaks. For example, you can’t use the formula to search through exactly 1,000 items, because 1,000 isn’t a power of 2. Instead, you add 24 fake items to your list. Then, you use 10 qubits to search through {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msup><mn>2</mn><mn>10</mn></msup><mo>&#xA0;</mo><mo>=</mo><mo>&#xA0;</mo><mn>1024</mn></mstyle></math>"} items. And what if {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac><msqrt><mi>N</mi></msqrt></mstyle></math>"} isn’t an integer? The value of {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac><msqrt><mn>1024</mn></msqrt></mstyle></math>"} is approximately 25.1327, and you can’t apply the Grover iterate 25.1327 times. In this case, there are ways to decide whether Grover’s sweet spot is 25 or 26, but we won’t get into that here.

In this section, our goal is to convey some idea of the role {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac></mstyle></math>"} plays in the number of Grover iterate applications. Our explanation has many gaps and involves several approximations. We won’t come to...

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 $19.99/month. Cancel anytime