Quantum Computing Algorithms

Book description

Explore essential quantum computing algorithms and master concepts intuitively with minimal math expertise required

Key Features

  • Learn the fundamentals with an introduction to matrix arithmetic
  • Write quantum computing programs in Qiskit—IBM’s publicly available quantum computing website
  • Email your questions directly to the author—no question is too elementary
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

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.

What you will learn

  • Define quantum circuits
  • Harness superposition and entanglement to solve classical problems
  • Gain insights into the implementation of quantum teleportation
  • Explore the impact of quantum computing on cryptography
  • Translate theoretical knowledge into practical skills by writing and executing code on real quantum hardware
  • Expand your understanding of this domain by uncovering alternative quantum computing models

Who this book is for

This book is for individuals familiar with algebra and computer programming, eager to delve into modern physics concepts. Whether you've dabbled in introductory quantum computing material or are seeking deeper insights, this quantum computing book is your gateway to in-depth exploration.

Table of contents

  1. Quantum Computing Algorithms
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Conventions used
    6. Get in touch
    7. Share Your Thoughts
    8. Download a free PDF copy of this book
  6. Introduction to Quantum Computing
    1. What is quantum computing?
    2. Baby steps toward quantum computing
    3. Programming a quantum computer
    4. The future of quantum computing
    5. Further reading
  7. Part 1 Nuts and Bolts
  8. Chapter 1: New Ways to Think about Bits
    1. Technical requirements
    2. Bits and logic gates
      1. Binary representation
    3. Working with matrices
      1. Vectors
      2. Matrix multiplication
      3. The tensor product
      4. Combining gates and bits
    4. Matrix representation of bits and gates
      1. Matrix operations and computer logic
    5. Jupyter notebooks
      1. Creating and displaying values
      2. Which values are (or are not) defined?
      3. Stopping a run of the code
      4. Saving your work
      5. Copying this book’s example code
    6. Matrices in Python
    7. Summary
    8. Questions
  9. Chapter 2: What Is a Qubit?
    1. Technical requirements
    2. A qubit’s values between 0 and 1
      1. Are qubits useful?
      2. How to make a qubit
      3. What does “between |0⟩ and |1⟩” mean?
    3. Qubits and Qiskit
      1. Creating and running a quantum circuit
      2. Understanding the Qiskit code
    4. Variations of this chapter’s code
    5. Summary
    6. Questions
  10. Chapter 3: Math for Qubits and Quantum Gates
    1. Matrices for qubit states and operations
      1. Qubits on the Bloch sphere
      2. More points on the Bloch sphere
      3. The X gate
      4. The Hadamard rotation
      5. Combining gates along a single wire
    2. Reversible operations
      1. Reversing a matrix operation
      2. Unitary matrices
    3. Rotating the Bloch sphere around an axis
      1. Experimenting with rotations
      2. What is a radian?
      3. A taste of trigonometry
    4. Summary
    5. Questions
  11. Chapter 4: Qubit Conspiracy Theories
    1. Multi-qubit gates
      1. CNOT and flipped CNOT gates
      2. SWAP gate
      3. Toffoli gate
    2. Magic tricks with multi-qubit gates
      1. Introducing entanglement
      2. Entanglement with matrices
      3. Working with Qiskit
      4. The four Bell states
      5. Role of entanglement in quantum computing
    3. Qubits don’t plan ahead
      1. What quantum theory predicts
      2. What would happen if there were hidden variables?
      3. Bell’s experiment in Qiskit
    4. Combining probabilities
      1. Addition (either this event or that event)
      2. Subtraction (not this event)
      3. Multiplication (this event and that event)
      4. Division (this event assuming that event)
    5. Summary
    6. Questions
    7. Further readings
  12. Part 2 Making Qubits Work for You
  13. Chapter 5: A Fanciful Tale about Cryptography
    1. Technical requirements
    2. Sharing secrets
      1. Adding Hadamard gates
      2. Introducing randomness
      3. Adding more randomness
      4. Alice and Bob compare some of their bits
      5. Some remaining bits form the secret key
    3. Is the BB84 algorithm useful?
    4. You can’t copy a qubit
    5. Qiskit code for the BB84 algorithm
      1. Creating the circuits
      2. Running the quantum circuits
      3. Displaying the outcome
    6. Getting more information about a circuit
    7. Summary
    8. Questions
  14. Chapter 6: Quantum Networking and Teleportation
    1. Technical requirements
    2. Transmitting bits and qubits
      1. Classical networks
      2. Quantum networks
    3. Teleporting a qubit
      1. Quantum operations for teleportation
    4. Teleportation versus cloning
    5. Coding the teleportation circuitry
      1. Creating registers
      2. Adding gates to the registers
      3. Running the quantum circuit
    6. Summary
    7. Questions
    8. Further reading
  15. Part 3 Quantum Computing Algorithms
  16. Chapter 7: Deutsch’s Algorithm
    1. Technical requirements
    2. Describing Deutsch’s problem
      1. Algorithms
      2. Functions
      3. Constant and balanced functions
      4. Deutsch’s problem
    3. Solving Deutsch’s problem
      1. Phase kickback
      2. Detecting a CNOT gate
      3. Embedding a function in quantum circuitry
      4. Creating oracles
      5. Putting it all together
    4. Deutsch’s algorithm F.A.Q.
    5. Coding Deutsch’s algorithm
    6. Summary
    7. Questions
  17. Chapter 8: Grover’s Algorithm
    1. How long does it take to find what you need?
    2. The idea behind Grover’s algorithm
      1. The oracle
      2. The diffuser
      3. Searching among eight items
      4. Searching among any number of items
      5. The optimal number of Grover iterate applications
    3. Matrices for Grover’s algorithm
      1. A matrix for the oracle
      2. A matrix for the diffuser
      3. Coding Grover’s algorithm with matrices
    4. When to use Grover’s algorithm
      1. Encrypting passwords
      2. Finding better approximations
      3. Satisfying Boolean expressions
      4. Coding Grover’s algorithm with high-level functions
    5. Gates and circuits for Grover’s algorithm
      1. Gates for the oracle
      2. Gates for the diffuser
      3. Coding Grover’s algorithm with quantum gates
    6. Epilogue – what does have to do with Grover’s algorithm?
    7. Summary
    8. Questions
  18. Chapter 9: Shor’s Algorithm
    1. Technical requirements
    2. A popular encryption scheme
      1. An example of RSA encryption
    3. How Shor’s algorithm works
      1. The role of a period in factoring a number
      2. Repeated squaring
    4. Complex numbers
      1. Complex number basics
      2. Unitary matrices
      3. The connection between complex numbers and circles
    5. Finding a sequence’s period
      1. The QFT matrix
    6. Shoring up your knowledge
    7. Illustrating Shor’s algorithm with Qiskit code
      1. Testing the QFT
      2. Another implementation of Shor’s algorithm
    8. Summary
    9. Further reading
    10. Questions
  19. Part 4 Beyond Gate-Based Quantum Computing
  20. Chapter 10: Some Other Directions for Quantum Computing
    1. What is reducibility?
    2. Quantum simulation
    3. Quantum annealing
    4. Quantum neural nets
    5. Solving unsolvable problems
    6. Summary
    7. References
  21. Assessments
    1. Chapter 1, New Ways to Think about Bits
    2. Chapter 2, What Is a Qubit?
    3. Chapter 3, Math for Qubits and Quantum Gates
    4. Chapter 4, Qubit Conspiracy Theories
    5. Chapter 5, A Fanciful Tale about Cryptography
    6. Chapter 6, Quantum Networking and Teleportation
    7. Chapter 7, Deutsch’s Algorithm
    8. Chapter 8, Grover’s Algorithm
    9. Chapter 9, Shor’s Algorithm
  22. Index
    1. Why subscribe?
  23. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Quantum Computing Algorithms
  • Author(s): Barry Burd
  • Release date: September 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781804617373