Concepts Beginner Free 48/53 in series 10 min read

What is a Qubit?

A plain-English explanation of qubits, what makes them different from classical bits and why that matters for computing.

What you'll learn

  • qubits
  • superposition
  • bloch sphere

Prerequisites

  • Basic Python (variables, functions, loops)
  • No quantum physics background needed

The Classical Bit

To grasp the qubit, we first need to understand the classical bit. Every piece of information in a conventional computer (whether it’s an image, a message, or a video) is stored as a sequence of bits. Each bit exists in one of two states: 0 or 1. That is all there is. A bit has no in-between value, no ambiguity, and no hidden structure. Billions of these simple switches, flipping on and off, power every app and website you use.

The Qubit

A qubit (quantum bit) is the quantum version of a bit, but it possesses a remarkable quality: it can exist in a superposition of both 0 and 1 at the same time, at least until it is measured.

This ability is not merely a statement of uncertainty. The qubit genuinely occupies both states simultaneously. Quantum algorithms exploit this property to process many possibilities concurrently. A single qubit can hold a combination of 0 and 1. Two qubits can hold four combinations simultaneously. Ten qubits can hold 1,024 combinations at once. The state space grows exponentially, which is one source of quantum computing’s potential power.

State Vector Representation

Mathematically, a qubit’s state is written as:

|ψ⟩ = α|0⟩ + β|1⟩

Here, α (alpha) and β (beta) are probability amplitudes. They are complex numbers that encode how much of each basis state the qubit contains. The |0⟩ and |1⟩ symbols (read “ket zero” and “ket one”) are the two basis states, analogous to the two values a classical bit can take.

The amplitudes must satisfy the normalisation condition:

|α|² + |β|² = 1

This ensures that the total probability of all outcomes adds up to 1. When you measure the qubit, the probability of getting 0 is |α|² and the probability of getting 1 is |β|². For example, if α = 1/√2 and β = 1/√2, then both outcomes have probability (1/√2)² = 1/2, giving a perfect 50/50 split. This is the |+⟩ state, one of the most commonly used states in quantum computing.

The amplitudes can be negative or even complex numbers. This allows for interference, a key mechanism in quantum algorithms where amplitudes of wrong answers can cancel out and amplitudes of correct answers can reinforce.

The Bloch Sphere

A qubit’s state is visualised as a point on the surface of a unit sphere called the Bloch sphere. Every valid qubit state corresponds to exactly one point on this sphere.

              |0⟩  (north pole)

        |i⟩ ──┤── |-i⟩
       /       │       \
     |+⟩ ──────┼────── |-⟩
       \       │       /

              |1⟩  (south pole)

The two poles represent the computational basis states:

  • North pole: |0⟩
  • South pole: |1⟩

The equator holds the superposition states. Four particularly important ones sit on the equator:

  • |+⟩ = (|0⟩ + |1⟩) / √2, the positive X axis, produced by the Hadamard gate
  • |-⟩ = (|0⟩ - |1⟩) / √2, the negative X axis
  • |i⟩ = (|0⟩ + i|1⟩) / √2, the positive Y axis
  • |-i⟩ = (|0⟩ - i|1⟩) / √2, the negative Y axis

Any point on the sphere can be described using two angles: θ (theta) and φ (phi).

  • θ runs from 0 at the north pole to π (180°) at the south pole. It controls the balance between |0⟩ and |1⟩. A qubit at θ = π/2 sits on the equator, in maximum superposition.
  • φ is the angle around the equator, ranging from 0 to 2π. It encodes the relative phase between the |0⟩ and |1⟩ components. Phase differences are invisible to a single measurement in the computational basis, but they matter enormously for how gates transform the qubit.

Together, θ and φ fully describe any single-qubit state. Two qubits require a much more complex representation since their joint state lives in a four-dimensional space.

Measurement and the Born Rule

When you measure a qubit, the superposition collapses immediately, forcing the qubit into a definite state of either 0 or 1. You cannot observe the superposition directly. This is the fundamental challenge of quantum computing: all the useful computation happens in the superposition, but the output you extract is a classical bit.

The probabilities governing collapse are given by the Born rule:

P(measuring 0) = |α|²
P(measuring 1) = |β|²

For the state |+⟩ = (|0⟩ + |1⟩)/√2, both α and β equal 1/√2, so each outcome has probability 1/2. For the state |0⟩, α = 1 and β = 0, so you always measure 0 with certainty.

After measurement, the qubit stays in whichever state it collapsed to. The superposition is gone. If you measure 0, the qubit is now in state |0⟩ and any further measurements will also give 0. This means measurement is irreversible, and you must design quantum algorithms so that the correct answer has a high probability before the final measurement is taken.

A well-designed quantum algorithm uses interference to boost the probability amplitude of the correct answer and suppress the amplitudes of incorrect answers, making the final measurement likely to produce a useful result.

What Makes Qubits Hard to Build: Decoherence

Building a working qubit is extremely difficult. The central problem is decoherence: the tendency of quantum superposition to collapse due to interaction with the surrounding environment.

Qubits need to maintain their quantum state long enough to perform a computation. Any stray photon, vibration, electromagnetic noise, or thermal fluctuation can cause the qubit to interact with the environment and lose its superposition. This process is called decoherence, and it destroys the quantum information.

To prevent decoherence, qubits must be isolated from the environment to an extraordinary degree. Superconducting qubits operate near absolute zero temperature (around 15 millikelvin, colder than outer space) inside heavily shielded dilution refrigerators. Trapped ion qubits sit in ultra-high vacuum chambers, isolated from air molecules and vibrations. Room-temperature quantum computers are not feasible with current physical implementations because thermal energy at room temperature (about 25 millielectronvolts) is vastly larger than the energy scales at which quantum effects operate reliably.

Decoherence is the primary reason quantum computers today have hundreds or thousands of qubits but still struggle with complex tasks: the qubits lose their quantum state before a long computation can finish. Quantum error correction can compensate, but it requires many physical qubits to encode each logical qubit, multiplying the hardware demands.

Physical Implementations

Superconducting Qubits

Superconducting qubits, used by IBM and Google, are tiny electrical circuits made from superconducting materials, typically aluminum or niobium. When cooled close to absolute zero, these materials conduct electricity with zero resistance and exhibit quantum behavior. The qubit is encoded in the energy levels of the circuit, and microwave pulses serve as gates. IBM’s quantum computers (accessible via IBM Quantum) and Google’s Sycamore processor both use superconducting qubits. The main advantage is that these chips can be manufactured using techniques similar to semiconductor fabrication. The main challenge is their very short coherence times, measured in microseconds to milliseconds, and the need for extreme cooling.

Trapped Ion Qubits

Trapped ion qubits, used by IonQ and Quantinuum, encode quantum information in the electronic energy levels of individual ions (electrically charged atoms) suspended in a vacuum by electromagnetic fields. Lasers or microwave fields act as gates. Trapped ions have significantly longer coherence times than superconducting qubits, sometimes approaching seconds, and naturally identical qubits since every ion of the same species is physically identical. The trade-off is that gate operations are slower and scaling to large numbers of qubits while maintaining precise control is an ongoing engineering challenge.

Photonic Qubits

Photonic quantum computers encode qubits in properties of individual photons, such as polarization or path. Photons have the advantage of low decoherence at room temperature (they interact weakly with the environment) and can travel long distances through fiber optic cables, making them natural candidates for quantum networking. However, making photons interact with each other to implement two-qubit gates is difficult, since photons do not naturally interact. Companies such as PsiQuantum and Xanadu are developing photonic approaches, using techniques like linear optical quantum computing and squeezed light to address these challenges.

A Code Example: Creating the |+⟩ State

The Hadamard gate is the simplest way to create a superposition. Applied to |0⟩, it produces |+⟩ = (|0⟩ + |1⟩)/√2, which gives 0 and 1 with equal probability. Here is how to verify this in Qiskit:

from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator

# Create a circuit with 1 qubit and 1 classical bit
qc = QuantumCircuit(1, 1)

# Apply Hadamard gate to put the qubit into the |+⟩ state
qc.h(0)

# Measure the qubit
qc.measure(0, 0)

# Run 1000 shots on the simulator
simulator = AerSimulator()
job = simulator.run(qc, shots=1000)
result = job.result()
counts = result.get_counts()

print(counts)
# Example output: {'0': 512, '1': 488}
# Results are always close to 50/50

Run this and you will see roughly 500 zeros and 500 ones across 1000 shots. The exact numbers vary because each shot is a random draw from the 50/50 distribution. If you remove the qc.h(0) line, you will always see {'0': 1000} because the qubit starts in |0⟩ and measuring it always returns 0.

This simple experiment demonstrates superposition directly: the Hadamard gate creates genuine randomness that has no classical analogue, and measuring the same prepared state repeatedly confirms the Born rule probabilities.

Further Reading

  • Qubit - formal definition and physical properties
  • Superposition - the principle behind qubit states
  • Bloch Sphere - interactive visualisation and angle conventions
  • Decoherence - why quantum states are fragile and how error correction helps

Was this tutorial helpful?