The quantum bit, or qubit, is a new computational primitive that addresses the limitations of classical binary logic. It serves as the foundation of quantum information. While a classical bit functions like a switch that must be either off (0) or on (1), a qubit behaves more like a directional arrow in a vector space. It has the capacity to access states that are mixtures of both 0 and 1 simultaneously.The Mathematical DefinitionIn classical computing, we represent the state of a bit, let us call it $x$, as a value in the set ${0, 1}$. There is no middle ground. If you query the bit, you receive exactly the value it holds.In quantum mechanics, we describe the state of a qubit using a column vector. We denote this state with the symbol $|\psi\rangle$ (pronounced "psi"). This specific notation, known as Dirac notation or bra-ket notation, helps us distinguish quantum vectors from standard variables.The two fundamental states of a qubit correspond to the classical 0 and 1. We call these the computational basis states:$$|0\rangle = \begin{bmatrix} 1 \ 0 \end{bmatrix}$$$$|1\rangle = \begin{bmatrix} 0 \ 1 \end{bmatrix}$$Unlike a classical bit that must be one or the other, a qubit exists as a linear combination of these two basis states. We express the general state of a qubit $|\psi\rangle$ as:$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$$In this equation, $\alpha$ (alpha) and $\beta$ (beta) are numbers that quantify how much "zero-ness" and how much "one-ness" the qubit possesses. These coefficients are probability amplitudes.Probability Amplitudes vs. ProbabilitiesA common point of confusion for beginners is the difference between the state of the qubit and the result of measuring it. The values $\alpha$ and $\beta$ are not simple percentages. They are complex numbers that describe the quantum state before anyone looks at it.When you measure a qubit, the laws of quantum mechanics dictate that the superposition collapses. You will never observe a qubit as "partially 0 and partially 1". The measurement result will always be a discrete 0 or 1.The probability of measuring a 0 is given by the square of the magnitude of $\alpha$:$$P(0) = |\alpha|^2$$Similarly, the probability of measuring a 1 is:$$P(1) = |\beta|^2$$Because the total probability of all possible outcomes must equal 1 (100%), we arrive at the normalization constraint for any valid qubit state:$$|\alpha|^2 + |\beta|^2 = 1$$This requirement means that the state vector $|\psi\rangle$ always has a length of 1.Visualizing the DistinctionTo understand the difference between classical and quantum states, consider the following comparison. The classical bit is discrete and restricted. The quantum bit occupies a continuous vector space, even though its measurement is discrete.digraph G { rankdir=LR; node [fontname="Arial", shape=circle, style=filled, color="#adb5bd", fillcolor="#f8f9fa"]; edge [color="#868e96"]; subgraph cluster_classical { label = "Classical Bit State Space"; fontname = "Arial"; style = "rounded"; color = "#dee2e6"; bgcolor = "#f8f9fa"; c0 [label="0", fillcolor="#a5d8ff", color="#228be6"]; c1 [label="1", fillcolor="#a5d8ff", color="#228be6"]; c_switch [shape=box, label="Current State", fillcolor="#ffc9c9", color="#fa5252"]; c_switch -> c0 [label="OR", style="dashed"]; c_switch -> c1 [style="dashed"]; } subgraph cluster_quantum { label = "Qubit State Space"; fontname = "Arial"; style = "rounded"; color = "#dee2e6"; bgcolor = "#f8f9fa"; q0 [label="|0⟩", fillcolor="#b197fc", color="#7950f2"]; q1 [label="|1⟩", fillcolor="#b197fc", color="#7950f2"]; psi [label="|ψ⟩", shape=doublecircle, fillcolor="#ffc9c9", color="#fa5252"]; psi -> q0 [label="α", color="#7950f2", penwidth=2]; psi -> q1 [label="β", color="#7950f2", penwidth=2]; } }Comparison of the discrete options available to a classical bit versus the continuous combination available to a qubit vector.The Simulation PerspectiveFor an AI engineer, it is helpful to think of a qubit as a data structure. In a classical simulation (like the one you will build in Python), a single qubit is represented as an array of two complex numbers $[\alpha, \beta]$.If we have a qubit in the state $|0\rangle$, the simulator stores:[1.0 + 0j, 0.0 + 0j]If we apply an operation that puts the qubit into an equal superposition (a 50/50 chance of measuring 0 or 1), the simulator updates the array to:[0.707 + 0j, 0.707 + 0j]Here, $0.707$ is approximately $\frac{1}{\sqrt{2}}$. When we square this value ($(\frac{1}{\sqrt{2}})^2$), we get $0.5$, or 50% probability.This structure allows quantum computers to manipulate amounts of data using the interference of these amplitudes. While a classical probability distribution must always be positive, amplitudes can be positive, negative, or complex. This feature enables "constructive" and "destructive" interference, allowing correct answers to be amplified and wrong answers to be cancelled out during a computation.Summary of Qubit PropertiesSuperposition: A qubit exists in a linear combination of $|0\rangle$ and $|1\rangle$ until measured.Measurement Collapse: Measuring a qubit forces it into one of the basis states. You cannot recover the original $\alpha$ and $\beta$ values from a single measurement.Normalization: The sum of the probabilities must always equal 1.Vector Representation: The state is a vector in a complex vector space, distinct from the discrete logic levels of classical bits.In the next section, we will formalize the notation used to describe these vectors and explore how we perform mathematical operations on them.