# QC — What are Qubits in Quantum computing?

Qubits are the core component of quantum computing. With superposition, we can encode an exponential amount of information that can scale a solution better than classical computing. In Part 1, we take a look at the motivation for quantum computing and study some quantum mechanics principles. In part 2 here, we go into the core of quantum computing and demystify the concept of qubits.

# Superposition

The concept of superposition is important because this is what **qubits** (quantum bits) are about! So let’s start developing a mathematical model for the spin. Don’t get scared, it is pretty simple. The pace will be slower in this section so you can take time to adjust to the notation in quantum mechanics. It builds the foundation of something pretty fun. Also, its math is far more simple than reconciling the theory with intuition.

When we measure the spin of a particle, it is either in the state of “up” or “down”. But from the quantum world perspective, the spin is in a superposition. The mathematical description of a spin indicates the likelihood of being “up” or “down” when we measure it. Such kind of uncertainty happens in reality until we measure it. This is completely counter-intuitive but that is how the world behaves.

Therefore, when we say the **spin** of a particle is in a **superposition **of states, it simply means it is in a linear combination of up spin and down spin. Here is the equation in the Dirac notation.

The coefficient *α* is called the amplitude. It is related to the chance of being “up” or “down” when measured.

Here, the up spin and the down spin states are just the basis vectors (being 0 “up” or 1 “down”). The concept is similar to the *x*,* y* basis vectors in the law of motion in Physics.

The Dirac notation |ψ⟩ below illustrates the superposition in a matrix form.

|0⟩ and |1⟩ are the two orthogonal basis vectors that are encoded as:

It also has a dual form written as:

The math is simply matrix multiplication and linear algebra. We just shorten it with Dirac notation. Once you get familiar with it, we can take a lot of shortcuts to manipulate them easily. For example, the inner product of two orthogonal basis vectors ⟨0|1⟩ is the multiplication of the 1 × 2 and 2 × 1 matrix. It is always zero. Intuitively, |0⟩ and |1⟩ are mutually exclusive when measured. The inner product of any superposition is one, i.e. the total probability = 1.

Here are some more superposition states and the corresponding matrix.

If you want more details on the notation again, here is a summary for your later reference. But let’s get into something important.

Between measurements, we can manipulate the superpositions. But when we measure the up spin, the superposition collapses to one of the possible states, i.e. either |0⟩ or |1⟩. This is the core principle of quantum dynamics. Let’s say a particle is in:

The chance that it collapses to a particular state equals the square of the corresponding amplitude. It turns out this method models the experimental results very well. In our example, the chance of measuring the particle in up spin is 1/2.

There is one obvious rule we need to follow. The probabilities of measuring all possible states add up to 1 (⟨ψ|ψ⟩=1). To enforce this, we have

We can visualize the superposition as a point lying on the surface of a unit sphere. The up and down spin is just the north and south poles of the sphere respectively. So the red dot below is another example of a superposition state. When it is measured, nature forces it to take a side, either up or down.

But I am not 100% honest with you. To really have the superposition represented as the Bloch sphere above, the amplitude *α* is a complex number like:

Here are the values of the superpositions in the six corners.

To calculate the probability, we compute the square of the norm, i.e. multiply the amplitude with its complex conjugate. (The complex conjugate of 3+4i is 3–4i)

Let’s have a quick recap on “bits v.s. qubits”. A bit represents one of the two possible values, 0 or 1. A qubit represents any point on the surface of the unit sphere. For round 1, a qubit wins over a bit on how many states that it can represent.

In addition, we can combine quantum states in forming a composite system, for example, the spins of two particles. In classical physics, it is 00, 11, 01, or 10. By the principle of quantum mechanics, a composite system is modeled by a tensor product which is far more complex.

where

For example, this is a composite system with 2 down spins and 1 up spin:

Soon, we will see why this is so powerful — something that classical computing cannot deliver. Here is another 3-qubits example:

Below is the general equations describing a 2-qubit system. It composes of the spins of 2 particles.

So the new quantum state has 4 computational basis vectors, namely |00⟩, |01⟩, |10⟩, and |11⟩.

For 3-qubits, we have 8 coefficients with each being a complex number (rather than just 0 or 1 in classical physics).

The system grows exponentially. 64-Qubits has

basis vectors. The biggest US lottery jackpot was 1.6 billion dollars. Two to the power of 64 is about winning the biggest lottery 30 billion times. With 64-qubits, we can encode and manipulate data using these billion-billion coefficients (dimensions). Qubits win round two.

Increasing the qubits linearly, we expand the information capacity exponentially.

But, there is a big catch! We can manipulate information in a very high dimensional space but we cannot read those coefficients directly. When all operations are completed, the only way to “read” the qubits is to measure them which returns one of the states only (not the coefficient).

When qubits are measured, the capacity is no different from bits. It’s extremely tricky to design algorithms under this constraint. In addition, how can we load an exponential number of coefficients into a superposition state? These constraints restrict what type of algorithms will see performance breakthroughs in quantum computing. We have a turbocharged concept but the way to do things are awkward. We will come back to this later.

# Next

Now, we understand the Qubits, the equivalent of bits in the classical computer but far more powerful. In a classical computer, we have +, -, ×, ÷ operators to manipulate bits. Quantum computers have none of them. So how do we manipulate qubits? This will be answered in the following article.

Here is the index for the whole series: