Reader small image

You're reading from  Dancing with Qubits - Second Edition

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781837636754
Edition2nd Edition
Right arrow
Author (1)
Robert S. Sutor
Robert S. Sutor
author image
Robert S. Sutor

Robert S. Sutor has been a technical leader and executive in the IT industry for over 40 years. More than two decades of that were spent in IBM Research in Yorktown Heights, New York USA. During his time there, he worked on and led efforts in symbolic mathematical computation, mathematical programming languages, optimization, AI, blockchain, and quantum computing. He is the author of Dancing with Qubits: How quantum computing works and how it can change the world and Dancing with Python: Learn Python software development from scratch and get started with quantum computing, also with Packt. He is the published co-author of several research papers and the book Axiom: The Scientific Computation System with the late Richard D. Jenks. Sutor was an IBM executive on the software side of the business in areas including Java web application servers, emerging industry standards, software on Linux, mobile, and open source. He was the Vice President of Corporate Development and, later, Chief Quantum Advocate, at Infleqtion, a quantum computing and quantum sensing company based in Boulder, Colorado USA. He is currently an Adjunct Professor in the Department of Computer Science and Engineering at the University at Buffalo, New York, USA. He is a theoretical mathematician by training, has a Ph.D. from Princeton University, and an undergraduate degree from Harvard College. He started coding when he was 15 and has used most of the programming languages that have come along.
Read more about Robert S. Sutor

Right arrow

Planes and Circles and Spheres, Oh My

No employment can be managed without arithmetic, no mechanical invention without geometry.

Benjamin Franklin

In the last chapter, we focused on the algebra of numbers and collections of objects that behave like numbers. We turn our attention to geometry and look at two and three dimensions. When we start working with qubits in Chapter 7, “One Qubit,” we represent a single qubit as a sphere in three dimensions. Therefore, it’s necessary to get comfortable with the geometric side of the mathematics before we tackle the quantum computing aspect.

Topics covered in this chapter

  1. 4.1. Functions
  2. 4.2. The real plane
    1. 4.2.1. Moving to two dimensions
    2. 4.2.2. Distance and length
    3. 4.2.3. Geometric figures in the real plane
    4. 4.2.4. Exponentials and logarithms
  3. 4.3. Trigonometry
    1. 4.3.1. The fundamental functions
    2. 4.3.2. The inverse functions
    3. 4.3.3. Additional identities
  4. 4.4. From Cartesian to polar coordinations
  5. 4.5. The complex “plane”
    1. 4.5.1. Conjugation
    2. 4.5.2. Polar coordinates
    3. 4.5.3. Euler’s formula
  6. 4.6. Real three dimensions
  7. 4.7. Summary

4.1 Functions

A function is one of the concepts in math that sounds pretty abstract but is straightforward once you get experience with it. Thought of in terms of numbers, a function takes a value and returns one and only one value. function

For example, for any real number, we can square it. That process is a function from R to R. For any nonnegative real number, if we take the positive square root of it, we get another function. We would not have a function if we were to say we got both the positive and negative square roots.

We use the notation f (x) for a function, meaning we start with some value x, do something to it indicated by the definition of f, and the result is f (x). The f can be any letter or word, but we use f because the word “function” starts with it, and we are not being especially creative. It’s common to see g and h and Greek letters such as γ, but we can use anything that starts with a letter.

...

4.2 The real plane

When we were building up the structure of the integers, we showed the traditional number line R2.

Displayed math

with the negative integers to the left of 0 and the positive ones to the right. Really, though, this was just part of the real number line:

Displayed math

The line is one-dimensional in that we need only one value, or coordinate, to locate a point uniquely on the line. For a real number x, we represent the point on the line by (x). For example, the point (–2.6) is between the markings –3 and –2. We use or omit the parentheses when it is clear from the context whether we are referring to the point or the number that gives its relative position from 0.

Displayed math

I drop the decimal points on the labels now that it is clear we have real numbers.

4.2.1 Moving to two dimensions

Suppose the number line sits in two dimensions so that we extend upwards and downwards:

Displayed math

Since we...

4.3 Trigonometry

When we discuss single qubits and what we can do with them in Chapter 7, “One Qubit,” we will see that many of the operations we perform are rotations, and for these, we must know how to manipulate angles. The trigonometric functions like sine and cosine are foundational tools for working with angles, and this section reviews their properties and identities. trigonometry

The Greek word trígōnon means “triangle,” and metron means “measure.”

4.3.1 The fundamental functions

Many people have heard that a circle has 360 degrees, also written 360. Why 360? Looking around the web, you find stories about ancient Mesopotamians, Egyptians, and base 60 number systems. Whatever the reason, 360 is a convenient number because it is divisible by so many other numbers, such as 2, 3, 4, 5, 6, 8, 10, 12, 15, and so on. That is, it’s easy to work with portions...

4.4 From Cartesian to polar coordinates

In Cartesian coordinates, we need two numbers to specify a point. If we restrict ourselves to the unit circle, each point is uniquely determined by one number, the angle φ from the positive x-axis given in radians such that 0 ≤ φ < 2π. We lost the need for a second number by insisting that the point has distance 1 from the origin.

More generally, let P = (a, b) be a nonzero point (that is, a point that is not the origin) in R2. Let r = √(a2 + b2) be the distance from P to the origin. The point

Displayed math

is on the unit circle. There is a unique angle φ 0 ≤ φ < 2π that corresponds to Q. With r, we can uniquely identify

Displayed math
 Figure 4.22: Polar and Cartesian coordinates

(r, φ) are called the polar coordinates of P. You may sometimes see the Greek letter ρ (rho) used instead of r. ρ`italic polar coordinates...

4.5 The complex “plane”

In section 3.9, we discussed the algebraic properties of C, the complex numbers. We return to them again here to look at their geometry. For any point (a, b) in the real plane, consider the corresponding complex number a + bi.

In the graph of the complex numbers, the horizontal axis is the real part of the complex variable z, and the vertical axis is the imaginary part. These replace the x and y axes, respectively. complex number complex number$geometry number$complex C`bold plane$complex complex$plane

 Figure 4.23: Values in the complex plane

The plot in Figure 4.23 shows several complex values. That is not a complex plane despite appearances and some authors’ terminology. A plane has two dimensions. We visualized C, which is one-dimensional, in the two-dimensional real plane. We return to these issues about dimensions with respect to a field in section 5.2 when we look at vector...

4.6 Real three dimensions

When plotting in three dimensions, we need either three Cartesian coordinates (x0, y0, z0) or a magnitude r and two angles φ and θ, as shown in Figure 4.26. coordinates$Cartesian R3

 Figure 4.26: Polar coordinates in three dimensions

The magnitude is

Displayed math

φ is the angle from the positive x-axis to the dotted line from (0, 0) to the projection (x0, y0) of P into the xy-plane.

θ is the angle from the positive z-axis to the line segment 0P.

That’s a lot to absorb, but it builds up systematically from what we saw in R2. When r = 1, we get the unit sphere in R3. It’s the set of all points (x0, y0, z0) in R3 where x02 + y02 + z02 = 1. unit$sphere unit$ball

The unit ball is the set of all points where x02 + y02 + z02 ≤ 1.

 Figure 4.27: The unit sphere

We frequently return to the graphic...

4.7 Summary

After handling algebra in Chapter 3, we tackled geometry here. The concept of “function” is core to most of mathematics and its application areas, such as physics. Functions allow us to connect one or more inputs with useful output. Plotting functions is an excellent way to visualize their behavior.

Two- and three-dimensional spaces are now familiar, and we learned and reviewed tools to allow us to use them effectively. Trigonometry demonstrates beautiful connections between algebra and geometry and falls out naturally from relationships such as the Pythagorean theorem.

The complex “plane” is like the real plane R2, but the algebra and geometry give more structure than points alone can provide. Euler’s formula nicely ties together complex numbers and trigonometry in an easy-to-use notation that is the basis for how we define many quantum operations in Chapter 7, “One Qubit,” and Chapter 8, “Two...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Dancing with Qubits - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781837636754
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.
undefined
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 €14.99/month. Cancel anytime

Author (1)

author image
Robert S. Sutor

Robert S. Sutor has been a technical leader and executive in the IT industry for over 40 years. More than two decades of that were spent in IBM Research in Yorktown Heights, New York USA. During his time there, he worked on and led efforts in symbolic mathematical computation, mathematical programming languages, optimization, AI, blockchain, and quantum computing. He is the author of Dancing with Qubits: How quantum computing works and how it can change the world and Dancing with Python: Learn Python software development from scratch and get started with quantum computing, also with Packt. He is the published co-author of several research papers and the book Axiom: The Scientific Computation System with the late Richard D. Jenks. Sutor was an IBM executive on the software side of the business in areas including Java web application servers, emerging industry standards, software on Linux, mobile, and open source. He was the Vice President of Corporate Development and, later, Chief Quantum Advocate, at Infleqtion, a quantum computing and quantum sensing company based in Boulder, Colorado USA. He is currently an Adjunct Professor in the Department of Computer Science and Engineering at the University at Buffalo, New York, USA. He is a theoretical mathematician by training, has a Ph.D. from Princeton University, and an undergraduate degree from Harvard College. He started coding when he was 15 and has used most of the programming languages that have come along.
Read more about Robert S. Sutor