Quantumic Math

Get introduced to the concept of quantumic math.

We'll cover the following...

“You take the blue pill—the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill—you stay in Wonderland, and I show you how deep the rabbit-hole goes.”

The Matrix

After this chapter, we’ll have a better understanding of the concept called the Hadamard gate.

A qubit resembles the idea of the spin of an electron. It is in a state of superposition. While the electron’s superposition consists of the states up and down, the qubit’s superposition consists of the states 0|0\rangle and 1|1\rangle.

A popular notion of superposition is that the system is in different states concurrently unless it is measured. However, when you look at the electron, we find it either up or down. When we look at the qubit, it is either 0 or 1. Another notion is that the system is truly random and not just sensitive dependent on initial conditions (see Exploring the Quantum States). But superposition does not mean and, and it does not mean or. It’s a combination of states that does not map onto classical concepts.

“This is your last chance. After this, there is no turning back.”

—The Matrix

A vector space gives the basic model of superposition. A vector space is a collection of all valid qubit state vectors along with the operations you can perform on them. We found the qubit state vector using the following equation:

ψ=α0+β1=[αβ]|\psi\rangle = \alpha|0\rangle + \beta|1\rangle = \begin{bmatrix}\alpha\\\beta\end{bmatrix}, with α2+β2=1\alpha^2 + \beta^2 = 1. In Python, the array [alpha, beta] denotes this vector.

α\alpha and β\beta are the probability amplitudes. They are not probabilities. They can be positive or negative. Their squares α2\alpha^2 ...