Computational basis

On this page 7

The computational basis is the standard orthonormal basis of a qubit’s state space, made of the two states |0⟩ and |1⟩, and for n qubits the 2ⁿ bit-string states such as |00⟩, |01⟩, |10⟩ and |11⟩. In quantum computing, it is the reference frame in which quantum states are written, gates are expressed as matrices and, by default, measurement results are read out as classical bits.

The computational basis connects quantum information to classical data. A quantum algorithm starts from a computational basis state, creates superposition and entanglement during the computation and returns its answer when a measurement in this basis collapses the state into a bit string.

How the computational basis is defined

For a single qubit, the computational basis consists of two orthogonal unit vectors, |0⟩ = (1, 0) and |1⟩ = (0, 1), in a two-dimensional complex Hilbert space. Any pure qubit state can be written as α|0⟩ + β|1⟩, where the complex probability amplitudes satisfy |α|² + |β|² = 1.

For multiple qubits, the basis is built from the tensor product of single-qubit basis states. Each basis vector corresponds to exactly one classical bit string, so an n-qubit register has 2ⁿ basis states and a general state needs up to 2ⁿ complex amplitudes to describe it.

The table below shows how the size of the computational basis grows with the number of qubits.

QubitsBasis statesExample basis state
12|1⟩
24|10⟩
38|101⟩
101,024|0110100101⟩
n2ⁿOne state per n-bit string
Size of the computational basis by register width

Physically, |0⟩ and |1⟩ are assigned to two distinguishable levels of the hardware, such as the ground and first excited state of a superconducting transmon or two hyperfine levels of a trapped ion. The label is a convention, and most platforms assign |0⟩ to the lower-energy state.

Measurement in the computational basis

A measurement in the computational basis returns one bit string and leaves the qubits in the matching basis state. The probability of each outcome follows the Born rule: the probability of observing |x⟩ equals the squared magnitude of its amplitude.

Most quantum hardware can only measure directly in this basis, so it is often called the Z basis after the Pauli-Z operator, whose eigenstates are |0⟩ and |1⟩. To measure in another basis, a circuit applies a basis-change rotation before the standard readout.

The following table shows how a computational basis measurement treats common single-qubit states.

State before measurementProbability of 0Probability of 1
|0⟩100%0%
|1⟩0%100%
|+⟩ = (|0⟩ + |1⟩)/√250%50%
cos(θ/2)|0⟩ + sin(θ/2)|1⟩cos²(θ/2)sin²(θ/2)
Measurement outcomes for common single-qubit states

Because a single measurement yields only one outcome, algorithms run the same circuit thousands of times, called shots, to estimate the probability distribution over basis states.

Computational basis compared with other qubit bases

The computational basis is one of infinitely many orthonormal bases for a qubit, but it is the one in which circuits are conventionally written. Other bases matter in protocols and algorithms, and they relate to the computational basis through single-qubit rotations.

BasisBasis statesAssociated operatorTypical use
Computational (Z) basis|0⟩, |1⟩Pauli-ZState preparation and readout
Hadamard (X) basis|+⟩, |−⟩Pauli-XPhase information, quantum key distribution
Circular (Y) basis|+i⟩, |−i⟩Pauli-YTomography, phase reference
Bell basisFour Bell statesJoint two-qubit operatorsTeleportation, entanglement checks
Common bases in quantum computing

Information encoded in relative phases is invisible in the computational basis. For example, |+⟩ and |−⟩ give identical 50/50 statistics in the Z basis but are perfectly distinguishable after a Hadamard gate, which is why interference-based algorithms end with transformations that move the answer into the computational basis.

Role of the computational basis in quantum algorithms

Quantum algorithms are structured around the computational basis at both ends of the circuit. Registers are initialized to |00…0⟩, classical inputs are loaded as basis states, and the final step converts amplitudes into classical bit strings through measurement.

  • Basis encoding stores classical data directly as computational basis states, one bit per qubit.
  • Oracles in Grover’s and Deutsch-Jozsa algorithms act on basis states and mark solutions with a phase.
  • The quantum Fourier transform maps computational basis states to Fourier basis states and back.
  • Error correction detects bit-flip errors in the Z basis and phase-flip errors in the X basis.

Gate matrices are also written in this basis. The CNOT gate flips the target qubit only when the control is |1⟩, which is a statement about computational basis states that then extends linearly to all superpositions.

Common misconceptions about the computational basis

The computational basis is easy to confuse with the classical bits it resembles. The table below lists frequent misunderstandings and the correct interpretation.

MisconceptionCorrection
A qubit is always secretly 0 or 1A superposition has no hidden basis value before measurement
The basis is physically specialIt is a convention tied to hardware readout
2ⁿ basis states mean 2ⁿ outputsMeasurement returns only one n-bit string per shot
Z-basis statistics capture the full statePhase information requires other bases or tomography
Misconceptions and corrections

Keeping these distinctions clear prevents the most common error in reasoning about quantum speedups, namely the assumption that exponential state space automatically yields exponentially more readable information.

In simple terms

The computational basis is the set of plain answers a quantum computer can give. For one qubit, those answers are 0 and 1. For three qubits, they are the eight patterns from 000 to 111.

During a calculation, a qubit can be in a blend of 0 and 1. When you look at it, you always get one plain answer. Think of a spinning coin that lands as heads or tails. The computational basis is the list of ways the coin can land.

A practical example

A researcher tests a two-qubit Bell state circuit on a cloud quantum processor. The circuit starts both qubits in the computational basis state |00⟩, applies a Hadamard gate to the first qubit and then a CNOT gate. Ideally, this creates an equal superposition of |00⟩ and |11⟩.

The researcher runs 4,000 shots and measures both qubits in the computational basis. The results show about 1,960 counts of 00 and 1,950 counts of 11, with roughly 90 counts of 01 and 10 caused by gate and readout errors. The strong correlation confirms entanglement in the Z basis. To verify the relative phase as well, the researcher repeats the run with Hadamard gates before readout, which measures in the X basis and completes the check.