Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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

Questions

Answer the following questions to test your knowledge of this chapter:

  1. Which of the following vectors represents a qubit state?

A. {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mn>1</mn><msqrt><mn>7</mn></msqrt></mfrac><mo>&#xA0;</mo><mfenced><mtable><mtr><mtd><msqrt><mn>3</mn></msqrt></mtd></mtr><mtr><mtd><mo>-</mo><mn>2</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}

B. {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfenced><mtable><mtr><mtd><mn>1</mn></mtd></mtr><mtr><mtd><mn>1</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}

C. {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfenced><mtable><mtr><mtd><mn>1</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}

  1. In quantum computing, the Z gate rotates a Bloch sphere {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mi mathvariant=\"normal\">&#x3C0;</mi></mstyle></math>"} radians around the Z-axis. Draw the result of applying a Z gate to a |+ qubit.
  2. The matrix representation of a Z gate is {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfenced><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>0</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd><mtd><mo>-</mo><mn>1</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}. Check to make sure that this matrix is unitary.
  3. Apply the Z gate matrix from Question 3 to a |+ qubit. Does the result you get confirm your answer to Question 2?
  4. Write Qiskit code to test the result you got in Questions 2, 3, and 4.
  5. The matrix representation of {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msub><mi>R</mi><mi>Y</mi></msub><mfenced><mfrac><mi mathvariant=\"normal\">&#x3C0;</mi><mn>2</mn></mfrac></mfenced></mstyle></math>"} is {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mn>1</mn><msqrt><mn>2</mn></msqrt></mfrac><mo>&#xA0;</mo><mfenced><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mo>-</mo><mn>1</mn></mtd></mtr><mtr><mtd><mn>1</mn></mtd><mtd><mn>1</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}. Check to make sure that this matrix is unitary.
  6. Verify that the matrix representation of {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msub><mi>R</mi><mi>Y</mi></msub><mfenced><mfrac><mi mathvariant=\"normal\">&#x3C0;</mi><mn>2</mn></mfrac></mfenced></mstyle></math>"} is {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfrac><mn>1</mn><msqrt><mn>2</mn></msqrt></mfrac><mo>&#xA0;</mo><mfenced><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mo>-</mo><mn>1</mn></mtd></mtr><mtr><mtd><mn>1</mn></mtd><mtd><mn>1</mn></mtd></mtr></mtable></mfenced></mstyle></math>"}. Use the last formula in this chapter’s Experimenting with rotations section.
  7. In Step 2 of the Experimenting with rotations section, applying {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msub><mi>R</mi><mi>Y</mi></msub><mfenced><mfrac><mi mathvariant=\"normal\">&#x3C0;</mi><mn>2</mn></mfrac></mfenced></mstyle></math>"} to |0 has the same effect as applying {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mi>H</mi></mstyle></math>"} to |0. Do the matrix calculation...
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