Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Quantum Computing Algorithms

You're reading from  Quantum Computing Algorithms

Product type Book
Published in Sep 2023
Publisher Packt
ISBN-13 9781804617373
Pages 342 pages
Edition 1st Edition
Languages
Author (1):
Barry Burd Barry Burd
Profile icon Barry Burd

Table of Contents (19) Chapters

Preface Introduction to Quantum Computing Part 1 Nuts and Bolts
Chapter 1: New Ways to Think about Bits Chapter 2: What Is a Qubit? Chapter 3: Math for Qubits and Quantum Gates Chapter 4: Qubit Conspiracy Theories Part 2 Making Qubits Work for You
Chapter 5: A Fanciful Tale about Cryptography Chapter 6: Quantum Networking and Teleportation Part 3 Quantum Computing Algorithms
Chapter 7: Deutsch’s Algorithm Chapter 8: Grover’s Algorithm Chapter 9: Shor’s Algorithm Part 4 Beyond Gate-Based Quantum Computing
Chapter 10: Some Other Directions for Quantum Computing Assessments Index 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 $15.99/month. Cancel anytime}