A practical guide to quantum machine learning and quantum optimisation hands-on primer to quantum computing - from qubits to quantum machine learning and beyond
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 th...
Otros Autores: | , , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
London, England :
Packt Publishing
[2023]
|
Edición: | 1st ed |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009730939006719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Foreword
- Acknowledgements
- Table of Contents
- Preface
- Part 1: I, for One, Welcome our New Quantum Overlords
- Chapter 1: Foundations of Quantum Computing
- Quantum computing: the big picture
- The basics of the quantum circuit model
- Working with one qubit and the Bloch sphere
- What is a qubit?
- Dirac notation and inner products
- One-qubit quantum gates
- The Bloch sphere and rotations
- Hello, quantum world!
- Working with two qubits and entanglement
- Two-qubit states
- Two-qubit gates: tensor products
- The CNOT gate
- Entanglement
- The no-cloning theorem
- Controlled gates
- Hello, entangled world!
- Working with multiple qubits and universality
- Multi-qubit systems
- Multi-qubit gates
- Universal gates in quantum computing
- Summary
- Chapter 2: The Tools of the Trade in Quantum Computing
- Tools for quantum computing: a non-exhaustive overview
- A non-exhaustive survey of frameworks and platforms
- Qiskit, PennyLane, and Ocean
- Working with Qiskit
- An overview of the Qiskit framework
- Using Qiskit Terra to build quantum circuits
- Initializing circuits
- Quantum gates
- Measurements
- Using Qiskit Aer to simulate quantum circuits
- Let's get real: using IBM Quantum
- Working with PennyLane
- Circuit engineering 101
- PennyLane's interoperability
- Love is in the Aer
- Connecting to IBMQ
- Summary
- Part 2: When Time is Gold: Tools for Quantum Optimization
- Chapter 3: Working with Quadratic Unconstrained Binary Optimization Problems
- The Max-Cut problem and the Ising model
- Graphs and cuts
- Formulating the problem
- The Ising model
- Enter quantum: formulating optimization problems the quantum way
- From classical variables to qubits
- Computing expectation values with Qiskit
- Moving from Ising to QUBO and back.
- Combinatorial optimization problems with the QUBO model
- Binary linear programming
- The Knapsack problem
- Graph coloring
- The Traveling Salesperson Problem
- Other problems and other formulations
- Summary
- Chapter 4: Adiabatic Quantum Computing and Quantum Annealing
- Adiabatic quantum computing
- Quantum annealing
- Using Ocean to formulate and transform optimization problems
- Constrained quadratic models in Ocean
- Solving constrained quadratic models with dimod
- Running constrained problems on quantum annealers
- Solving optimization problems on quantum annealers with Leap
- The Leap annealers
- Embeddings and annealer topologies
- Controlling annealing parameters
- The importance of coupling strengths
- Classical and hybrid samplers
- Classical solvers
- Hybrid solvers
- Summary
- Chapter 5: QAOA: Quantum Approximate Optimization Algorithm
- From adiabatic computing to QAOA
- Discretizing adiabatic quantum computing
- QAOA: The algorithm
- Circuits for QAOA
- Estimating the energy
- QUBO and HOBO
- Using QAOA with Qiskit
- Using QAOA with Hamiltonians
- Solving QUBO problems with QAOA in Qiskit
- Using QAOA with PennyLane
- Summary
- Chapter 6: GAS: Grover Adaptive Search
- Grover's algorithm
- Quantum oracles
- Grover's circuits
- Probability of finding a marked element
- Finding minima with Grover's algorithm
- Quantum oracles for combinatorial optimization
- The quantum Fourier transform
- Encoding and adding integer numbers
- Computing the whole polynomial
- Constructing the oracle
- Using GAS with Qiskit
- Summary
- Chapter 7: VQE: Variational Quantum Eigensolver
- Hamiltonians, observables, and their expectation values
- Observables
- Estimating the expectation values of observables
- Introducing VQE
- Getting excited with VQE
- Using VQE with Qiskit.
- Defining a molecular problem in Qiskit
- Using VQE with Hamiltonians
- Finding excited states with Qiskit
- Using VQE with molecular problems
- Simulations with noise
- Running VQE on quantum computers
- The shape of things to come: the future of Qiskit
- Using VQE with PennyLane
- Defining a molecular problem in PennyLane
- Implementing and running VQE
- Running VQE on real quantum devices
- Summary
- Part 3: A Match Made in Heaven: Quantum Machine Learning
- Chapter 8: What Is Quantum Machine Learning?
- The basics of machine learning
- The ingredients for machine learning
- Types of machine learning
- Do you wanna train a model?
- Picking a model
- Understanding loss functions
- Gradient descent
- Getting in the (Tensor)Flow
- Training the model
- Binary classifier performance
- Quantum-classical models
- Summary
- Chapter 9: Quantum Support Vector Machines
- Support vector machines
- The simplest classifier you could think of
- How to train support vector machines: the hard-margin case
- Soft-margin training
- The kernel trick
- Going quantum
- The general idea behind quantum support vector machines
- Feature maps
- Quantum support vector machines in PennyLane
- Setting the scene for training a QSVM
- PennyLane and scikit-learn go on their first date
- Reducing the dimensionality of a dataset
- Implementing and using custom feature maps
- Quantum support vector machines in Qiskit
- QSVMs on Qiskit Aer
- QSVMs on IBM quantum computers
- Summary
- Chapter 10: Quantum Neural Networks
- Building and training a quantum neural network
- A journey from classical neural networks to quantum neural networks
- Variational forms
- A word about measurements
- Gradient computation and the parameter shift rule
- Practical usage of quantum neural networks
- Quantum neural networks in PennyLane.
- Preparing data for a QNN
- Building the network
- Using TensorFlow with PennyLane
- Gradient computation in PennyLane
- Quantum neural networks in Qiskit: a commentary
- Summary
- Chapter 11: The Best of Both Worlds: Hybrid Architectures
- The what and why of hybrid architectures
- Hybrid architectures in PennyLane
- Setting things up
- A binary classification problem
- Training models in the real world
- A multi-class classification problem
- A general perspective on multi-class classification tasks
- Implementing a QNN for a ternary classification problem
- Hybrid architectures in Qiskit
- Nice to meet you, PyTorch!
- Setting up a model in PyTorch
- Training a model in PyTorch
- Building a hybrid binary classifier with Qiskit
- Training Qiskit QNNs with Runtime
- A glimpse into the future
- Summary
- Chapter 12: Quantum Generative Adversarial Networks
- GANs and their quantum counterparts
- A seemingly unrelated story about money
- What actually is a GAN?
- Some technicalities about GANs
- Quantum GANs
- Quantum GANs in PennyLane
- Preparing a QGAN model
- The training process
- Quantum GANs in Qiskit
- Summary
- Afterword and Appendices
- Chapter 13: Afterword: The Future of Quantum Computing
- Appendix A: Complex Numbers
- Appendix B: Basic Linear Algebra
- Vector spaces
- Bases and coordinates
- Linear maps and eigenstuff
- Inner products and adjoint operators
- Matrix exponentiation
- A crash course in modular arithmetic
- Appendix C: Computational Complexity
- A few words on Turing machines
- Measuring computational time
- Asymptotic complexity
- P and NP
- Hardness, completeness, and reductions
- A very brief introduction to quantum computational complexity
- Appendix D: Installing the Tools
- Getting Python
- Installing the libraries
- Accessing IBM's quantum computers.
- Accessing D-Wave quantum annealers
- Using GPUs to accelerate simulations in Google Colab
- Appendix E: Production Notes
- Assessments
- Chapter 1, Foundations of Quantum Computing
- Chapter 2, The Tools of the Trade in Quantum Computing
- Chapter 3, Working with Quadratic Unconstrained Binary Optimization Problems
- Chapter 4, Adiabatic Quantum Computing and Quantum Annealing
- Chapter 5, QAOA: Quantum Approximate Optimization Algorithm
- Chapter 6, GAS: Grover Adaptative Search
- Chapter 7, VQE: Variational Quantum Eigensolver
- Chapter 8, What is Quantum machine Learning?
- Chapter 9, Quantum Support Vector Machines
- Chapter 10, Quantum Neural Networks
- Chapter 11, The Best of Both Worlds: Hybrid Architectures
- Chapter 12, Quantum Generative Adversarial Networks
- Bibliography
- Index
- Other Books You Might Enjoy.