Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
A Practical Guide to Quantum Machine Learning and Quantum Optimization
A Practical Guide to Quantum Machine Learning and Quantum Optimization

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

Arrow left icon
Profile Icon Elías F. Combarro Fernández-Combarro Álvarez Profile Icon Samuel González Castillo
Arrow right icon
£9.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9 (14 Ratings)
Paperback Mar 2023 680 pages 1st Edition
eBook
£31.99
Paperback
£39.99
Subscription
Free Trial
Renews at £9.99p/m
Arrow left icon
Profile Icon Elías F. Combarro Fernández-Combarro Álvarez Profile Icon Samuel González Castillo
Arrow right icon
£9.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9 (14 Ratings)
Paperback Mar 2023 680 pages 1st Edition
eBook
£31.99
Paperback
£39.99
Subscription
Free Trial
Renews at £9.99p/m
eBook
£31.99
Paperback
£39.99
Subscription
Free Trial
Renews at £9.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. £13.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

A Practical Guide to Quantum Machine Learning and Quantum Optimization

Chapter 1
Foundations of Quantum Computing

The beginning is always today.
— Mary Shelley

You may have heard that the mathematics needed to understand quantum computing is arcane, mysterious and difficult…but we utterly disagree! In fact, in this chapter, we will introduce all the concepts that you will need in order to follow the quantum algorithms that we will be studying in the rest of the book. Actually, you may be surprised to see that we will only rely on some linear algebra and a bit of (extremely simple) trigonometry.

We shall start by giving a quick overview of what quantum computing is, what the current state of the art is, and what the main applications are expected to be. After that, we will introduce the model of quantum circuits. There are several computational models for quantum computing, but this is the most popular one and, moreover, it's the one that we will be using throughout most of the book. Then, we will describe in detail what qubits are, how...

1.1 Quantum computing: the big picture

In October 2019, an announcement made by a team of researchers from Google took the scientific world by storm. For the first time ever, a practical demonstration of quantum computational advantage had been shown. The results, published in the prestigious Nature journal [9], reported that a quantum computer had solved, in just a few minutes, a problem that would have taken the most powerful classical supercomputer in the world thousands of years.

Although the task solved by the quantum computer has no direct practical applications and it was later claimed that the computing time with classical resources had been overestimated (see [75] and, also, [73]), this feat remains a milestone in the history of computing and has fueled interest in quantum computing all over the world. So, what can these mysterious quantum computers do? How do they work in order to achieve these mind-blowing speed-ups?

We could define quantum computing as the study of the application...

1.2 The basics of the quantum circuit model

We have mentioned that quantum computing relies on quantum phenomena such as superposition, entanglement, and interference to perform computations. But what does this really mean? To make this explicit, we need to define a particular computational model that allow us to describe mathematically how to take advantage of all these properties.

There are many such models, including quantum Turing machines, measurement-based quantum computing (also known as one-way quantum computing), or adiabatic quantum computing, and all of them are equivalent in power. However, the most popular one — and the one that we will be using for the most part in the book — is the quantum circuit model.

To learn more

In addition to the quantum circuit model, sometimes we will also use the adiabatic model. All the necessary concepts will be introduced in Chapter 4, Quantum Adiabatic Computing and Quantum Annealing.

Every computation has three...

1.3 Working with one qubit and the Bloch sphere

One of the advantages of using a computational model is that you can forget about the particularities of the physical implementation of your computer and focus instead on the properties of the elements on which you store information and the operations you can perform on them. For instance, we could define a qubit as a (physical) quantum system that is capable of being in two different states. In practice, it could be a photon with two possible polarizations, a particle with two possible values for its spin, or a superconducting circuit, whose current can be flowing in one of two directions. When using the quantum circuit model, we can forget about those implementation details and just define a qubit…as a mathematical vector!

1.3.1 What is a qubit?

In fact, a qubit (short for quantum bit, sometimes also written as qbit, Qbit or even q-bit) is the minimal information unit in quantum computing. In the same way that a bit (short for...

1.4 Working with two qubits and entanglement

Now that we have mastered the inner workings of solitary qubits, we are ready to up the ante. In this section, we will learn about systems of two qubits and how they can become entangled. We will first define the mathematical representation of two-qubit systems and how we can measure them. After that, we will study different quantum gates that can act on two qubits at once and we will have a look at some of their very interesting and slightly puzzling properties. We will conclude with a simple but enlightening example of a two-qubit circuit. We promise that the ride is going to be amazing!

1.4.1 Two-qubit states

So far, we have worked with qubits in isolation. But the real power of quantum computing cannot be unleashed unless qubits can talk to each other. We will start by considering the simplest case of quantum systems in which there is qubit interaction: two-qubit systems.

Of course, in a two-qubit system, each of the qubits can be in...

1.5 Working with multiple qubits and universality

Now that we have mastered working with two-qubit systems, it will be fairly straightforward to generalize all the notions that we have been studying to the case in which the number of qubits in our circuits is arbitrarily big. You know the drill: we will start by defining, mathematically, what a multi-qubit system is, we will then learn how to measure it and, finally, we will introduce quantum gates that act on many qubits at the same time.

1.5.1 Multi-qubit systems

With all that we have learned so far, it will now be very easy to understand how to work with multi-qubit systems.

As you may have already deduced, if we have qubits, the states that constitute the computational basis are

We usually omit the symbol to write

or

\left| {00\cdots 0} \right\rangle,\left| {00\cdots 1} \right\rangle,\ldots,\left| {11\cdots 1} \right\rangle

or simply

\left| 0 \right\rangle,\left| 1 \right\rangle,\ldots,\left| {2^{n} - 1} \right\rangle.

Important note

When using the notation for basis states, the total number of qubits must be clear from context. Otherwise, a state like, for example, might mean either , , , or any string with...

Summary

In this chapter, we have introduced the quantum circuit model and the main concepts that it relies on: qubits, gates, and measurements. We have started by studying the most humble circuits, those that only have one or two qubits, but we have used our experience with them to grow all the way up to multi-qubit systems. In the process, we have discovered some powerful properties, such as superposition and entanglement, and we have mastered the mathematics — mainly some linear algebra — needed to work with them.

These notions will be extremely valuable to us, because they make up the language in which we will be describing the quantum algorithms for machine learning and optimization that we will study in the rest of the book. Soon, all the pieces will come together to form a beautiful structure. And we will be able to appreciate it and understand it fully because of the solid foundations that we have acquired by now.

In the next chapter, we will start applying all that...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • 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

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.

Who is this book 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.

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

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 31, 2023
Length: 680 pages
Edition : 1st
Language : English
ISBN-13 : 9781804613832
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. £13.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Mar 31, 2023
Length: 680 pages
Edition : 1st
Language : English
ISBN-13 : 9781804613832
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£9.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£99.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£139.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 109.97
Quantum Computing Algorithms
£41.99
Financial Modeling Using Quantum Computing
£27.99
A Practical Guide to Quantum Machine Learning and Quantum Optimization
£39.99
Total £ 109.97 Stars icon
Visually different images

Table of Contents

21 Chapters
Part I: I, for One, Welcome our New Quantum Overlords Chevron down icon Chevron up icon
Chapter 1: Foundations of Quantum Computing Chevron down icon Chevron up icon
Chapter 2: The Tools of the Trade in Quantum Computing Chevron down icon Chevron up icon
Part II: When Time is Gold: Tools for Quantum Optimization Chevron down icon Chevron up icon
Chapter 3: Working with Quadratic Unconstrained Binary Optimization Problems Chevron down icon Chevron up icon
Chapter 4: Adiabatic Quantum Computing and Quantum Annealing Chevron down icon Chevron up icon
Chapter 5: QAOA: Quantum Approximate Optimization Algorithm Chevron down icon Chevron up icon
Chapter 6: GAS: Grover Adaptive Search Chevron down icon Chevron up icon
Chapter 7: VQE: Variational Quantum Eigensolver Chevron down icon Chevron up icon
Part III: A Match Made in Heaven: Quantum Machine Learning Chevron down icon Chevron up icon
Chapter 8: What Is Quantum Machine Learning? Chevron down icon Chevron up icon
Chapter 9: Quantum Support Vector Machines Chevron down icon Chevron up icon
Chapter 10: Quantum Neural Networks Chevron down icon Chevron up icon
Chapter 11: The Best of Both Worlds: Hybrid Architectures Chevron down icon Chevron up icon
Chapter 12: Quantum Generative Adversarial Networks Chevron down icon Chevron up icon
Part IV: Afterword and Appendices Chevron down icon Chevron up icon
Chapter 13: Afterword: The Future of Quantum Computing Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Bibliography Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9
(14 Ratings)
5 star 85.7%
4 star 14.3%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




N/A Feb 13, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Libro che unisce i modelli di ottimizzazione (con una buona base teorica) al Quantum Computing. Valido.
Feefo Verified review Feefo
Gauri Jul 05, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book offers an in-depth understanding of concepts related to ML, Quantum Computing, and Optimization. As a prior graduate student myself, I found the information related to QC frameworks and quantum gates useful as it explains the working principles of different models related to these concepts.
Amazon Verified review Amazon
Good Jan 20, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I didnt study yet , i have to study
Amazon Verified review Amazon
Kushal Jun 09, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A Practical Guide to Quantum Machine Learning and Quantum Optimization offers a comprehensive and accessible exploration of modern quantum algorithms, providing readers with a hands-on approach to mastering these cutting-edge techniques. This invaluable resource combines theory and practical examples, equipping both beginners and seasoned professionals with the tools and knowledge to harness the power of quantum computing in the fields of machine learning and optimization.
Amazon Verified review Amazon
Ferdous Khan PhD Apr 17, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I attended a series of lectures titled “A Practical Introduction to Quantum Computing: From Qubits to Quantum Machine Learning and Beyond”, taught online from CERN in the summer of 2020 by Elías F. Combarro, and it changed my life in so many ways. Initially, there were 1500+ of us logged in from all over the world, and that must have been a record turnout for any online class. By the end of the classes, most of us had done enough exercises to learn the basics of quantum computing (QC), up to and including Quantum Generative Adversarial Networks (QGANs).And what a treat it was, mainly because Professor Combarro was such a passionate teacher who deeply cared about the subject matter (it showed!), and the students/researchers. There was feedback from us from all over the world, and it sharpened our understanding of the subject matter, i.e., quantum computing. Some of us stayed in touch with Professor Combarro as quantum computing was rapidly evolving. Having remembered the pleasure and benefits of learning from the online class, I had suggested that Professor Combarro write a book on the subject. Beyond that, I can take no further credit, other than occasional inquiries. Credit must go to many, as you will read in Elias’ acknowledgement, foremost among them is the co-author Samuel González-Castillo, and the reviewers, Francisco Orts and Guillermo Botella, and the Editorial review team.This book is about quantum algorithms, and it is a pedagogical treasure. There are many enhancements in this that go beyond the online class! The difference (with the online class) is that the authors decided not to include basic methods such as quantum teleportation, quantum key distribution with the BB84 protocol, or canonical algorithms like the ones by Deutsch and Jozsa, and by Shor, for instance. It is worth recalling that traditionally, one starts studying quantum computing by going through ‘protocols with just a few qubits, and then learning about Deutsch-Jozsa’s, Simon’s, and Bernstein-Vazirani’s algorithms, climbing all the way up to Shor’s and Grover’s methods.’ Some of these methods are, however, discussed elsewhere although not in this book.In contrast, this book is a ‘unified, detailed, and practice-oriented explanation of many algorithms that are central to modern quantum computing and that are difficult to find together in a sole source. This includes a lot of methods that have been developed to solve optimization problems with quantum computers, and most algorithms (especially the ones based on variational circuits) from the field of quantum machine learning.’ This book addresses both of these areas.Parts 2 and 3 are mostly self-contained and independent of each other. ‘They can be used for self-study of quantum optimization and quantum machine learning, or to teach two short, independent courses on these topics or one full course on modern quantum algorithms. The strongest dependencies between chapters are shown in Figure 1, so you can know which chapters you may skip without losing track of the explanation.’ How convenient is this from the pedagogical point of view!I really like the ‘Important notes’, ‘To learn more’, and the Exercises (The answers are provided at the end in Assessments.) The Important notes are essential. The exercises all the more so. The authors assume that you have had no previous experience with quantum computing at all (it is assumed that you have a working knowledge of complex numbers and linear algebra).The other addition that I like is that of the programming framework, PennyLane. In the online class, we used IBM Qiskit, and D-Wave’s Ocean. The authors seem to recommend PennyLane a great deal, perhaps a notch higher. ‘PennyLane is one of the best frameworks out there when it comes to inter-operability.’Finally, as in the online class, there is lots of code that one can run on simulators, and on actual quantum computers, just as we did. It is only after running these codes (in IBM Qiskit) for Shor, Deutsch-Zosja and Grover’s algorithms that I was able to understand what quantum computing was about at some fundamental level. I hope users of this book will take advantage of these codes and gain new insights just as we did in 2020.In the coming years, guided by this book, I am quite certain it would be easier to follow the ‘developments of new quantum methods, the increase of the applicability of quantum techniques, and the deepening of our understanding of the properties of quantum algorithms.’
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.