Book Image

Learn Quantum Computing with Python and IBM Quantum Experience

By : Robert Loredo
Book Image

Learn Quantum Computing with Python and IBM Quantum Experience

By: Robert Loredo

Overview of this book

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.
Table of Contents (21 chapters)
1
Section 1: Tour of the IBM Quantum Experience (QX)
5
Section 2: Basics of Quantum Computing
9
Section 3: Algorithms, Noise, and Other Strange Things in Quantum World
18
Assessments
Appendix A: Resources

Estimating the T2* dephasing time

We will estimate the T2* dephasing time based on the experiment results from t2star_circuits executed on a noisy device. We will use the probability formula of measuring 0 from the following equation, where A, T2*, f, , and B are unknown parameters:

The T2StarFitter parameters are the same, with the exception of the following:

  • fit_p0: The initial values to the fit parameters – in order, A, T2*, f, , B.
  • fit_bounds: The lower and upper bounds, respectively. Parameters in order: A, T2*, f, , B

The following code will set the initial parameter values so that we can generate our T2StarFitter and bounds:

# Set the initial values of the T2StarFitter parameters
param_T2Star = t2Star*1.1
param_A = 0.5
param_B = 0.5
# Generate the T2StarFitter with the given parameters and # bounds
fit = T2StarFitter(backend_result, delay_times, qubits,
           ...