Qubits Explained: The Building Block of Quantum Computers

what is a qubit

You keep hearing about qubits and want the plain answer to what is a qubit. It is the basic unit of quantum information: it reads 0 or 1 when measured, but before that it can sit in a superposition of both.

Qubits are the foundation of quantum computing, so this guide stays focused on the building block itself.

Item Value
Basic unit of quantum information A qubit (quantum bit)
Value read on measurement 0 or 1
Possible states before measurement State 0, state 1, or an infinite number of superpositions
Chance of each outcome Squared magnitude of each amplitude
Hadamard gate on state 0, then measure Equal probabilities for 0 and 1

These facts come from Microsoft Learn’s superposition module and IBM Quantum Learning’s bits, gates and circuits lesson. Teaching material can be revised, so check the source before you rely on the figures.

Bits versus qubits: the core difference

A classical bit holds one of two values, 0 or 1. Microsoft Learn describes a qubit as the quantum counterpart: just as a bit is the basic unit of information in classical computing, a qubit is the basic unit of information in quantum computing.

When you measure a qubit, it behaves like a bit and gives 0 or 1. The difference lies in what it can be before you look. It can be in state 0, in state 1, or in an infinite number of superpositions of both.

The same module offers a simple picture. A classical bit is a vector that always points straight up or straight down, never in any other direction, while a qubit’s vector can point anywhere on the circle. If you want the wider machine-level comparison, read our guide to quantum computing vs classical computing.

Superposition and the Bloch sphere

A qubit’s state is written as a weighted sum of state 0 and state 1. The two weights are called probability amplitudes, and in the qubit system they are complex numbers rather than the real numbers you would use for everyday odds.

IBM Quantum Learning puts the same idea in more formal terms. Here is what that means in practice:

  • The state of a quantum bit is a unit vector in a two-dimensional complex inner product space.
  • The two basis states are state 0 and state 1.
  • Any single-qubit state is a combination of those two.

The Bloch sphere is a helpful geometric representation of the superposition state of a single qubit. The operations performed during quantum computation are represented as rotations about one of its cardinal axes.

what is a qubit Paired spheres
An abstract rendering shows blue and orange spheres resting on curved platforms.

The sphere has a limit. As useful as it is, Microsoft Learn notes that it can’t be extended to systems with multiple qubits.

What happens when you measure a qubit?

Measurement is where the quantum description meets an ordinary answer. The qubit will always give 0 or 1 when you measure it, whatever physical form it takes.

The amplitudes do not give probabilities directly. Instead, the actual probabilities are calculated from the squares of the magnitudes of the probability amplitudes. Every valid quantum state must also meet the normalization condition on those amplitudes.

That is why complex numbers do not produce strange results. Complex amplitudes describe the state, and the squared magnitudes turn it into the ordinary chances of reading 0 or 1.

What do gates do to a qubit?

To turn the inputs you have into the outputs you need, you manipulate qubits with operations called gates, a name used mostly for historical reasons. For small programs, IBM Quantum Learning draws them in a circuit diagram, with inputs on the left, outputs on the right and the operations shown as symbols.

The IBM lesson, dated 19 Apr 2024, walks through a few basic gates:

  1. X gate: an operation similar to the classical NOT gate, also known as a bit flip.
  2. Hadamard (H) gate: applied to state 0, it creates a superposition where measurement gives each state with equal probabilities.
  3. Two-qubit gates: the lesson covers these alongside the entanglement state.

Longer procedures are built by chaining operations like these. For a worked example of a full algorithm, see our explainer on shor’s algorithm.

Physical forms a qubit can take

A qubit is an abstract unit, and many physical systems can play the part. Microsoft Learn gives two examples: the polarization of a photon and the spin of an electron.

Both work because photons have two distinct polarization states and electrons have two distinct spin states. Regardless of the physical nature of the qubit, the two states are labelled 0 and 1.

Frequently asked questions

Is a qubit really both 0 and 1 at once?

Show answer

Before measurement, a qubit can be in a superposition of state 0 and state 1. When you measure it, it gives 0 or 1.

Why do qubits use complex numbers?

Show answer

The amplitudes that weight state 0 and state 1 are complex numbers in the qubit system. The measurement probabilities come from the squares of their magnitudes.

Can the Bloch sphere show several qubits?

Show answer

No. It represents every possible superposition state of a single qubit, but it can’t be extended to systems with multiple qubits.

What does the Hadamard gate do?

Show answer

Applied to state 0, it creates a superposition in which measuring would give each state with equal probabilities.