Introduction
Quantum computing is a fascinating and rapidly evolving field that promises to revolutionize many aspects of science and technology. But what are the basic building blocks of quantum computing? How do they differ from the ones we use in classical computing? In this article, I will explain the concept of a qubit, the quantum counterpart of a bit, and how it enables quantum superposition and entanglement.
Quantum computing state management
In classical computing, the most basic unit of information is a bit. A bit can hold two values: 0 or 1, with equal probabilities. All other high-level information types like movies, images or documents are persisted as a sequence of bits.
In the quantum computing world, things are different. Qubit is the basic unit of quantum information. It is also a two-state structure that can hold values of 0 or 1. However, a qubit might be put in a superposition. It can hold both of these values simultaneously with certain probabilities. These probabilities must sum up to 1. This is called superposition. Only once the value is observed, the probability wave is collapsed and a concrete value of 0 or 1 is determined. It is therefore vital that the programmer pays attention if his operations run on collapsed (measured) or not collapsed qubits. If qubits are measured, then the operations are no different than operations in a classical programming language, e.g.. C#. In that case, the output is fully predictable. However, if at least one qubit is in the superposition, the output will not be deterministic, but probabilistic. More on that difference in my next articles.
You might have the feeling that we are discussing a purely theoretical effect that exists only in scientists' minds. But nature actually offers us good examples of superposition. The spin of the electron. Polarization of photons (vertical and horizontal). These might offer some ideas on how to build a quantum computer.
Keep in mind however that even though a qubit might be put into a superposition, we are still in a binary computing world. After measurement, the qubit will always return either a 0 or 1 value. This is different from ternary computers. They use trits instead of bits as the most basic information unit. Trits can store any of 0, 1 or 2 as a value.
An interesting idea is the join both of these concepts together. They would use qutrits (ternary qubits) that can be in a superposition of three mutually orthogonal quantum states (0, 1 or 2). This is however beyond the scope of this article series. To my knowledge, no real ternary quantum computers have been developed as of 2023.
Physical challenges and limitations of qubits
One of the major challenges of qubits is that they are very sensitive to noise and decoherence. Noise is any unwanted disturbance that affects the quantum state of a qubit, such as thermal fluctuations, electromagnetic interference, or measurement errors. Decoherence is the process by which a qubit loses its quantum properties and becomes a classical bit, due to its interaction with the environment. These effects reduce the fidelity and coherence time of quantum states, which are measures of how well the qubits preserve their intended information. To overcome these challenges, quantum error correction and fault-tolerance techniques are developed, which use extra qubits and quantum gates to detect and correct errors, and to protect the logical qubits from noise and decoherence. These techniques are essential for achieving scalable and reliable quantum computing.
A bit of math
The measured state of qubits is usually denoted as a matrix. For the zero state:
$$\begin{bmatrix}1 \ 0\end{bmatrix}$$
And for the one state:
$$\begin{bmatrix}0 \ 1\end{bmatrix}$$
Both of these are often shortened using the Ket notation:
$$\begin{bmatrix}1 \ 0\end{bmatrix} = \ket {0}$$
$$\begin{bmatrix}0 \ 1\end{bmatrix} = \ket{1}$$
These denote only discrete values, however. So they only apply when the state of the qubit is observed and measured. Until this happens, the qubit is in the superposition. It might keep both of these two values with certain probabilities making a linear combination:
$$\ket{\psi}={\alpha}\ket{0}+\beta\ket{1}$$
Because both these probabilities are in fact probability amplitudes, they are both complex numbers. They always satisfy the condition (Born rule):
$$|\alpha|^2+|\beta|^2=1$$
As an example, let's consider a qubit that has an equal probability of collapsing into 0 and 1 states. In that case:
$$\begin{bmatrix}\frac{1}{\sqrt{2}}\frac{1}{\sqrt{2}}\end{bmatrix} =\frac{1}{\sqrt{2}}\ket{0}+\frac{1}{\sqrt{2}}\ket{1}$$
because:
$$|\frac{1}{\sqrt{2}}|^2 + |\frac{1}{\sqrt{2}}|^2 = 1$$
Multiple qubits
The above formulas involved just one qubit. In case two qubits are used, the final measured value, just like in the case of standard bits, is one of the following:
$$\ket{00}, \ket{01}, \ket{10}, \ket{11}$$
or to be more specific, the state of two qubits system is a linear combination of:
$$\ket{\psi}=\alpha\ket{00}+\beta\ket{01}+\gamma\ket{10}+\delta\ket{11}$$
which can be put in the form of a matrix:
$$\begin{bmatrix}\alpha\beta\gamma\delta\end{bmatrix}$$
in which case they all need to satisfy a condition:
$$|\alpha|^2+|\beta|^2+|\gamma|^2+|\delta|^2=1$$
Similarly, the state of any N-qubits system state might be drafted.
Conclusion
Qubits are the fundamental units of quantum information that enable quantum computing. By exploiting the quantum phenomena of superposition and entanglement, qubits can perform parallel computations and encode more information than classical bits. Qubits can be realized using various physical systems, each with its own trade-offs and challenges. Qubits can be manipulated by quantum gates, measured by quantum detectors, and used to implement quantum algorithms and applications.