# Complex Numbers for Quantum Computing

## Introduction

Complex numbers are one of the mathematical foundations of quantum computing.

At first, they can seem like an abstract mathematical concept, but they become much more meaningful when we see how they are used to represent quantum states, probability amplitudes, and qubits.

In this guide, we will build the understanding step by step — starting with the basics of complex numbers and gradually connecting them to quantum computing.

* * *

## 1\. What Are Complex Numbers?

A complex number is written in the form

$$z = a + bi$$

where:

*   $a$ is the real part
    
*   $b$ is the imaginary part
    
*   $i$ is the imaginary unit
    

The imaginary unit is defined as

$$i^2 = -1$$

For example,

$$z = 3 + 4i$$

has a real part of $3$ and an imaginary part of $4$.

Complex numbers allow us to work with mathematical quantities that cannot be represented using real numbers alone.

* * *

## 2\. Arithmetic with Complex Numbers

Complex numbers can be added, subtracted, multiplied, and divided just like real numbers.

### Addition

$$(a + bi) + (c + di) = (a + c) + (b + d)i$$

### Subtraction

$$(a + bi) - (c + di) = (a - c) + (b - d)i$$

### Multiplication

$$(a + bi)(c + di)$$

Expanding:

$$= ac + adi + bci + bd i^2$$

Since $i^2 = -1$,

$$= (ac - bd) + (ad + bc)i$$

### Division

To divide complex numbers, we multiply the numerator and denominator by the complex conjugate of the denominator.

$$\frac{a + bi}{c + di}$$

The complex conjugate of $c + di$ is

$$c - di$$

Therefore,

$$\frac{a + bi}{c + di} = \frac{(a + bi)(c - di)}{(c + di)(c - di)}$$

This converts the denominator into a real number.

* * *

## 3\. Complex Conjugate

The complex conjugate of

$$z = a + bi$$

is

$$z^* = a - bi$$

For example,

$$(3 + 4i)^* = 3 - 4i$$

The conjugate is particularly important in quantum mechanics because it is used when calculating probabilities and inner products.

One important relationship is

$$zz^* = |z|^2$$

* * *

## 4\. Modulus of a Complex Number

The modulus represents the magnitude of a complex number.

For

$$z = a + bi$$

the modulus is

$$|z| = \sqrt{a^2 + b^2}$$

For example,

$$z = 3 + 4i$$

gives

$$|z| = \sqrt{3^2 + 4^2} = 5$$

The modulus becomes especially important in quantum computing because the square of the magnitude of a probability amplitude gives a probability.

* * *

## 5\. Polar and Exponential Forms

A complex number can also be represented using its magnitude and phase.

The polar form is

$$z = r(\cos\theta + i\sin\theta)$$

Using Euler’s formula,

$$e^{i\theta} = \cos\theta + i\sin\theta$$

we can write

$$z = re^{i\theta}$$

where:

*   $r$ is the magnitude
    
*   $\\theta$ is the phase
    

This representation becomes extremely useful when studying quantum states and quantum gates.

* * *

## 6\. Complex Numbers in Quantum Computing

Quantum computing uses complex numbers to describe quantum states.

A single qubit can be represented as

$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$$

where $\\alpha$ and $\\beta$ are complex numbers called **probability amplitudes**.

The quantum state must satisfy the normalization condition

$$|\alpha|^2 + |\beta|^2 = 1$$

This means that the probabilities of measuring the qubit as $0$ or $1$ must add up to $1$.

The probability of measuring $0$ is

$$P(0) = |\alpha|^2$$

and the probability of measuring $1$ is

$$P(1) = |\beta|^2$$

### 6.1 Probability Amplitudes

Unlike classical probabilities, quantum amplitudes can be complex.

For example,

$$\alpha = \frac{1}{\sqrt{2}}$$

and

$$\beta = \frac{i}{\sqrt{2}}$$

give the quantum state

$$|\psi\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{i}{\sqrt{2}}|1\rangle$$

The probabilities are

$$P(0) = \left|\frac{1}{\sqrt{2}}\right|^2 = \frac{1}{2}$$

and

$$P(1) = \left|\frac{i}{\sqrt{2}}\right|^2 = \frac{1}{2}$$

The complex phase does not directly change these individual probabilities, but it becomes important when quantum states interfere with one another.

### 6.2 Phase

Consider the two states

$$|\psi_1\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle$$

and

$$|\psi_2\rangle = \frac{1}{\sqrt{2}}|0\rangle - \frac{1}{\sqrt{2}}|1\rangle$$

They have the same measurement probabilities in the computational basis.

However, their relative phases are different.

This difference can affect the result of later quantum operations.

This is one of the reasons complex numbers are so important in quantum computing.

### 6.3 Qubits and the Bloch Sphere

A single qubit can also be represented geometrically using the Bloch sphere.

A general pure qubit state can be written as

$$|\psi\rangle = \cos\frac{\theta}{2}|0\rangle + e^{i\phi}\sin\frac{\theta}{2}|1\rangle$$

where:

*   $\\theta$ determines the position from the north to south direction
    
*   $\\phi$ represents the relative phase
    

The Bloch sphere provides an intuitive way to visualize the state of a single qubit.

### 6.4 Why Complex Numbers Matter

Complex numbers are not simply an optional mathematical trick in quantum computing.

They are deeply connected to:

*   quantum states
    
*   probability amplitudes
    
*   phase
    
*   interference
    
*   quantum gates
    
*   unitary transformations
    
*   measurement
    
*   quantum algorithms
    

Understanding complex numbers therefore provides a strong mathematical foundation for learning quantum computing.

* * *

## Conclusion

Complex numbers provide the mathematical language needed to describe many aspects of quantum computing.

Starting from

$$z = a + bi$$

we can progress through complex conjugates, modulus, polar form, phase, probability amplitudes, and finally qubits.

The key connection is that quantum states use complex amplitudes, and the magnitude squared of those amplitudes determines measurement probabilities.

Once this connection becomes clear, many concepts in quantum computing become easier to understand.

This is only one part of the mathematical foundation behind quantum computing. Linear algebra, vector spaces, matrices, eigenvalues, probability, and unitary transformations are equally important areas to explore.

* * *

## Download the Complete PDF

Prefer reading this guide offline or keeping a copy for later?

I’ve also prepared the complete *Complex Numbers for Quantum Computing* guide as a PDF.

👉 [**Download the Complete PDF**] https://drive.google.com/file/d/16gH4wsTxhmrt16KurZnJWSzFDM506nqc/view

The PDF contains the complete guide and can be used as an offline reference while learning quantum computing.

* * *

The more comfortable you become with the mathematics, the easier it becomes to understand what is happening underneath quantum algorithms.
