What Is a Qubit?
A qubit (quantum bit) is the fundamental unit of quantum information. Unlike a classical bit that can only be 0 or 1, a qubit can exist in a superposition of both states simultaneously.
Mathematically, a qubit state is represented as a vector in a two-dimensional complex Hilbert space:
where and are complex probability amplitudes satisfying the normalization condition:
The states and form the computational basis:
Dirac (Bra-Ket) Notation
Paul Dirac introduced a compact notation for quantum states:
- Ket: denotes a column vector (state vector)
- Bra: denotes the conjugate transpose (row vector)
- Inner product: gives a complex scalar
- Outer product: gives an operator
The completeness relation for a single qubit is:
This identity operator ensures probability conservation during measurement.
Example: Bell State
The Bell state is written as:
The Bloch Sphere
Every pure qubit state can be visualized on the Bloch sphere. Using spherical coordinates , a general qubit is:
Key points on the Bloch sphere:
| Coordinates | State | Description |
|---|---|---|
| theta=0 | 0rangle | |
| theta=pi | 1rangle | |
| theta=pi/2, phi=0 | frac1sqrt2( | 0rangle+ |
| theta=pi/2, phi=pi | frac1sqrt2( | 0rangle- |
Any single-qubit gate corresponds to a rotation on the Bloch sphere.
Superposition
Superposition is the ability of a qubit to be in multiple states at once. When we apply a Hadamard gate to :
The state is an equal superposition of and . This is not a classical mixture β it is a fundamentally quantum coherence that enables quantum parallelism.
Superposition vs Classical Randomness
A key distinction: superposition involves interference between amplitudes, while classical randomness has no phase relationships. This interference is what powers quantum algorithms.
Measurement
Measurement collapses a qubit state to one of the basis states with probabilities given by the Born rule:
After measuring , the state becomes:
The expectation value of an observable is:
Quantum State Tomography
To fully reconstruct an unknown qubit state, we perform quantum state tomography by measuring in multiple bases. For a single qubit, we need measurements in the X, Y, and Z bases to reconstruct the density matrix:
where is the Bloch vector and are the Pauli matrices.
Python: Simulating a Qubit
import numpy as np
# Define computational basis
KET_0 = np.array([1, 0], dtype=complex)
KET_1 = np.array([0, 1], dtype=complex)
# Hadamard gate
H = (1 / np.sqrt(2)) * np.array([[1, 1],
[1, -1]], dtype=complex)
# Apply H to |0>
psi = H @ KET_0
print(f"State after Hadamard: {psi}")
# Output: [0.707+0.j 0.707+0.j]
# Probabilities
probs = np.abs(psi) ** 2
print(f"P(|0>) = {probs[0]:.4f}, P(|1>) = {probs[1]:.4f}")
This demonstrates how a deterministic unitary operation creates a superposition with equal probabilities of measuring or .