What’s Inside Hands-On Quantum Machine Learning With Python
Disclosure: I am the author of Hands-On Quantum Machine Learning With Python
The Hands-On Quantum Machine Learning With Python Kickstarter campaign was funded on day one!
Is this book right for me?
You don’t need to be a mathematician.
You don’t need to be a physicist, either.
This book is for developers, programmers, students, and researchers who have at least some programming experience and who want to become proficient in quantum machine learning. Don’t worry if you’re just getting started with quantum computing and machine learning. We will begin with the very basics. We don’t assume prior knowledge of machine learning or quantum computing. You will not get left behind.
The time you’ll save by reading through Hands-On Quantum Machine Learning With Python will more than pay for itself.
Why is it worth reading?
We’re living at a time when knowledge and education are not limited to a small group of privileged persons. You can grab the latest research in quantum machine learning off the internet. There are plenty of scientific articles on Arxiv. There are a lot of books on machine learning and some on quantum computing, too. And, there are myriads of blog posts.
The problem is most of the literature on quantum computing and machine learning is full of physical jargon and mathematical formulae. Pretty soon, you might get the feeling the topic is restricted to mathematicians and physicists holding a Ph.D.
Let’s take this quote, for instance:
VQE can help us to estimate the energy of the ground state of a given quantum mechanical system. This is the upper bound of the lowest eigenvalue of a given Hamiltonian. It builds upon the variational principle that is described as: ⟨ψλ|H|ψλ⟩>=E0
The first and natural reaction — if you don’t hold a degree in physics — is to put the article away.
“Well, nice try. Maybe the whole topic is not for me”, you think. “Maybe, quantum machine learning is beyond my reach”.
Don’t give up that fast. Most of the stuff in quantum computing was discovered by physicists and mathematicians. Of course, they build upon the knowledge of their peers when they share their insights and teach their students. It is reasonable they use the terms they are familiar with.
But teaching QML the right way requires a different approach — a practical approach.
Rather than working through tons of theory, a good approach builds up practical intuition about the core concepts. I think it is best to acquire the exact theoretical knowledge we need to solve practical examples.
In this book, we will write code. A lot of code, actually. But quantum machine learning relies on math, statistics, physics, and computer science. This a lot of theory. Covering it all upfront would be quite exhaustive and fill at least one book without any practical insight. However, without at least some understanding of the underlying theoretical concepts, code examples on their own do not provide many practical insights, either. While libraries free you from tedious implementation details, the code, even though short, does not explain the core concepts.
Of course, we will do some math. Of course, we will cover a little physics. But I don’t expect you to hold a degree in any of these two fields. We will go through all the concepts we need. While this includes some mathematical notation and formulae, we keep it at the minimum required to solve our practical problems.
The theoretical foundation of quantum machine learning may appear overwhelming at first sight.
Be assured, when put into the right context and when explained conceptually, it is not as hard as it sounds. This is the approach of Hands-On Quantum Machine Learning With Python.
This book provides the theory needed to understand the code we write to solve a problem. We cover the theory when it applies. We cover the background we need to understand what we are doing. We embed the theory into solving a practical problem and thus, directly see it in action.
I’ve got a clear opinion. I believe anyone sincerely interested in quantum machine learning should be able to learn it. There should be resources out there catering to the needs of the student, not to the convenience of the teacher. Of course, this requires a teacher able to explain the complex stuff in allegedly simple language.
This is the aim of Hands-On Quantum Machine Learning with Python. …
Hands-On Quantum Machine Learning With Python provides a no-nonsense teaching style guaranteed to cut through all the cruft and help you master Quantum Machine Learning
It includes hands-on tutorials (with lots of code) that not only show you the concepts of quantum computing and the algorithms behind machine learning but their implementations as well.
Inside Hands-On Quantum Machine Learning With Python, you’ll learn the basics of machine learning and quantum computing.
You’ll learn how to create parameterized quantum circuits and variational hybrid quantum-classical algorithms that solve classification tasks.
Learn about quantum superposition, entanglement, and interference and how you can use it to solve problems intractable for classical computers.
This book offers a practical, hands-on exploration of quantum machine learning. Rather than working through tons of theory, we will build up practical intuition about the core concepts. We will acquire the exact knowledge we need to solve practical examples with lots of code. Step by step, you will extend your knowledge and learn how to solve new problems.
Here’s a high-level overview of what’s inside this book.
1 Introduction — Who This Book Is For -Book Organization — Why Should I Bother With Quantum Machine Learning? — Quantum Machine Learning — Beyond The Hype — Quantum Machine Learning In The NISQ Era — I learned Quantum Machine Learning The Hard Way — Quantum Machine Learning Is Taught The Wrong Way — Configuring Your Quantum Machine Learning Workstation
2 Binary Classification — Predicting Survival On The Titanic — Get the Dataset — Look at the data — Data Preparation and Cleaning — Baseline — Classifier Evaluation and Measures — Unmask the Hypocrite Classifier
3 The Qubit and Quantum States — Exploring Quantum States — Visual Exploration Of The Qubit State — Derive The Proof Of The Theta-Formula — Exploring The Observer Effect — Parameterized Quantum Circuit — Variational Hybrid Quantum-Classical Algorithm
4 Probabilistic Binary Classifier — Towards Naïve Bayes — Bayes’ Theorem — Gaussian Naïve Bayes
5 Working with Qubits — You Don’t Need To Be A Mathematician — Quantumic Math — Are You Ready For The Red Pill? — If You Want To Gamble With Quantum Computing
6 Working With Multiple Qubits — Hands-On Introduction To Quantum Entanglement — The Equation Einstein Could Not Believe — Quantum Programming For Non-mathematicians
7 Quantum Naïve Bayes — Pre-processing — PQC — Post-Processing
8 Quantum Bayesian Networks — Bayesian Networks — Composing Quantum Computing Controls — Circuit implementation
9 Quantum Computing Is Different — The No-Cloning Theorem — How To Solve A Problem With Quantum Computing — The Quantum Oracle Demystified — You Don’t Need To Be A Physicist
10 Learning Hidden Variables — Estimating A Single Data Point — Estimating A Variable — Predict Survival
11 The World Is Not A Disk — The Qubit Phase — Visualize The Invisible Qubit Phase — Phase Kickback — Quantum Amplitudes and Probabilities
12 Working With The Qubit Phase — The Intuition Of Grover’s Algorithm — Basic Amplitude Amplification — Two-Qubit Amplification — Grover in Practice
What’s not inside
Quantum machine learning relies on math, statistics, physics, and computer science. It combines the fields of quantum computing and machine learning. There are myriads of books and resources on either one of the topics. And there is no almanac covering everything.
Hands-On Quantum Machine Learning With Python is no almanac, either. When I started writing the book, I wanted it to include all the latest research insights and all the algorithms out there. But I also wanted to explain all these things thoroughly and comprehensively.
As it turned out, doing both inside a single book is impossible. I had to focus either on more scope or on more detail. I went for the latter. I believe more scope doesn’t help you if I lose you along the way. Of course, I would have liked to explain the Quantum Boltzmann Machine. Of course, Quantum Neural Networks are interesting. But I would have had to sacrifice extensiveness in explanation. A sacrifice I could not make.
I still plan to work on the Quantum Boltzmann Machine, Quantum Neural Networks, and all the advanced algorithms. There’s enough work for another volume of Hands-On Quantum Machine Learning With Python.
Therefore, I subtitled my book as Volume 1: Get Started.
This book is not the end. It is the start. Thank you for your interest. Thank you for your support.