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 now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
A Practical Guide to Quantum Machine Learning and Quantum Optimization

You're reading from   A Practical Guide to Quantum Machine Learning and Quantum Optimization Hands-on Approach to Modern Quantum Algorithms

Arrow left icon
Product type Paperback
Published in Mar 2023
Publisher Packt
ISBN-13 9781804613832
Length 680 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Elías F. Combarro Fernández-Combarro Álvarez Elías F. Combarro Fernández-Combarro Álvarez
Author Profile Icon Elías F. Combarro Fernández-Combarro Álvarez
Elías F. Combarro Fernández-Combarro Álvarez
Samuel González Castillo Samuel González Castillo
Author Profile Icon Samuel González Castillo
Samuel González Castillo
Arrow right icon
View More author details
Toc

Table of Contents (27) Chapters Close

Preface 1. Part I: I, for One, Welcome our New Quantum Overlords
2. Chapter 1: Foundations of Quantum Computing FREE CHAPTER 3. Chapter 2: The Tools of the Trade in Quantum Computing 4. Part II: When Time is Gold: Tools for Quantum Optimization
5. Chapter 3: Working with Quadratic Unconstrained Binary Optimization Problems 6. Chapter 4: Adiabatic Quantum Computing and Quantum Annealing 7. Chapter 5: QAOA: Quantum Approximate Optimization Algorithm 8. Chapter 6: GAS: Grover Adaptive Search 9. Chapter 7: VQE: Variational Quantum Eigensolver 10. Part III: A Match Made in Heaven: Quantum Machine Learning
11. Chapter 8: What Is Quantum Machine Learning? 12. Chapter 9: Quantum Support Vector Machines 13. Chapter 10: Quantum Neural Networks 14. Chapter 11: The Best of Both Worlds: Hybrid Architectures 15. Chapter 12: Quantum Generative Adversarial Networks 16. Part IV: Afterword and Appendices
17. Chapter 13: Afterword: The Future of Quantum Computing
18. Assessments 19. Bibliography
20. Index
21. Other Books You May Enjoy Appendix A: Complex Numbers
1. Appendix B: Basic Linear Algebra 2. Appendix C: Computational Complexity 3. Appendix D: Installing the Tools 4. Appendix E: Production Notes

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 binary digit) can be in state or in state , a qubit can be in state or in state . Here, we are using the so-called Dirac notation, where these funny-looking symbols surrounding and are called kets and are used to indicate that we are dealing with vectors instead of regular numbers. In fact, and are not the only possibilities for the state of a qubit and, in general, it could be in a superposition of the form

a\left| 0 \right\rangle + b\left| 1 \right\rangle,

where and are complex numbers, called amplitudes, such that . The quantity is called the norm or length of the state and, when it is equal to , we say that the state is normalized.

To learn more

If you need a refresher on complex numbers or vector spaces, please check Appendix A, Complex Numbers, and Appendix B, Basic Linear Algebra.

All these possible values for the state of a single qubit are vectors that live in a complex vector space of dimension 2 (in fact, they live in what is called a Hilbert space, but since we will be working only with finite dimensions, there is no real difference). Thus we shall fix the vectors and as elements of a special basis, which we will refer to as the computational basis. We will represent these vectors, constituents of the computational basis, as the column vectors

\left| 0 \right\rangle = \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix},\qquad\left| 1 \right\rangle = \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}

and hence

a\left| 0 \right\rangle + b\left| 1 \right\rangle = a\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix} + b\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} = \begin{pmatrix} a \\ b \\ \end{pmatrix}.

If we are given a qubit and we want to determine or, rather, estimate its state, all we can do is perform a measurement and get one of two possible results: 0 or 1. We have nonetheless seen how a qubit can be in infinitely many states, so how does the state of a qubit determine the outcome of a measurement? As you likely already know, in quantum physics, these measurements are not deterministic, but probabilistic. In particular, given any qubit , the probability of getting upon a measurement is , while that of getting is . Naturally, these two probabilities must add up to 1, hence the need for the normalization condition .

If upon measuring a qubit we get, let's say, , we then know that, after the measurement, the state of the qubit is , and we say that the qubit has collapsed into that state. If we obtain , the state collapses to . Since we are obtaining results that correspond to and , we say that we are measuring in the computational basis.

Exercise 1.1

What is the probability of measuring 0 if the state of a qubit is ? And the probability of measuring 1? What if the state of the qubit is ? And if it is ?

So a qubit is, mathematically, just a 2-dimensional vector that satisfies a normalization condition. Who could have known? But the surprises do not end here. In the next subsection, we will see how we can use those funny-looking kets to compute inner products in a very easy way.

1.3.2 Dirac notation and inner products

Dirac notation can not only be used for column vectors, but also for row vectors. In that case, we talk of bras, which, together with kets, can be used to form bra-kets. This name is a pun, because, as we are about to show, bra-kets are, in fact, inner products that are written — you guessed it — between brackets. To be more mathematically precise, with each ket we can associate a bra that is its adjoint or conjugate transpose or Hermitian transpose. In order to obtain this adjoint, we take the ket's column vector, we transpose it and conjugate each of its coordinates (which are, as we already know, complex numbers). We use to denote the bra associated with and to denote the bra associated with , so we have

\left\langle 0 \right| = \left| 0 \right\rangle^{\dagger} = \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}^{\dagger} = \begin{pmatrix} 1 & 0 \\ \end{pmatrix},\qquad\left\langle 1 \right| = \left| 1 \right\rangle^{\dagger} = \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}^{\dagger} = \begin{pmatrix} 0 & 1 \\ \end{pmatrix}

and, in general,

a\left\langle 0 \right| + b\left\langle 1 \right| = a\left| 0 \right\rangle^{\dagger} + b\left| 1 \right\rangle^{\dagger} = a\begin{pmatrix} 1 & 0 \\ \end{pmatrix} + b\begin{pmatrix} 0 & 1 \\ \end{pmatrix} = \begin{pmatrix} a & b \\ \end{pmatrix},

where, as it is customary, we use the dagger symbol () for the adjoint.

Important note

When finding the adjoint, do not forget to conjugate the complex numbers! For instance, it holds that

\begin{pmatrix} \frac{1 - i}{2} \\ \frac{i}{\sqrt{2}} \\ \end{pmatrix}^{\dagger} = \begin{pmatrix} \frac{1 + i}{2} & \frac{- i}{\sqrt{2}} \\ \end{pmatrix}.

One of the reasons why Dirac notation is so popular for working with quantum systems is that, by using it, we can easily compute the inner products of kets and bras. For instance, we can readily show that

\left\langle 0 \middle| 0 \right\rangle = \begin{pmatrix} 1 & 0 \\ \end{pmatrix}\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix} = 1,\qquad\left\langle 0 \middle| 1 \right\rangle = \begin{pmatrix} 1 & 0 \\ \end{pmatrix}\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} = 0,

\left\langle 1 \middle| 0 \right\rangle = \begin{pmatrix} 0 & 1 \\ \end{pmatrix}\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix} = 0,\qquad\left\langle 1 \middle| 1 \right\rangle = \begin{pmatrix} 0 & 1 \\ \end{pmatrix}\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} = 1.

This proves that and are not just elements of any basis but of an orthonormal one, since and are orthogonal and of length 1. Thus, we can compute the inner product of two states and using Dirac notation by noting that

\begin{array}{rlrl} \left\langle \psi_{1} \middle| \psi_{2} \right\rangle & {= \left( {a^{\ast}\left\langle 0 \right| + b^{\ast}\left\langle 1 \right|} \right)\left( {c\left| 0 \right\rangle + d\left| 1 \right\rangle} \right)\qquad} & & \qquad \\ & {= a^{\ast}c\left\langle 0 \middle| 0 \right\rangle + a^{\ast}d\left\langle 0 \middle| 1 \right\rangle + b^{\ast}c\left\langle 1 \middle| 0 \right\rangle + b^{\ast}d\left\langle 1 \middle| 1 \right\rangle\qquad} & & \qquad \\ & {= a^{\ast}c + b^{\ast}d,\qquad} & & \qquad \\ \end{array}

where and are the complex conjugates of and .

Exercise 1.2

What is the inner product of and ? And the inner product of and ?

To learn more

Notice that, if , then , which is the probability of measuring if the state is . This is not accidental. In Chapter 7, VQE: Variational Quantum Eigensolver, for example, we will use measurements in orthonormal bases other than the computational one, and we will see how, in that case, the probability of measuring the result associated to an element of a given orthonormal basis is exactly .

We now know what qubits are, how to measure them, and even how to benefit from Dirac notation for some useful computations. The only thing remaining is to study how to operate on qubits. Are you ready? It is time for us to get you introduced to the mighty quantum gates!

1.3.3 One-qubit quantum gates

So far, we have focused on how a qubit stores information in its state and on how we can access (part of) that information with measurements. But in order to develop useful algorithms, we also need some way of manipulating the state of qubits to perform computations.

Since a qubit is, fundamentally, a quantum system, its evolution follows the laws of quantum mechanics. More precisely, if we suppose that our system is isolated from its environment, it obeys the famous Schrödinger equation.

To learn more

The time-independent Schrödinger equation can be written as

H\left| {\psi(t)} \right\rangle = i\hslash\frac{\partial}{\partial t}\left| {\psi(t)} \right\rangle,

where is the Hamiltonian of the system, is the state vector of the system at time , is the imaginary unit, and is the reduced Planck constant.

We will talk more about Hamiltonians in Chapter 3, QUBO: Quadratic Unconstrained Binary Optimization, Chapter 4, Quantum Adiabatic Computing and Quantum Annealing, and Chapter 7, VQE: Variational Quantum Eigensolver.

Don't panic! To program a quantum computer, you don't need to know how to solve Schrödinger's equation. In fact, the only thing that you need to know is that its solutions are always a special type of linear transformations. For the purposes of the quantum circuit model, since we are working in finite-dimensional spaces and we have fixed a basis, the operations can be described by matrices that are applied to the vectors that represent the states of the qubits.

But not any kind of matrix does the trick. According to quantum mechanics, the only matrices that we can use are the so-called unitary matrices, which are the matrices such that

U^{\dagger}U = UU^{\dagger} = I,

where is the identity matrix and is the adjoint of , that is, the matrix obtained by transposing and replacing each element by its complex conjugate. This means that any unitary matrix is invertible and its inverse is given by . In the context of the quantum circuit model, the operations represented by these matrices are called quantum gates.

To learn more

It is relatively easy to check that unitary matrices preserve vector lengths (see, for instance, Section 5.7.5 in Dancing with Qubits, by Robert Sutor [92]). That is, if is a unitary matrix and is a quantum state (and, hence, its norm is , as we already know) then also is a valid quantum state because its norm is still . For this reason, we can safely apply unitary matrices to our quantum states and rest assured that the resulting states will satisfy the normalization condition.

When we have just one qubit, our unitary matrices need to be of size because the state vector is of dimension 2. Thus, the simplest example of a quantum gate is the identity matrix of dimension 2, which transforms the state of the qubit by... well, by not transforming it at all. A less boring example is the gate, whose matrix is given by

X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \\ \end{pmatrix}.

The gate is also called the NOT gate, because its action on the elements of the computational basis is

X\left| 0 \right\rangle = \begin{pmatrix} 0 & 1 \\ 1 & 0 \\ \end{pmatrix}\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} = \left| 1 \right\rangle,\qquad X\left| 1 \right\rangle = \begin{pmatrix} 0 & 1 \\ 1 & 0 \\ \end{pmatrix}\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix} = \left| 0 \right\rangle,

which is exactly what the NOT gate does in classical digital circuits.

Exercise 1.3

Check that the gate matrix is, indeed, unitary. What is the inverse of ? What is the action of on a general qubit in a state of the form ?

A quantum gate with no classical analog is the Hadamard or gate, given by

H = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & {- \frac{1}{\sqrt{2}}} \\ \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & {- 1} \\ \end{pmatrix}.

This gate is extremely useful in quantum computing, for it can create superposition. To be precise, if we apply the gate on a qubit in state , we obtain

H\left| 0 \right\rangle = \frac{1}{\sqrt{2}}\left| 0 \right\rangle + \frac{1}{\sqrt{2}}\left| 1 \right\rangle = \frac{1}{\sqrt{2}}\left( {\left| 0 \right\rangle + \left| 1 \right\rangle} \right).

This state is so important that it has its own name and symbol. It is called the plus state and it is denoted by . In a similar way, we have that

H\left| 1 \right\rangle = \frac{1}{\sqrt{2}}\left( {\left| 0 \right\rangle - \left| 1 \right\rangle} \right)

and, as you probably guessed, this state is called the minus state and it is denoted by .

Exercise 1.4

Check that the gate matrix is, indeed, unitary. What is the action of on and ? What is the action of on and ?

Of course, we can apply several gates to the same qubit one after the other. For instance, consider the following circuit:

HXH

We read gates from left to right, so in the preceding circuit we would first apply an gate, then an gate and, finally, another gate. You can easily check that, if the initial state of the qubit is , it would end up again in state . But were its initial state , the final state would become .

It turns out that this operation is also very important, and, of course, it has its own name: we call it the gate. From its action on and , we can tell that its matrix will be

Z = \begin{pmatrix} 1 & 0 \\ 0 & {- 1} \\ \end{pmatrix},

something that we could have also deduced by multiplying the matrices of the gates , , and one after the other.

Exercise 1.5

Check that and that in two different ways. First, use Dirac notation and the actions of and (remember that we have defined as ). Then, derive the same result by performing the matrix multiplication

\begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & {- \frac{1}{\sqrt{2}}} \\ \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \\ \end{pmatrix}\begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & {- \frac{1}{\sqrt{2}}} \\ \end{pmatrix}.

Since there are and gates, you may be wondering if there is also a gate. Indeed, there is one, given by matrix Y = \begin{pmatrix} 0 & {- i} \\ i & 0 \\ \end{pmatrix}.

To learn more

The set , known as the set of Pauli matrices, is of great importance in quantum computing. One of its many interesting properties is that it constitutes a basis of the vector space of complex matrices. We will work with it in Chapter 7, VQE: Variational Quantum Eigensolver, for instance.

Other important one-qubit gates include the and gates, whose matrices are

S = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\frac{\pi}{2}} \\ \end{pmatrix},\qquad T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\frac{\pi}{4}} \\ \end{pmatrix}.

But, of course, there is an (uncountably!) infinite number of 2-dimensional unitary matrices and we cannot just list them all here. What we will do instead is introduce a beautiful geometrical representation of single-qubit states, and, with it, we will explain how all one-qubit quantum gates can, in fact, be understood as certain kinds of rotations. Enter the Bloch sphere!

Exercise 1.6

Check that . Then, use the most beautiful formula ever (i.e., Euler's identity ) to check that . Check also that and are unitary. Express and as powers of and .

1.3.4 The Bloch sphere and rotations

The general state of a qubit is described with two complex numbers. Since each of those numbers has two real components, it would be natural to think that we would need a four-dimensional real space in order to represent the state of a qubit. Surprisingly enough, all the possible states of a qubit can be drawn on the surface of an old-school sphere, which is a two-dimensional object!

To show how it can be accomplished, we need to remember that a complex number can be written in polar coordinates as

z = re^{i\alpha},

where is a non-negative real number and is an angle in . Consider, then, a qubit in a state and write and in polar coordinates as

a = r_{1}e^{i\alpha_{1}},\qquad b = r_{2}e^{i\alpha_{2}}.

We know that and, since , there must exist an angle in such that and . The reason for considering instead of in the cosine and sine will be apparent in a moment. Notice that, by now, we have

\left| \psi \right\rangle = \cos\frac{\theta}{2}e^{i\alpha_{1}}\left| 0 \right\rangle + \sin\frac{\theta}{2}e^{i\alpha_{2}}\left| 1 \right\rangle.

Another crucial observation is that we can multiply by a complex number with absolute value 1 without changing its state. Indeed, it is easy to see that does not affect the probabilities of obtaining 0 and 1 when measuring in the computational basis (check it!) and, by linearity, it comes out when applying a quantum gate (that is, ). Thus, there is no operation — either unitary transformation or measurement — that allows us to distinguish from . We call a global phase and we have just shown that it is physically irrelevant.

Important note

Notice, however, that relative phases are, unlike global ones, really relevant! For instance, and differ just in the phase of , but we can easily distinguish between them by first applying to those states and then measuring them in the computational basis.

We can, thus, multiply by to obtain an equivalent representation

\left| \psi \right\rangle = \cos\frac{\theta}{2}\left| 0 \right\rangle + \sin\frac{\theta}{2}e^{i\varphi}\left| 1 \right\rangle,

where we have defined .

In this way, we can describe the state of any qubit with just two numbers and that we can interpret as a polar angle and an azimuthal angle, respectively (that is, we are using what are known as spherical coordinates). This gives us a three-dimensional point

(\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta)

that locates the state of the qubit on the surface of a sphere, called the Bloch sphere (see Figure 1.2).

Figure 1.2: Qubit state \left| \psi \right\rangle represented on the Bloch sphere.

Notice that runs from to to cover the whole range from the top to the bottom of the sphere. This is why we used in the representation of our preceding qubit. We only needed to get up to for our angles in the sines and cosines!

In the Bloch sphere, is mapped to the North pole and to the South pole. In general, states that are orthogonal with respect to the inner product are antipodal on the sphere. For instance, and both lie on the equator, but on opposite points of the sphere. As we already know, the gate takes to and to , but leaves and unchanged, at least up to an irrelevant global phase. In fact, this means that the gate acts like a rotation of radians around the axis of the Bloch sphere…, so now you know why we use that name for the gate! In the same manner, and are rotations of radians around the and axes, respectively.

We can generalize this behavior to obtain rotations of any angle around any axis of the Bloch sphere. For instance, for the , , and axes we may define

R_{X}(\theta) = e^{- i\frac{\theta}{2}X} = \cos\frac{\theta}{2}I - i\sin\frac{\theta}{2}X = \begin{pmatrix} {\cos\frac{\theta}{2}} & {- i\sin\frac{\theta}{2}} \\ {- i\sin\frac{\theta}{2}} & {\cos\frac{\theta}{2}} \\ \end{pmatrix},

R_{Y}(\theta) = e^{- i\frac{\theta}{2}Y} = \cos\frac{\theta}{2}I - i\sin\frac{\theta}{2}Y = \begin{pmatrix} {\cos\frac{\theta}{2}} & {- \sin\frac{\theta}{2}} \\ {\sin\frac{\theta}{2}} & {\cos\frac{\theta}{2}} \\ \end{pmatrix},

R_{Z}(\theta) = e^{- i\frac{\theta}{2}Z} = \cos\frac{\theta}{2}I - i\sin\frac{\theta}{2}Z = \begin{pmatrix} e^{- i\frac{\theta}{2}} & 0 \\ 0 & e^{i\frac{\theta}{2}} \\ \end{pmatrix} \equiv \begin{pmatrix} 1 & 0 \\ 0 & e^{i\theta} \\ \end{pmatrix},

where we use the symbol for equivalent action up to a global phase. Notice that , , , , and .

Exercise 1.7

Check these equivalences by substituting the angles in the definitions of , , and .

In fact, it can be proved (see, for instance, the book by Nielsen and Chuang [69]) that for any one-qubit gate there exists a unit vector and an angle such that

U \equiv \cos\frac{\theta}{2}I - i\sin\frac{\theta}{2}(r_{x}X + r_{y}Y + r_{z}Z).

For example, choosing and we can obtain the Hadamard gate, for it holds that

H \equiv - i\frac{1}{\sqrt{2}}(X + Z).

Additionally, it can also be proved that, again for any one-qubit gate , there exist three angles , , and such that

U \equiv R_{Z}(\alpha)R_{Y}(\beta)R_{Z}(\gamma).

In fact, you can obtain such a decomposition for any two rotation axes as long as they are not parallel, not just for and .

Moreover, in some quantum computing architectures (including the ones used by companies such as IBM), it is common to use a universal one-qubit gate, called the -gate, that depends on three angles and is able to generate any other one-qubit gate. Its matrix is

U\left( {\theta,\varphi,\lambda} \right) = \begin{pmatrix} {\cos\frac{\theta}{2}} & {- e^{i\lambda}\sin\frac{\theta}{2}} \\ {e^{i\varphi}\sin\frac{\theta}{2}} & {e^{i{({\varphi + \lambda})}}\cos\frac{\theta}{2}} \\ \end{pmatrix}.

Exercise 1.8

Show that is unitary. Check that , that and that, up to a global phase, .

All these observations about how to construct one-qubit gates from rotations and parametrized families will be very important when we talk about variational forms and feature maps in Chapter 9, Quantum Support Vector Machines, and Chapter 10, Quantum Neural Networks, and also to construct controlled gates later in this chapter.

1.3.5 Hello, quantum world!

To put together everything that we have learned, we are going to create our very first complete quantum circuit. It looks like this:

H

It doesn't seem very impressive, but let's analyze it part by part. As you know, following convention, the initial state of our qubit is assumed to be , so that's what we have before we do anything. Then we apply the gate, so the state changes to . Finally, we measure the qubit. The probability of obtaining will be , and that of getting will also be , so we have created a circuit that — at least in theory — generates random bits following a perfectly uniform distribution.

To learn more

Unbiased uniform bit distributions are of great relevance for multiple applications in simulation, cryptography, and even online gambling games. As we will learn in Chapter 2, The Tools of the Trade, current quantum computers deviate from this equilibrium because they are affected by noise and gate and measurement errors. However, protocols to extract perfect random bits even with noisy quantum computers have been proposed and could become one of the first practical applications of quantum computing (see, for instance, the paper by Acín and Masanes [3]).

We can modify the previous circuit to obtain any distribution over and that we desire. If we want the probability of measuring to be , we just need to consider and the following circuit:

R (𝜃) Y

Exercise 1.9

Check that, with the preceding circuit, the state before measurement is and, hence, the probability of measuring is and that of measuring is .

For now, this is all that we need to know about one-qubit states, gates, and measurements. Let us move on to two-qubit systems, where the mysteries of entanglement are awaiting to be revealed!

You have been reading a chapter from
A Practical Guide to Quantum Machine Learning and Quantum Optimization
Published in: Mar 2023
Publisher: Packt
ISBN-13: 9781804613832
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime