Book Image

Quantum Computing Algorithms

By : Barry Burd
5 (1)
Book Image

Quantum Computing Algorithms

5 (1)
By: Barry Burd

Overview of this book

Navigate the quantum computing spectrum with this book, bridging the gap between abstract, math-heavy texts and math-avoidant beginner guides. Unlike intermediate-level books that often leave gaps in comprehension, this all-encompassing guide offers the missing links you need to truly understand the subject. Balancing intuition and rigor, this book empowers you to become a master of quantum algorithms. No longer confined to canned examples, you'll acquire the skills necessary to craft your own quantum code. Quantum Computing Algorithms is organized into four sections to build your expertise progressively. The first section lays the foundation with essential quantum concepts, ensuring that you grasp qubits, their representation, and their transformations. Moving to quantum algorithms, the second section focuses on pivotal algorithms — specifically, quantum key distribution and teleportation. The third section demonstrates the transformative power of algorithms that outpace classical computation and makes way for the fourth section, helping you to expand your horizons by exploring alternative quantum computing models. By the end of this book, quantum algorithms will cease to be mystifying as you make this knowledge your asset and enter a new era of computation, where you have the power to shape the code of reality.
Table of Contents (19 chapters)
Free Chapter
2
Part 1 Nuts and Bolts
7
Part 2 Making Qubits Work for You
10
Part 3 Quantum Computing Algorithms
14
Part 4 Beyond Gate-Based Quantum Computing

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...