A Practical Guide to Quantum Machine Learning and Quantum Optimization: Hands-on Approach to Modern Quantum Algorithms

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Work with fully explained algorithms and ready-to-use examples that can be run on quantum simulators and actual quantum computers with this comprehensive guide Key Features Get a solid grasp of the principles behind quantum algorithms and optimization with minimal mathematical prerequisites Learn the process of implementing the algorithms on simulators and actual quantum computers Solve real-world problems using practical examples of methods Book Description This book provides deep coverage of modern quantum algorithms that can be used to solve real-world problems. You'll be introduced to quantum computing using a hands-on approach with minimal prerequisites. You'll discover many algorithms, tools, and methods to model optimization problems with the QUBO and Ising formalisms, and you will find out how to solve optimization problems with quantum annealing, QAOA, Grover Adaptive Search (GAS), and VQE. This book also shows you how to train quantum machine learning models, such as quantum support vector machines, quantum neural networks, and quantum generative adversarial networks. The book takes a straightforward path to help you learn about quantum algorithms, illustrating them with code that's ready to be run on quantum simulators and actual quantum computers. You'll also learn how to utilize programming frameworks such as IBM's Qiskit, Xanadu's PennyLane, and D-Wave's Leap. Through reading this book, you will not only build a solid foundation of the fundamentals of quantum computing, but you will also become familiar with a wide variety of modern quantum algorithms. Moreover, this book will give you the programming skills that will enable you to start applying quantum methods to solve practical problems right away. What you will learn Review the basics of quantum computing Gain a solid understanding of modern quantum algorithms Understand how to formulate optimization problems with QUBO Solve optimization problems with quantum annealing, QAOA, GAS, and VQE Find out how to create quantum machine learning models Explore how quantum support vector machines and quantum neural networks work using Qiskit and PennyLane Discover how to implement hybrid architectures using Qiskit and PennyLane and its PyTorch interface Who this book is for This book is for professionals from a wide variety of backgrounds, including computer scientists and programmers, engineers, physicists, chemists, and mathematicians. Basic knowledge of linear algebra and some programming skills (for instance, in Python) are assumed, although all mathematical prerequisites will be covered in the appendices.

Author(s): Elías F. Combarro, Samuel González-Castillo
Publisher: Packt Publishing
Year: 2023

Language: English
Pages: 766

Preface
I I, for One, Welcome our New Quantum Overlords
1 Foundations of Quantum Computing
1.1 Quantum computing: the big picture
1.2 The basics of the quantum circuit model
1.3 Working with one qubit and the Bloch sphere
1.3.1 What is a qubit?
1.3.2 Dirac notation and inner products
1.3.3 One-qubit quantum gates
1.3.4 The Bloch sphere and rotations
1.3.5 Hello, quantum world!
1.4 Working with two qubits and entanglement
1.4.1 Two-qubit states
1.4.2 Two-qubit gates: tensor products
1.4.3 The CNOT gate
1.4.4 Entanglement
1.4.5 The no-cloning theorem
1.4.6 Controlled gates
1.4.7 Hello, entangled world!
1.5 Working with multiple qubits and universality
1.5.1 Multi-qubit systems
1.5.2 Multi-qubit gates
1.5.3 Universal gates in quantum computing
Summary
2 The Tools of the Trade in Quantum Computing
2.1 Tools for quantum computing: a non-exhaustive overview
2.1.1 A non-exhaustive survey of frameworks and platforms
2.1.2 Qiskit, PennyLane, and Ocean
2.2 Working with Qiskit
2.2.1 An overview of the Qiskit framework
2.2.2 Using Qiskit Terra to build quantum circuits
2.2.3 Using Qiskit Aer to simulate quantum circuits
2.2.4 Let’s get real: using IBM Quantum
2.3 Working with PennyLane
2.3.1 Circuit engineering 101
2.3.2 PennyLane’s interoperability
Summary
II When Time is Gold: Tools for Quantum Optimization
3 Working with Quadratic Unconstrained Binary Optimization Problems
3.1 The Max-Cut problem and the Ising model
3.1.1 Graphs and cuts
3.1.2 Formulating the problem
3.1.3 The Ising model
3.2 Enter quantum: formulating optimization problems the quantum way
3.2.1 From classical variables to qubits
3.2.2 Computing expectation values with Qiskit
3.3 Moving from Ising to QUBO and back
3.4 Combinatorial optimization problems with the QUBO model
3.4.1 Binary linear programming
3.4.2 The Knapsack problem
3.4.3 Graph coloring
3.4.4 The Traveling Salesperson Problem
3.4.5 Other problems and other formulations
Summary
4 Adiabatic Quantum Computing and Quantum Annealing
4.1 Adiabatic quantum computing
4.2 Quantum annealing
4.3 Using Ocean to formulate and transform optimization problems
4.3.1 Constrained quadratic models in Ocean
4.3.2 Solving constrained quadratic models with dimod
4.3.3 Running constrained problems on quantum annealers
4.4 Solving optimization problems on quantum annealers with Leap
4.4.1 The Leap annealers
4.4.2 Embeddings and annealer topologies
4.4.3 Controlling annealing parameters
4.4.4 The importance of coupling strengths
4.4.5 Classical and hybrid samplers
Summary
5 QAOA: Quantum Approximate Optimization Algorithm
5.1 From adiabatic computing to QAOA
5.1.1 Discretizing adiabatic quantum computing
5.1.2 QAOA: The algorithm
5.1.3 Circuits for QAOA
5.1.4 Estimating the energy
5.1.5 QUBO and HOBO
5.2 Using QAOA with Qiskit
5.2.1 Using QAOA with Hamiltonians
5.2.2 Solving QUBO problems with QAOA in Qiskit
5.3 Using QAOA with PennyLane
Summary
6 GAS: Grover Adaptive Search
6.1 Grover’s algorithm
6.1.1 Quantum oracles
6.1.2 Grover’s circuits
6.1.3 Probability of finding a marked element
6.1.4 Finding minima with Grover’s algorithm
6.2 Quantum oracles for combinatorial optimization
6.2.1 The quantum Fourier transform
6.2.2 Encoding and adding integer numbers
6.2.3 Computing the whole polynomial
6.2.4 Constructing the oracle
6.3 Using GAS with Qiskit
Summary
7 VQE: Variational Quantum Eigensolver
7.1 Hamiltonians, observables, and their expectation values
7.1.1 Observables
7.1.2 Estimating the expectation values of observables
7.2 Introducing VQE
7.2.1 Getting excited with VQE
7.3 Using VQE with Qiskit
7.3.1 Defining a molecular problem in Qiskit
7.3.2 Using VQE with Hamiltonians
7.3.3 Finding excited states with Qiskit
7.3.4 Using VQE with molecular problems
7.3.5 Simulations with noise
7.3.6 Running VQE on quantum computers
7.3.7 The shape of things to come: the future of Qiskit
7.4 Using VQE with PennyLane
7.4.1 Defining a molecular problem in PennyLane
7.4.2 Implementing and running VQE
7.4.3 Running VQE on real quantum devices
Summary