# QC — What are Qubits in Quantum computing?

Qubits are the core component in 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) 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, the math is far more simple than reconciling the theory with intuition.

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.

Here, the up spin and the down spin states are just the basis vectors. The concept is similar to the *x*,* y* basis vectors in the law of motion in Physics.

The Dirac notation |ψ⟩ is just a short form for a matrix.

|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 short cuts 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. 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, and how nature works. 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 therefore 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 make

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 pole 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 *α* can also be 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 represent one of the two possible values, 0 or 1. A qubit represents points 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. By the principle of quantum mechanics, a composite system is modeled by a tensor product.

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⟩ with 4 complex coefficients.

For 3-qubits, we have 8.

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 a lot of 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 it 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. 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: