Hands-On Quantum Machine Learning With Python
Hands-On Quantum Machine Learning With Python
Volume 1: Get Started
About the Book
Story
Hands-On Quantum Machine Learning With Python
You're interested in quantum computing and machine learning... ...But you don't know how to get started? Let me help!
Whether you just get started with quantum computing and machine learning or you're already a senior machine learning engineer, Hands-On Quantum Machine Learning With Python is your comprehensive guide to get started with Quantum Machine Learning - the use of quantum computing for the computation of machine learning algorithms.
Quantum computing promises to solve problems intractable with current computing technologies. But is it fundamentally different and asks us to change the way we think.
Hands-On Quantum Machine Learning With Python strives to be the perfect balance between theory taught in a textbook and the actual hands-on knowledge you’ll need to implement real-world solutions.
Inside this book, you will learn the basics of quantum computing and machine learning in a practical and applied manner.
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
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.
Before you do anything else, take a look at the first three chapters of the book for free. You can download this preview at www.pyqml.com. This sample contains almost 100 pages that get you started with quantum machine learning.
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.
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. And this is what’s inside Hands-On Quantum Machine Learning With Python.
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.
Of course, we will write code. A lot of code, actually. If you know a little Python, great! If you don’t know Python but another language, such as Java, Javascript, or PHP, you’ll be fine, too. If you know programming concepts (such as if-then-else-constructs and loops) then learning the syntax is a piece of cake. If you’re familiar with functional programming constructs, such as map, filter, and reduce, you’re already well equipped. If not, don’t worry, we will get you started with these constructs, too. We don’t expect you to be a senior software developer. We will go through all the code. Line by line. By the time you finish this book, you will be proficient with doing the math, understanding the physics, and writing the code you need to graduate to more advanced content.
The time you’ll save by reading through Hands-On Quantum Machine Learning With Python will more than pay for itself.
Libraries
For all examples inside Hands-On Quantum Machine Learning With Python, we use Python as our programming language. Python is easy to learn. Its simple syntax allows you to concentrate on learning quantum machine learning, rather than spending your time with the specificities of the language.
The most important library we use is Qiskit. It is IBM's quantum computing SDK. Qiskit is open-source. It provides tools for creating and manipulating quantum programs and running them on prototype quantum devices on IBM Quantum Experience or on simulators on your local computer.
For all the machine learning parts, we will use Scikit-Learn. Scikit-learn is the most useful library for machine learning in Python. It contains a range of supervised and unsupervised learning algorithms. Scikit-learn builds upon a range of other very useful libraries, such as:
- NumPy: Work with n-dimensional arrays
- SciPy: Fundamental library for scientific computing
- Matplotlib: Comprehensive 2D/3Dbplotting
- IPython: Enhanced interactive console
- Sympy: Symbolic mathematics
- Pandas: Data structures and analysis
Algorithms
Inside this book, we will learn how to create actual algorithms from the scratch, such as:
- Quantum Probabilistic Classifier
- Quantum Bayesian Network
- Quantum Optimization Algorithms
Table of Contents
-
1 Introduction
- 1.1 Who This Book Is For
- 1.2 Book Organization
- 1.3 Why Should I Bother With Quantum Machine Learning?
- 1.4 Quantum Machine Learning ‐ Beyond The Hype
- 1.5 Quantum Machine Learning In The NISQ Era
- 1.6 I learned Quantum Machine Learning The Hard Way
- 1.7 Quantum Machine Learning Is Taught The Wrong Way
- 1.8 Configuring Your Quantum Machine Learning Workstation
-
2 Binary Classification
- 2.1 Predicting Survival On The Titanic
- 2.2 Get the Dataset
- 2.3 Look at the data
- 2.4 Data Preparation and Cleaning
- 2.5 Baseline
- 2.6 Classifier Evaluation and Measures
- 2.7 Unmask the Hypocrite Classifier
-
3 Qubit and Quantum States
- 3.1 Exploring the Quantum States
- 3.2 Visual Exploration Of The Qubit State
- 3.3 Bypassing The Normalization
- 3.4 Exploring The Observer Effect
- 3.5 Parameterized Quantum Circuit
- 3.6 Variational Hybrid Quantum‐Classical Algorithm
-
4 Probabilistic Binary Classifier
- 4.1 Towards Naïve Bayes
- 4.2 Bayes' Theorem
- 4.3 Gaussian Naïve Bayes
-
5 Working with Qubits
- 5.1 You Don't Need To Be A Mathematician
- 5.2 Quantumic Math ‐ Are You Ready For The Red Pill?
- 5.3 If You Want To Gamble With Quantum Computing
-
6 Working With Multiple Qubits
- 6.1 Hands‐On Introduction To Quantum Entanglement
- 6.2 The Equation Einstein Could Not Believe
- 6.3 Quantum Programming For Non‐mathematicians
-
7 Quantum Naïve Bayes
- 7.1 Pre‐processing
- 7.2 PQC
- 7.3 Post‐Processing
-
8 Quantum Computing Is Different
- 8.1 The No‐Cloning Theorem
- 8.2 How To Solve A Problem With Quantum Computing
- 8.3 The Quantum Oracle Demystified
-
9 Quantum Bayesian Networks
- 9.1 Bayesian Networks
- 9.2 Composing Quantum Computing Controls
- 9.3 Circuit implementation
-
10 Bayesian Inference
- 10.1 Learning Hidden Variables
- 10.2 Estimating A Single Data Point
- 10.3 Estimating A Variable
- 10.4 Predict Survival
-
11 The World Is Not A Disk
- 11.1 The Qubit Phase
- 11.2 Visualize The Invisible Qubit Phase
- 11.3 Phase Kickback
- 11.4 Quantum Amplitudes and Probabilities
-
12 Working With The Qubit Phase
- 12.1 The Intuition Of Grover's Algorithm
- 12.2 Basic Amplitude Amplification
- 12.3 Two‐Qubit Amplification
-
13 Search For The Relatives
- 13.1 Turning the Problem into a Circuit
- 13.2 Multiple Results
-
14 Sampling
- 14.1 Forward Sampling
- 14.2 Bayesian Rejection Sampling
- 14.3 Quantum Rejection Sampling
- 15 What's Next?
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,574,417writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
Recipes for Decoupling
Matthias NobackThe BDD Books - Discovery (Japanese Edition)
Gáspár Nagy, Seb Rose, and Yuya Kazamaウクライナ難民を支援 - 2022年5月末まで延長!
この本の売り上げの50%は、 https://unicef.hu/veszhelyzet-ukrajnaban と https://int.depaulcharity.org/fundraising-for-depaul-ukraine/ に寄付されます。
本書籍は、振る舞い駆動開発(Behavior Driven Development, BDD)や受け入れテスト駆動開発(Acceptance Test-Driven Development, ATDD)の発見フェーズを最大限に活用する方法を提供します。
SignalR on .NET 6 - the Complete Guide
Fiodar SazanavetsLearn everything there is to learn about SignalR and how to integrate it with the latest .NET 6 and C# 10 features. Learn how to connect any type of client to SignalR, including plain WebSocket client. Learn how to build interactive applications that can communicate with each other in real time without making excessive calls.
Agile Testing Condensed Japanese Edition
Yuya Kazama, Janet Gregory, and Lisa CrispinJanet GregoryとLisa Crispinによる2019年9月発行の書籍『Agile Testing Condensed』の日本語翻訳版です。アジャイルにおいてどのような考えでテストを行うべきなのか簡潔に書かれています!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
The easiest way to learn design patterns
Fiodar SazanavetsLearn design patterns in the easiest way possible. You will no longer have to brute-force your way through each one of them while trying to figure out how it works. The book provides a unique methodology that will make your understanding of design patterns stick. It can also be used as a reference book where you can find design patterns in seconds.
Functional event-driven architecture: Powered by Scala 3
Gabriel VolpeExplore the event-driven architecture (EDA) in a purely functional way, mainly powered by Fs2 streams in Scala 3!
Leverage your functional programming skills by designing and writing stateless microservices that scale, powered by stateful message brokers.
Tech Giants in Healthcare
Dr. Bertalan MeskoThis comprehensive guide, Tech Giants in Healthcare, clarifies how and why big tech companies step into healthcare, and breaks it down from one market player to the other in what direction they are going, what tools they are using and what horizons they have in front of them.
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
Nicholas RussoThe service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
Mastering STM32 - Second Edition
Carmine NovielloWith more than 1200 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL and STM32CubeIDE development environment.
Top Bundles
- #1
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #2
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #3
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #4
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #6
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible...