Quantum Computing
Quantum Machine Learning
From Theory to Practice
AI generated by Nikhil Kumar Rajput
Variational circuits, quantum kernels, QNNs, QCNNs, generative models, barren plateaus, NISQ hardware and error mitigation, with PennyLane and Qiskit code and applications in chemistry, finance, healthcare, language and vision
24 chapters
Contents¶
Front matter
- Preface
- Who This Book Is For
- How This Book Is Organized
- How to Use This Book
- Software and Code
- A Note on NISQ and Beyond
- Abbreviations and Acronyms
Part I: Mathematical and Quantum Foundations
Part II: Classical Machine Learning Prerequisites
Part III: Core QML Algorithms
Chapter 6: Variational Quantum Circuits
- 6.1 Parameterized Quantum Circuits
- 6.2 Common Ansatz Architectures
- 6.3 Expressibility and Entanglement Capability
- 6.4 The Hybrid Classical-Quantum Loop
- 6.5 Variational Quantum Eigensolver (VQE)
- 6.6 Quantum Approximate Optimization Algorithm (QAOA)
- 6.7 Variational Quantum Classifier
- 6.8 Chapter Summary
Part IV: Deep Quantum Learning
Chapter 13: Quantum Autoencoders
Part V: Optimization and Training
Part VI: Hardware, Noise, and Error Mitigation
Part VII: Applications and Domains
Chapter 19: QML for Quantum Chemistry and Molecular Simulation
Part VIII: Frontiers and Future Directions
Chapter 24: Frontiers and Future Directions in QML
Back matter
Preface¶
This book emerged from a simple observation: quantum machine learning sits at one of the most intellectually rich intersections in modern science, yet most resources are either too mathematical for practitioners or too shallow for researchers. This text aims to bridge that gap.
Quantum machine learning (QML) is not a single algorithm or a single idea — it is a paradigm shift in how we think about computation, information, and intelligence. Over the past decade, the convergence of quantum hardware engineering, quantum algorithm design, and classical machine learning theory has created a landscape of extraordinary possibility.
Who This Book Is For¶
This book is designed for several audiences:
-
Machine learning practitioners who want to understand quantum extensions of familiar models (SVMs, neural networks, generative models).
-
Quantum computing researchers seeking a rigorous treatment of the machine learning side.
-
Graduate students in physics, computer science, or engineering embarking on QML research.
-
Industry professionals in finance, healthcare, chemistry, or logistics who are evaluating quantum advantage for their domains.
Note
Prerequisites: Linear algebra at the undergraduate level, basic probability, Python programming, and familiarity with at least one classical ML framework (scikit-learn, PyTorch, or TensorFlow). Prior quantum mechanics experience is helpful but not required — Part I covers everything from scratch.
How This Book Is Organized¶
The book is divided into eight parts and twenty-four chapters:
- Part I: Mathematical and Quantum Foundations
- Chapters 1–3 build the mathematical (linear algebra, optimization, information theory) and quantum (qubits, gates, measurements, algorithms) vocabulary used throughout the book.
- Part II: Classical ML Prerequisites
- Chapters 4–5 review classical machine learning concepts — kernel methods, SVMs, deep learning, generative models — emphasizing the structures that have direct quantum counterparts.
- Part III: Core QML Algorithms
- Chapters 6–10 introduce the heart of QML: variational quantum circuits, quantum feature maps, quantum kernels, quantum SVMs, and quantum neural networks.
- Part IV: Deep Quantum Learning
- Chapters 11–14 extend QML to deep architectures: quantum convolutional networks (QCNNs), quantum LSTMs (QLSTMs), quantum autoencoders, and quantum generative adversarial networks (QGANs).
- Part V: Optimization and Training
- Chapters 15–16 address the training challenge: gradient computation via the parameter shift rule, quantum natural gradient, and the critical problem of barren plateaus.
- Part VI: Hardware, Noise, and Error Mitigation
- Chapters 17–18 cover real quantum hardware constraints, noise models, and practical error mitigation strategies for NISQ devices.
- Part VII: Applications and Domains
- Chapters 19–22 survey QML applications in quantum chemistry, finance, healthcare, NLP, and computer vision.
- Part VIII: Frontiers and Future Directions
- Chapters 23–24 explore quantum advantage theory, fault-tolerant QML, quantum transformers, federated learning, and the open questions of the field.
How to Use This Book¶
Tip
For self-study: Work through Parts I and II carefully if you lack background. Chapters can then be read in order or selectively by topic. Each chapter is largely self-contained with internal cross-references.
For a course: A semester course might cover Parts I–V (Chapters 1–16). An advanced seminar could focus on Parts III–VIII with students presenting individual chapters.
For practitioners: Jump to Chapter 6 (Variational Circuits) after reviewing the notation guide, then follow domain-specific chapters in Part VII.
Each chapter contains:
-
Learning Objectives — clear statements of what you will master
-
Chapter Introduction — motivating context and roadmap
-
Detailed Exposition — theory, proofs, and intuitions
-
Figures and Diagrams — visual representations of key concepts
-
Algorithm Boxes — step-by-step pseudocode
-
Solved Examples — worked problems with full solutions
-
Code Listings — PennyLane/Qiskit implementations
-
Exercises — ranging from foundational to research-level
-
Chapter Summary — key takeaways
-
Further Reading — curated references for deeper study
Software and Code¶
All code examples use Python 3.10+ with the following primary frameworks:
-
PennyLane (version \(\geq\) 0.38) — primary QML framework
-
Qiskit (version \(\geq\) 1.0) — IBM quantum framework
-
PyTorch (version \(\geq\) 2.0) — classical deep learning
-
NumPy, SciPy, scikit-learn — numerical computing
Important
All code in this book is available on the companion GitHub repository. Installation instructions and environment setup are provided in Appendix A. We recommend using a conda or virtual environment to manage dependencies.
A Note on NISQ and Beyond¶
As of 2025–2026, we are firmly in the Noisy Intermediate-Scale Quantum (NISQ) era. Most practical QML experiments run on devices with 50–1000 qubits and significant noise. This book covers both:
-
NISQ-era algorithms (variational, hybrid classical-quantum) that work on today’s hardware
-
Fault-tolerant algorithms (HHL, qPCA, quantum speedups) that require error-corrected hardware but are crucial for understanding the theoretical landscape
We are honest about limitations: classical simulability, dequantization results, and the barren plateau problem all constrain what QML can currently achieve. Our goal is to give you a rigorous, honest, and exciting view of this field.
We hope you enjoy the journey into quantum machine learning.
The quantum future is being written — and you are now part of it.
The Authors
March 2026