Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Essential Mathematics for Quantum Computing
Essential Mathematics for Quantum Computing

Essential Mathematics for Quantum Computing: A beginner's guide to just the math you need without needless complexities

eBook
€11.99 €17.99
Paperback
€22.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Essential Mathematics for Quantum Computing

Chapter 1: Superposition with Euclid

Mathematics is the language of physics and the foundation of computer science. Since quantum computing evolved from these two disciplines, it is essential to understand the mathematics behind it. The math you need is linear in nature, and that is where we will start. By the time we are done, you will have the mathematical foundation to fundamentally understand quantum computing. Let's get started!

In this chapter, we are going to cover the following main topics:

  • Vectors
  • Linear combinations
  • Superposition

Vectors

A long time ago in a country far, far away, there lived an ancient Greek mathematician named Euclid. He wrote a book that defined space using only three dimensions. We will use his vector space to define superposition in quantum computing. Don't be fooled—vector spaces have evolved tremendously since Euclid's days, and our definition of them will evolve too as the book progresses. But for now, we will stick to real numbers, and we'll actually only need two out of the three dimensions Euclid proposed.

To start, we will define a Euclidean vector as being a line segment with a length or magnitude and pointing in a certain direction, as shown in the following screenshot:

Figure 1.1 – Euclidean vector

Figure 1.1 – Euclidean vector

Two vectors are equal if they have the same length and direction, so the following vectors are all equal:

Figure 1.2 – Equal vectors

Figure 1.2 – Equal vectors

Vectors can be represented algebraically by their components. The simplest way to do this is to have them start at the origin (the point (0,0)) and use their x and y coordinates, as shown in the following screenshot:

Figure 1.3 – Vectors represented geometrically and algebraically

Figure 1.3 – Vectors represented geometrically and algebraically

You should note that I am using a special notation to label the vectors. It is called bra-ket notation. The appendix has more information on this notation, but for now, we will use a vertical bar or pipe, |, followed by the variable name for the vector and then an angle bracket, , to denote a vector (for example, |a). The coordinates of our vectors will be enclosed in brackets [ ]. The x coordinate will be on top and the y coordinate on the bottom. Vectors are also called "kets" in this notation—for example, ket a, but for now, we will stick with the name vector.

Vector addition

So, it ends up that we can add vectors together both geometrically and algebraically, as shown in the following screenshot:

Figure 1.4 – Vector addition

Figure 1.4 – Vector addition

As you can see, we can take vectors and move them in the XY-plane as long as we preserve their length and direction. We have taken the vector |b from our first graph and moved its start position to the end of vector |a. Once we do that, we can draw a third vector |c that connects the start of |a and the end of |b to form their sum. If we look at the coordinates of |c, it is four units in the x direction and zero units in the y direction. This corresponds to the answer we see on the right of Figure 1.4.

We can also do this addition without the help of a graph, as shown on the right of Figure 1.4. Just adding the first components (3 and 1) gives 4, and adding the second components of the vectors (2 and -2) gives 0. Thus, vector addition works both geometrically and algebraically in two dimensions. So, let's look at an example.

Example

What is the sum of |m and |n here?

The solution is:

Exercise 1

Now, you try. The answers are at the end of this chapter:

  • What is |m - |n?
  • What is |n - |m?
  • Solve the following expression (notice we use three-dimensional (3D) vectors, but everything works the same):

Scalar multiplication

We can also multiply our vectors by numbers or scalars. They are called scalars because they "scale" a vector, as we will see. The following screenshot shows a vector that is multiplied by a number on the left and the same thing algebraically on the right:

Figure 1.5 – Scalar multiplication

Figure 1.5 – Scalar multiplication

The vector |b is doubled or multiplied by two. Geometrically, we take the vector |b and scale its length by two while preserving its direction. Algebraically, we can just multiply the components of the vector by the number or scalar two.

Example

What is triple the vector |x shown here?

The solution is:

Exercise 2

  • What is 4|x?
  • What is -2|x?

Linear combinations

Once we have established that we can add our vectors and multiply them by scalars, we can start to talk about linear combinations. Linear combinations are just the scaling and addition of vectors to form new vectors. Let's start with our two vectors we have been working with the whole time, |a and |b. I want to scale my vector |a by two to get a new vector |c, as shown in the following screenshot:

Figure 1.6 – |a⟩ scaled by two to produce |c⟩

Figure 1.6 – |a scaled by two to produce |c

As we have said, we can do this algebraically as well, as the following equation shows:

Then, I want to take my vector |b and scale it by two to get a new vector, |d, as shown in the following screenshot:

Figure 1.7 – |b⟩ scaled by two to produce |d⟩

Figure 1.7 – |b scaled by two to produce |d

So, now, we have a vector |c that is two times |a, and a vector |d that is two times |b:

Can I add these two new vectors, |c and |d? Certainly! I will do that, but I will express |e as a linear combination of |a and |b in the following way:

Vector |e is a linear combination of vectors |a and |b! Now, I can show this all geometrically, as follows:

Figure 1.8 – Linear combination

Figure 1.8 – Linear combination

This can also be represented in the following equation:

So, we now have a firm grasp on Euclidean vectors, the algebra you can perform with them, and the concept of a linear combination. We will use that in this next section to describe a quantum phenomenon called superposition.

Superposition

Superposition can be a very imposing term, so before we delve into it, let's take a step back and talk about the computers we use today. In quantum computing, we call these computers "classical computers" to distinguish them from quantum computers. Classical computers use binary digits—or bits, for short—to store ones and zeros. These ones and zeros can represent anything, from truth values to characters to pixel values on a screen! They are physically implemented using any two-state device such as an electrical switch that is either on or off.

A quantum bit, or qubit for short, is the analogous building block of quantum computers. They are implemented by anything that demonstrates quantum phenomena, which means they are very, very small. In the following screenshot, we show how a property of an electron—namely spin—can be used to represent a one or zero of a qubit:

Figure 1.9 – Pair of electrons with a spin labeled 1 and 0

Figure 1.9 – Pair of electrons with a spin labeled 1 and 0

Physicists use mathematics to model quantum phenomena, and guess what they use to model the state of a quantum particle? That's right! Vectors! Quantum computer scientists have taken two of these states and labeled them as the canonical one and zero for qubits. They are shown in the following screenshot:

Figure 1.10 – Zero and one states

Figure 1.10 – Zero and one states

As you can see, the zero and one states are just vectors on the x and y axes with a length of one unit each. When you combine a lot of ones and zeros in classical computing, wonderful, complex things can be done. The same is true of the zero and one state of qubits in quantum computing.

Greek Letters

Mathematicians and physicists love Greek letters, and they have found their way into quantum computing in several places. The Greek letter "Psi", ψ, is often used to represent the state of a qubit. The Greek letters "alpha", α, and "beta", β, are used to represent numbers or scalars.

While qubits can represent a one or a zero, they have a superpower in that they can represent a combination of a zero and one as well! "How?" you might ask. Well, this is where superposition comes in. Understanding it is actually quite simple from a mathematical standpoint. In fact, you already know what it is! It's just a fancy way of saying that a qubit is in a linear combination of states.

If you recall, we defined the vector |e as a linear combination of the aforementioned |a and |b, like so:

Figure 1.11 – Definition of |e⟩

Figure 1.11 – Definition of |e

If we replace those letters and numbers with the Greek letters and the zero and one states we just introduced, we get an equation like this:

Figure 1.12 – Greek letters being transposed onto a linear combination equation

Figure 1.12 – Greek letters being transposed onto a linear combination equation

The bottom equation represents a qubit in the state |ψ, which is a superposition of the states zero and one! You now know what superposition is mathematically! This, by the way, is the only way that counts because math is the language of physics and, therefore, quantum computing.

Measurement

But wait—there's more! With only the simple mathematics you have acquired so far, you also get a look at the weird act of measuring qubits. The scalars α and β shown previously play a crucial role when measuring qubits. In fact, if we were to set this qubit up in the state |ψ an infinite number of times, when we measured it for a zero or a one, |α|2 would give us the probability of getting a zero, and |β|2 would give us the probability of getting a one. Pretty cool, eh!?!

So, here is a question. For the qubit state |ψ in the following equation, what is the probability of getting a zero or a one when we measure it?

Well, if we said |α|2 gives us the probability of getting a zero, then the answer would look like this:

This tells us that one half or 50% of the time when we measure for a zero or a one, we will get a zero. We can do the same exact math for β and derive that the other half of the time when we measure, we will get a one. The state |ψ shown previously represents the proverbial coin being flipped into the air and landing heads for a one and tails for a zero.

Summary

In a short amount of time, we have developed enough mathematics to explain superposition and its effects on measurement. We did this by introducing Euclidean vectors and the operations of addition and scalar multiplication upon them. Putting these operations together, we were able to get a definition for a linear combination and then apply that definition to what is termed superposition. In the end, we could use all of this to predict the probability of getting a zero or one when measuring a qubit.

In the next chapter, we will introduce the concept of a matrix and use it to manipulate qubits!

History (Optional)

Euclidean vectors are named after the Greek mathematician Euclid circa 300 BC. In his book, The Elements, he puts together postulates and theories from other Greek mathematicians, including Pythagoras, that defined Euclidean geometry. The book was a required textbook for math students for over 2,000 years.

Figure 1.13 – Euclid with other Greek mathematicians in Raphael's School of Athens

Figure 1.13 – Euclid with other Greek mathematicians in Raphael's School of Athens

Answers to exercises

Exercise 1

a)

b)

c)

Exercise 2

a)

b)

Left arrow icon Right arrow icon

Key benefits

  • Build a solid mathematical foundation to get started with developing powerful quantum solutions
  • Understand linear algebra, calculus, matrices, complex numbers, vector spaces, and other concepts essential for quantum computing
  • Learn the math needed to understand how quantum algorithms function

Description

Quantum computing is an exciting subject that offers hope to solve the world’s most complex problems at a quicker pace. It is being used quite widely in different spheres of technology, including cybersecurity, finance, and many more, but its concepts, such as superposition, are often misunderstood because engineers may not know the math to understand them. This book will teach the requisite math concepts in an intuitive way and connect them to principles in quantum computing. Starting with the most basic of concepts, 2D vectors that are just line segments in space, you'll move on to tackle matrix multiplication using an instinctive method. Linearity is the major theme throughout the book and since quantum mechanics is a linear theory, you'll see how they go hand in hand. As you advance, you'll understand intrinsically what a vector is and how to transform vectors with matrices and operators. You'll also see how complex numbers make their voices heard and understand the probability behind it all. It’s all here, in writing you can understand. This is not a stuffy math book with definitions, axioms, theorems, and so on. This book meets you where you’re at and guides you to where you need to be for quantum computing. Already know some of this stuff? No problem! The book is componentized, so you can learn just the parts you want. And with tons of exercises and their answers, you'll get all the practice you need.

Who is this book for?

If you want to learn quantum computing but are unsure of the math involved, this book is for you. If you’ve taken high school math, you’ll easily understand the topics covered. And even if you haven’t, the book will give you a refresher on topics such as trigonometry, matrices, and vectors. This book will help you gain the confidence to fully understand quantum computation without losing you in the process!

What you will learn

  • Operate on vectors (qubits) with matrices (gates)
  • Define linear combinations and linear independence
  • Understand vector spaces and their basis sets
  • Rotate, reflect, and project vectors with matrices
  • Realize the connection between complex numbers and the Bloch sphere
  • Determine whether a matrix is invertible and find its eigenvalues
  • Probabilistically determine the measurement of a qubit
  • Tie it all together with bra-ket notation

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 22, 2022
Length: 252 pages
Edition : 1st
Language : English
ISBN-13 : 9781801070188
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 22, 2022
Length: 252 pages
Edition : 1st
Language : English
ISBN-13 : 9781801070188
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ 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
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ 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
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ 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 117.97
Essential Mathematics for Quantum Computing
€22.99
Practical Discrete Mathematics
€49.99
Quantum Machine Learning and Optimisation in Finance
€44.99
Total 117.97 Stars icon
Banner background image

Table of Contents

14 Chapters
Section 1: Introduction Chevron down icon Chevron up icon
Chapter 1: Superposition with Euclid Chevron down icon Chevron up icon
Chapter 2: The Matrix Chevron down icon Chevron up icon
Section 2: Elementary Linear Algebra Chevron down icon Chevron up icon
Chapter 3: Foundations Chevron down icon Chevron up icon
Chapter 4: Vector Spaces Chevron down icon Chevron up icon
Chapter 5: Using Matrices to Transform Space Chevron down icon Chevron up icon
Section 3: Adding Complexity Chevron down icon Chevron up icon
Chapter 6: Complex Numbers Chevron down icon Chevron up icon
Chapter 7: EigenStuff Chevron down icon Chevron up icon
Chapter 8: Our Space in the Universe Chevron down icon Chevron up icon
Chapter 9: Advanced Concepts Chevron down icon Chevron up icon
Section 4: Appendices 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.8
(18 Ratings)
5 star 94.4%
4 star 0%
3 star 0%
2 star 0%
1 star 5.6%
Filter icon Filter
Top Reviews

Filter reviews by




Vlad Jan 15, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Bravo, Leonard! Creating such a well-structured and breathtaking math book takes time and patience. I bet you invested a lot. This book has roughly 200 pages but teaches you starting from elementary things, such as vectors, and ending up with more advanced concepts, such as tensors or matrix decompositions. You won't find anything in this book about quantum physics or commercially available services; this is a 100% pure math book focusing on vectors/matrixes. You can enjoy it even if you know how to do addition, subtraction, multiplication, and division of real numbers only, which I hope the reader already acquired before middle school. Reading and doing all the exercises took me one and a half days. It has a few misprints (mainly incorrectly used signs), but the rest is top-quality. The only regret I have after reading is that I wasn't able to read it 20 years ago as a student.
Subscriber review Packt
Omar Al Hathaf Jul 31, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
THEODOROS ZAFEIRIDIS May 20, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
perfect
Feefo Verified review Feefo
rory woods May 19, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've been programming for decades and quantum computing was always a topic of interest. I've read about it but always felt like I was missing something. This book finally gave me the foundation I needed. It provides that "one level down" insight needed to grok the higher subject. The author makes no assumptions about your existing math skills (so-so in my case). Instead, he starts with the basics and works you up from there. Suddenly you are reading about (and understanding) linear functionals and eigenvalues. An all-around great read for anyone in the space or interested in learning more.
Amazon Verified review Amazon
Brian K Apr 25, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book provides a fast, readable introduction (or review for those with a deeper knowledge of linear algebra) to the mathematics needed for Quantum Mechanics and Quantum Computing. Nicely developed visuals help explain key concepts.There are practice exercises to help reinforce the topics being covered as well as the answers (though not worked through.)Woody includes 5 appendices on further physical ideas (bra-ket notation) and other mathematical topics (trigonometry and probability.)One drawback to this book, in my humble opinion, is a lack of connection to Quantum theory and why they are important to it.But I think this book would be an asset to someone who wants to start reading on Quantum Mechanics and Computing and needs a good companion on linear algebra.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.