Maths · 8:36
Complex numbers and matrices
The foundations.
- i = √−1; complex numbers have real and imaginary parts.
- A number times its complex conjugate is real.
- Quantum computing uses exponential form e^(iθ) — changing θ rotates around a circle.
| Form | Example |
|---|---|
| Rectangular | 1 + i |
| Polar | r, θ |
| Exponential | re^(iθ) |
Do this in your own tools, step by step. Ticks are saved on this device.
i equals?
√−1.
Preferred form?
Exponential.
0:00 The first section covers all the essential mathematics, and the second section is a deeper exploration into the mechanics of quantum computers. You'll learn why quantum computers are so powerful and how they're poised to transform technology. Michael from Quantum Sorce created this course. If you were to search up on Google, "What are quantum computers?" you'll get answers in the form of analogies, like "Quantum computers use qubits that are both zero and one at the same time." When I first started learning about quantum computers, these analogies and explanations never made sense.
0:48 This course was created in order to provide a solid foundation on quantum computation without using analogies, but teaching how quantum computers actually work. Let's quickly look at the structure of this course. The first section of this course goes through the basic mathematics needed to understand the rest of the course, including an introduction to complex numbers and basic linear algebra. In the next section, we explore what a qubit is and how we can represent them mathematically. We also explore some single qubit operations and discuss some of their properties.
1:11 The third section introduces how we can represent multiple qubits mathematically and explore some operations we can perform on multiple qubits. This section ends on exploring the strange quantum phenomena of quantum entanglement and phase kickback. In the final section of this course, we use everything we've studied up until this point to analyze quantum algorithms. This section showcases why quantum computers are such revolutionary technology. Let's start with understanding imaginary and complex numbers. But before that, we need to consider the square roots of numbers.
1:59 Let's say we have the equation x squared is equal to four, which means x is equal to plus or minus two. Easy. But what if x squared is equal to negative four? Since a number squared is always greater than zero, how can x squared ever be a negative number? This is where imaginary numbers come in. If we let i be the square root of negative one, we can then write the square root of negative four as plus or minus two i.
2:21 This is an imaginary number, any number that contains a factor of the square root of negative one or i. Now we move one level up to complex numbers. All a complex number is is a number that contains a real number plus an imaginary number. A standard complex number looks like this, a plus i b, where both a and b are real numbers. A being the real part of the number and b being the imaginary part of the number.
3:07 Complex numbers may not seem very useful, but in the next lesson, we will see how we can represent complex numbers in another form, which is used to model quantum computing states. We can add and subtract complex numbers pretty easily. All we do is add or subtract the real parts and the imaginary parts. Pause the video and try adding up these complex numbers. Multiplication is pretty simple as well. But we must remember that if we get I squared, that becomes -1 since I is the square root of -1.
4:00 The complex conjugate of a complex number is when you take the complex number and flip the sign or negate the imaginary part. This is denoted by an asterisk. Here are some examples. One cool property of complex numbers is if we multiply any complex number by its complex conjugate, the result is always a real number. Try multiplying 2 + 3i with 2 - 3i and confirming this is the case. We can think of a complex number as a vector where we have the real axis on the horizontal and the imaginary axis on the vertical.
4:49 This allows us to graph our complex numbers. For example, the complex number -2 + 3i would be a vector that would end at the point -2, 3. When we represent a complex number on the number plane like this, we also uncover another property, its magnitude, which is its distance from the origin. This is denoted with vertical lines and is calculated by using Pythagoras' theorem. So we get that the magnitude of some arbitrary complex number a + ib is equal to the square root of a squared + b squared.
5:14 Pause the video and see if you can find the magnitude of 4 - 3i. This is not the only way of representing complex numbers. Instead of using real and imaginary parts as coordinates, we can represent them through their magnitude and the angle they make with the positive x-axis. Using trigonometry, we find that we can also represent complex numbers in the form r cos theta plus i sin theta, where r is the magnitude of the complex number and theta is the angle it makes with the positive x-axis.
6:06 We can find theta by using the tan function as tan of theta is equal to b over a. So, theta is arctan of b over a. This is called polar form. There is also one other form, which is r e to the power of i theta. This form is exponential form. Pause the video now and try to convert the complex number 1 + i into polar form, then into exponential form. In quantum computing, we almost exclusively use complex numbers in exponential form.
6:30 This is because the property that when we change theta, we rotate around a circle. So, multiplying two complex numbers in exponential form whose magnitude is one, graphically, we are rotating around a unit circle as the angles of the two complex numbers add together. You will see once we start studying quantum computing that this property is very useful in representing quantum states. A matrix is a 2D arrangement of numbers. In the next lesson, we will get to the applications of matrices and how they relate to quantum computing.
7:23 But in this lesson, we will quickly define some properties and operations we can do on them. We say we have an m by n matrix if the number of rows is m and the number of columns is n. So, this matrix here would be a 2 by 3 matrix. Pause the video and see if you can find out the dimensions of these matrices. If we want to add two matrices together, all we need to do is add each element of the matrices.
7:47 This is the same for subtraction. Note that we can only add and subtract matrices if the number of rows and columns is the same for both. So, we wouldn't be able to add these two matrices. Pause the video and see if you can add these matrices. We can also multiply matrices by a scalar. If we do, each element in the matrix gets multiplied by the scalar, giving us another matrix. When multiplying matrices, we have to do
Get the other 14 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.