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

Chapter 9, Shor’s Algorithm

      1. We start by finding values of 3n % 14:

      Next, we calculate the following:

      {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfenced><mrow><msup><mn>3</mn><mfrac bevelled=\"true\"><mn>6</mn><mn>2</mn></mfrac></msup><mo>&#xA0;</mo><mo>+</mo><mo>&#xA0;</mo><mn>1</mn><mo>&#xA0;</mo></mrow></mfenced><mfenced><mrow><msup><mn>3</mn><mfrac bevelled=\"true\"><mn>6</mn><mn>2</mn></mfrac></msup><mo>&#xA0;</mo><mo>-</mo><mo>&#xA0;</mo><mn>1</mn><mo>&#xA0;</mo></mrow></mfenced><mo>=</mo><mo>&#xA0;</mo><mn>28</mn><mo>&#xB7;</mo><mn>26</mn><mo>&#xA0;</mo><mo>=</mo><mo>&#xA0;</mo><mfenced><mrow><mn>2</mn><mo>&#xB7;</mo><mn>2</mn><mo>&#xB7;</mo><mn>7</mn></mrow></mfenced><mo>&#xB7;</mo><mfenced><mrow><mn>2</mn><mo>&#xB7;</mo><mn>13</mn></mrow></mfenced><mspace linebreak=\"newline\"/></mstyle></math>","origin":"MathType for Microsoft Add-in"}

      When we calculate 14/13, we find that it isn’t an integer. But 14/2 = 7. So, 14 = 2·7.

      1. We start by finding values of 2n % 35:

      Next, we calculate the following:

      {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><mfenced><mrow><msup><mn>2</mn><mfrac bevelled=\"true\"><mn>12</mn><mn>2</mn></mfrac></msup><mo>&#xA0;</mo><mo>+</mo><mo>&#xA0;</mo><mn>1</mn><mo>&#xA0;</mo></mrow></mfenced><mfenced><mrow><msup><mn>2</mn><mfrac bevelled=\"true\"><mn>12</mn><mn>2</mn></mfrac></msup><mo>&#xA0;</mo><mo>-</mo><mo>&#xA0;</mo><mn>1</mn><mo>&#xA0;</mo></mrow></mfenced><mo>=</mo><mo>&#xA0;</mo><mn>65</mn><mo>&#xB7;</mo><mn>63</mn><mo>&#xA0;</mo><mo>=</mo><mo>&#xA0;</mo><mfenced><mrow><mn>5</mn><mo>&#xB7;</mo><mn>13</mn></mrow></mfenced><mo>&#xB7;</mo><mfenced><mrow><mn>3</mn><mo>&#xB7;</mo><mn>3</mn><mo>&#xB7;</mo><mn>7</mn></mrow></mfenced><mspace linebreak=\"newline\"/></mstyle></math>","origin":"MathType for Microsoft Add-in"}

      When we calculate 35/13 and 35/3, we find that these aren’t integers. But 35/5 = 7. So, 35 = 5·7.

      1. Dividing 71 by 8 gives us 8 with a remainder of 7. So, {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msup><mi>e</mi><mfenced><mrow><mn>71</mn><mo>&#xB7;</mo><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac></mrow></mfenced></msup></mstyle></math>","origin":"MathType for Microsoft Add-in"} is the same as {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msup><mi>e</mi><mfenced><mrow><mn>7</mn><mo>&#xB7;</mo><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac></mrow></mfenced></msup></mstyle></math>","origin":"MathType for Microsoft Add-in"}. According to Figures 9.9 and 9.13, {"mathml":"<math style=\"font-family:stix;font-size:16px;\" xmlns=\"http://www.w3.org/1998/Math/MathML\"><mstyle mathsize=\"16px\"><msup><mi>e</mi><mfenced><mrow><mn>7</mn><mo>&#xB7;</mo><mfrac><mi>&#x3C0;</mi><mn>4</mn></mfrac></mrow></mfenced></msup></mstyle></math>","origin":"MathType for Microsoft Add-in"} is equal to {"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>-</mo><mfrac><mn>1</mn><msqrt><mn>2</mn></msqrt></mfrac><mi>i</mi></mstyle></math>","origin":"MathType for Microsoft Add-in"}.
      2. The QFT and QFT† matrices are shown here:
      1. The 2 × 2 QFT matrix is the Hadamard matrix because the second roots of unity are 1 and -1.
      2. The missing values are shown here:
      1. In the coprime powers sequence for 22 (with coprime 3), the period is 5. But 5 isn’t divisible by 2. You can’t find 35/2 + 1 or 35/2 &...