Learn Quantum Computing with Python and IBM Quantum Experience

Book description

A step-by-step guide to learning the implementation and associated methodologies in quantum computing with the help of the IBM Quantum Experience, Qiskit, and Python that will have you up and running and productive in no time

Key Features

  • Determine the difference between classical computers and quantum computers
  • Understand the quantum computational principles such as superposition and entanglement and how they are leveraged on IBM Quantum Experience systems
  • Run your own quantum experiments and applications by integrating with Qiskit

Book Description

IBM Quantum Experience is a platform that enables developers to learn the basics of quantum computing by allowing them to run experiments on a quantum computing simulator and a real quantum computer. This book will explain the basic principles of quantum mechanics, the principles involved in quantum computing, and the implementation of quantum algorithms and experiments on IBM's quantum processors.

You will start working with simple programs that illustrate quantum computing principles and slowly work your way up to more complex programs and algorithms that leverage quantum computing. As you build on your knowledge, you'll understand the functionality of IBM Quantum Experience and the various resources it offers. Furthermore, you'll not only learn the differences between the various quantum computers but also the various simulators available. Later, you'll explore the basics of quantum computing, quantum volume, and a few basic algorithms, all while optimally using the resources available on IBM Quantum Experience.

By the end of this book, you'll learn how to build quantum programs on your own and have gained practical quantum computing skills that you can apply to your business.

What you will learn

  • Explore quantum computational principles such as superposition and quantum entanglement
  • Become familiar with the contents and layout of the IBM Quantum Experience
  • Understand quantum gates and how they operate on qubits
  • Discover the quantum information science kit and its elements such as Terra and Aer
  • Get to grips with quantum algorithms such as Bell State, Deutsch-Jozsa, Grover's algorithm, and Shor's algorithm
  • How to create and visualize a quantum circuit

Who this book is for

This book is for Python developers who are looking to learn quantum computing and put their knowledge to use in practical situations with the help of IBM Quantum Experience. Some background in computer science and high-school-level physics and math is required.

Table of contents

  1. Learn Quantum Computing with Python and IBM Quantum Experience
  2. Why subscribe?
  3. Contributors
  4. About the author
  5. About the reviewer
  6. Packt is searching for authors like you
  7. 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. Code in Action
    6. Download the color images
    7. Conventions used
    8. Get in touch
    9. Reviews
  8. Section 1: Tour of the IBM Quantum Experience (QX)
  9. Chapter 1: Exploring the IBM Quantum Experience
    1. Technical requirements
    2. Navigating the IBM Quantum Experience
      1. Registering to the IBM Quantum Experience
      2. Understanding the Personal profile tab
    3. Getting started with IBM Quantum Experience
      1. Learning about your backends
      2. Learning about pending and latest results
    4. Exploring My Account
    5. Summary
    6. Questions
  10. Chapter 2: Circuit Composer – Creating a Quantum Circuit
    1. Technical requirements
    2. Creating a quantum circuit using the Composer
      1. Launching the Composer editor
      2. Familiarizing yourself with the Circuit Composer components
    3. Creating our first quantum circuit
      1. Building a quantum circuit with classical bit behaviors
    4. Building a coin-flipping experiment
      1. Entangling two coins together
    5. Summary
    6. Questions
  11. Chapter 3: Creating Quantum Circuits using Quantum Lab Notebooks
    1. Technical requirements
    2. Creating a quantum circuit using Quantum Lab Notebooks
      1. Launching a Notebook from the Quantum Lab
      2. Familiarizing yourself with the Quantum Lab components
      3. Opening and importing existing Quantum Lab Notebook
      4. Developing a quantum circuit on Quantum Lab Notebooks
    3. Reviewing the results of your quantum circuit on Quantum Lab Notebooks
      1. Executing a quantum circuit on a quantum computer
    4. Summary
    5. Questions
  12. Section 2: Basics of Quantum Computing
  13. Chapter 4: Understanding Basic Quantum Computing Principles
    1. Technical requirements
    2. Introducing quantum computing
    3. Understanding superposition
      1. Learning about classical randomness
      2. Preparing a qubit in a superposition state
    4. Understanding entanglement
      1. Learning about the effects of interference between qubits
    5. Creating a quantum teleportation circuit
      1. Executing the quantum teleportation circuit
    6. Summary
    7. Questions
  14. Chapter 5: Understanding the Quantum Bit (Qubit)
    1. Technical requirements
    2. Learning about quantum bits (qubits)
      1. Reviewing the classic bit
      2. Understanding the qubit
    3. Visualizing the state vector of a qubit
      1. Creating the Bloch sphere representation of a qubit
      2. Understanding multi-qubits
      3. Learning about superconducting qubits
      4. Coupling the qubits together
    4. Summary
    5. Questions
  15. Chapter 6: Understanding Quantum Logic Gates
    1. Technical requirements
    2. Reviewing classical logic gates
      1. Understanding unitary operators
    3. Summary
    4. Questions
  16. Section 3: Algorithms, Noise, and Other Strange Things in Quantum World
  17. Chapter 7: Introducing Qiskit and its Elements
    1. Technical requirements
    2. Understanding quantum and classical system interconnections
      1. Reviewing the quantum programming process
      2. Understanding how to organize and interact with Qiskit
    3. Understanding Qiskit basics and its elements
      1. Terra
      2. Aer
      3. Ignis
      4. Aqua
    4. Installing and configuring Qiskit on your local machine
      1. Preparing the installation
      2. Installing Anaconda
      3. Installing Qiskit
      4. Configuring your local Qiskit environment
    5. Getting support from the Qiskit community
      1. Introducing the Qiskit community
      2. Contributing to the Qiskit community
    6. Summary
    7. Questions
  18. Chapter 8: Programming with Qiskit Terra
    1. Technical requirements
    2. Understanding quantum circuits
      1. Creating a quantum circuit
      2. Obtaining circuit properties and analysis
      3. Customizing and parameterizing circuit libraries
    3. Generating pulse schedules on hardware
      1. Learning about instructions
      2. Understanding pulses and Pulse libraries
      3. Generating and executing schedules
      4. Scheduling existing quantum circuits
    4. Leveraging provider information
      1. Learning about the IBM Quantum Experience components
    5. Summary
    6. Questions
  19. Chapter 9: Monitoring and Optimizing Quantum Circuits
    1. Technical requirements
    2. Monitoring and tracking jobs
    3. Optimizing circuits using the Transpiler
      1. Transformation of a quantum circuit
      2. Optimizing the circuit by leveraging the layout optimizer
      3. Leaning about backend configuration and optimization
      4. Understanding passes and pass managers
    4. Visualizing and enhancing circuit graphs
      1. Learning about customized visual circuits
      2. Drawing the DAG of a circuit
    5. Summary
    6. Questions
  20. Chapter 10: Executing Circuits Using Qiskit Aer
    1. Technical requirements
    2. Understanding the differences between the Aer simulators
      1. Viewing all available backends
      2. Running circuits on the Qasm simulator
      3. Adding parameters to the backend options
      4. Initializing the qubits on a circuit
      5. Running circuits on the statevector simulator
      6. Running circuits on the unitary simulator
      7. Running circuits on the pulse simulator
    3. Generating noise models
      1. Understanding decoherence (T1 and T2)
      2. Understanding single-gate, multi-gate, and readout errors
    4. Building your own noise model
    5. Executing quantum circuits with custom noise models
      1. Adding custom noise models to our circuits
    6. Summary
    7. Questions
  21. Chapter 11: Mitigating Quantum Errors Using Ignis
    1. Technical requirements
    2. Generating noise effects of relaxation
      1. Generating noise models and test circuits
    3. Estimating T1 decoherence times
    4. Generating the noise effects of dephasing
      1. Generating and executing T2 circuits
    5. Estimating T2 decoherence times
      1. Generating and executing T2* test circuits
    6. Estimating the T2* dephasing time
    7. Mitigating readout errors
    8. Summary
    9. Questions
    10. Further reading
  22. Chapter 12: Learning about Qiskit Aqua
    1. Technical requirements
    2. Understanding the components and their usability
      1. Initializing a fixed quantum state
    3. Creating a neural network discriminator
      1. Implementing state function operators
    4. Using Aqua utilities to simplify your work
    5. Familiarizing yourself with the quantum algorithms in Aqua
      1. Implementing the Logical Expression Oracle
      2. Implementing a truth table Oracle
    6. Creating your first classical/quantum application (Simon's)
      1. Stating Simon's problem
      2. Implementing Simon's algorithm
    7. Summary
    8. Questions
  23. Chapter 13: Understanding Quantum Algorithms
    1. Technical requirements
    2. Understanding the meaning of outperforming classical systems
      1. Understanding the Bell states algorithm
      2. Learning about Deutsch's algorithm
      3. Understanding the Deutsch-Jozsa algorithm
    3. Learning about the foundational oracle-based quantum algorithm
      1. Learning about the Bernstein-Vazirani algorithm
    4. Summary
    5. Questions
  24. Chapter 14: Applying Quantum Algorithms
    1. Technical requirements
    2. Understanding periodic quantum algorithms
      1. Learning Simon's algorithm
      2. Learning about the Quantum Fourier Transform algorithm
      3. Understanding Shor's algorithm
    3. Learning about Grover's search algorithm
      1. Learning about the problem
      2. Understanding Grover's search algorithm
      3. Implementing Grover's search algorithm
    4. Summary
    5. Questions
  25. Appendix A: Resources
  26. Assessments
    1. Chapter 1 – Exploring the IBM Quantum Experience
    2. Question 1
    3. Answer
    4. Question 2
    5. Answer
    6. Question 3
    7. Answer
    8. Question 4
    9. Answer
    10. Question 5
    11. Answer
    12. Chapter 2 – Circuit Composer – Creating a Quantum Circuit
    13. Question 1
    14. Answer
    15. Question 2
    16. Answer
    17. Question 3
    18. Answer
    19. Question 4
    20. Answer
    21. Chapter 3 – Creating Quantum Circuits Using Quantum Lab Notebooks
    22. Question 1
    23. Answer
    24. Question 2
    25. Answer
    26. Question 3
    27. Answer
    28. Question 4
    29. Answer
    30. Chapter 4 – Understanding Basic Quantum Computing Principles
    31. Question 1
    32. Answer
    33. Question 2
    34. Answer
    35. Question 3
    36. Answer
    37. Question 4
    38. Answer
    39. Chapter 5 – Understanding the Quantum Bits (Qubit)
    40. Question 1
    41. Answer
    42. Question 2
    43. Answer
    44. Question 3
    45. Answer
    46. Question 4
    47. Answer
    48. Question 5
    49. Answer
    50. Question 6
    51. Answer
    52. Question 7
    53. Answer
    54. Question 8
    55. Answer
    56. Chapter 6 – Understanding Quantum Logic Gates
    57. Question 1
    58. Answer
    59. Question 2
    60. Answer
    61. Question 3
    62. Answer
    63. Question 4
    64. Answer
    65. Question 5
    66. Answer
    67. Question 6
    68. Answer
    69. Question 7
    70. Answer
    71. Question 8
    72. Answer
    73. Chapter 7 – Introducing Qiskit and Its Elements
    74. Question 1
    75. Answer
    76. Question 2
    77. Answer
    78. Question 3
    79. Answer
    80. Question 4
    81. Answer
    82. Question 5
    83. Answer
    84. Question 6
    85. Answer
    86. Question 7
    87. Answer
    88. Chapter 8 – Programming with Qiskit Terra
    89. Question 1
    90. Answer
    91. Question 2
    92. Answer
    93. Question 3
    94. Answer
    95. Question 4
    96. Answer
    97. Question 5
    98. Answer
    99. Question 6
    100. Answer
    101. Question 7
    102. Answer
    103. Chapter 9 – Monitoring and Optimizing Quantum Circuits
    104. Question 1
    105. Answer
    106. Question 2
    107. Answer
    108. Question 3
    109. Answer
    110. Question 4
    111. Answer
    112. Question 5
    113. Answer
    114. Question 6
    115. Answer
    116. Question 7
    117. Answer
    118. Question 8
    119. Answer
    120. Question 9
    121. Answer
    122. Chapter 10 – Executing Circuits Using Qiskit Aer
    123. Question 1
    124. Answer
    125. Question 2
    126. Answer
    127. Question 3
    128. Answer
    129. Question 4
    130. Answer
    131. Question 5
    132. Answer
    133. Question 6
    134. Answer
    135. Question 7
    136. Answer
    137. Question 8
    138. Answer
    139. Chapter 11 – Mitigating Quantum Errors Using Ignis
    140. Question 1
    141. Answer
    142. Question 2
    143. Answer
    144. Question 3
    145. Answer
    146. Question 4
    147. Answer
    148. Question 5
    149. Answer
    150. Question 6
    151. Answer
    152. Question 7
    153. Answer
    154. Question 8
    155. Answer
    156. Chapter 12 – Learning about Qiskit Aqua
    157. Question 1
    158. Answer
    159. Question 2
    160. Answer
    161. Question 3
    162. Answer
    163. Question 4
    164. Answer
    165. Question 5
    166. Answer
    167. Question 6
    168. Answer
    169. Question 7
    170. Answer
    171. Question 8
    172. Answer
    173. Chapter 13 – Understanding Quantum Algorithms
    174. Question 1
    175. Answer
    176. Question 2
    177. Answer
    178. Question 3
    179. Answer
    180. Question 4
    181. Answer
    182. Question 5
    183. Answer
    184. Question 6
    185. Answer
    186. Chapter 14 – Applying Quantum Algorithms
    187. Question 1
    188. Answer
    189. Question 2
    190. Answer
    191. Question 3
    192. Answer
    193. Question 4
    194. Answer
    195. Question 5
    196. Answer
    197. Question 6
    198. Answer
    199. Question 7
    200. Answer
    201. Question 8
    202. Answer
  27. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Learn Quantum Computing with Python and IBM Quantum Experience
  • Author(s): Robert Loredo
  • Release date: September 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781838981006