The Qubit
The qubit and its state vector
A unit vector: alpha|0> plus beta|1>
A classical bit is a single answer to a single yes-or-no question: it is a 0 or a 1, and a variable in your program holds exactly one of them. A qubit keeps that same question but stores a richer answer - a pair of numbers that says how much of the state leans toward 0 and how much toward 1. This lesson is the whole generalization in one object: the bit becomes a vector.
The myth to drop first: '0 and 1 at the same time'
Play first: every point on the circle is a qubit
Before any equation, get the shape of it in your hands. Below, a qubit is a point you can drag. The two coordinates are the two numbers, called and . Drag all the way around and notice you can never leave the circle: that constraint is not a rule we are imposing on the widget, it is what makes the state a valid qubit. Four points snap to names you will see everywhere.
- alpha
- 0.866
- beta
- 0.5
- P(0)
- 0.75
- P(1)
- 0.25
alpha squared plus beta squared = 1. Any point on the circle keeps this at 1.
Two things to take from playing. First, the state is always one point - never a smear. Second, the point that sits exactly between and , the one labelled , is the honest picture of "equal superposition": both probabilities are one half. It is a real, definite state you dragged to on purpose.
The state vector, written down
Now the formalism, which only names what you already moved. Start with the two classical answers and promote them to vectors - this part is a definition, a choice of bookkeeping:
The angle-bracket wrapper is just notation for "a state vector called this," read aloud as . A general one-qubit state is any weighted combination of those two basis vectors:
The numbers and are the . They are what the previous lessons built up: not probabilities themselves, but the signed, and in general complex, numbers whose squared magnitudes are the probabilities. That last clause is the one rule that is not a free choice. Measuring must yield 0 or 1, and the two chances have to add to certainty, so:
This is , and it is derived, not decreed: it is nothing more than "the probabilities sum to one" rewritten in amplitudes. For the real-valued qubit you dragged, is just , and the equation is the unit circle. That is why the point could never leave it. The full qubit allows complex amplitudes, which lifts the circle into a sphere - the subject of the Bloch sphere two lessons from now - but the constraint is the same: length one.
Why a vector, and not just two probabilities
The named states are just specific coordinate pairs. and its partner are the two equal superpositions, distinguished by a sign:
The is exactly the number that makes : normalization, doing its one job. Both give one-half probability for each outcome, yet they are different states, and the difference is the minus sign. Nothing observable separates them until you measure in the right basis, but the sign is real, and the phase lesson makes it do work.
If treating a state as a vector in a two-dimensional space and combining basis vectors with coefficients feels familiar, it should: it is exactly the vectors and vector spaces machinery, with and as the two basis directions. A qubit is a unit vector in that space; that is the entire content of this lesson.
import numpy as np
# Basis states as column vectors.
ket0 = np.array([1, 0])
ket1 = np.array([0, 1])
# |+> = equal superposition, amplitudes 1/sqrt(2) each.
plus = (ket0 + ket1) / np.sqrt(2) # array([0.707, 0.707])
# Normalization: |alpha|^2 + |beta|^2 must be 1.
total = np.abs(plus[0])**2 + np.abs(plus[1])**2 # 1.0
# Measurement probabilities are the squared magnitudes.
p0 = np.abs(plus[0])**2 # 0.5
p1 = np.abs(plus[1])**2 # 0.5Lock it in
- A qubit is a unit vector alpha|0> + beta|1>; the bit is the special case where one amplitude is 1 and the other is 0.
- |0> = [1, 0] and |1> = [0, 1] are a definition; normalization |alpha|^2 + |beta|^2 = 1 is derived from "probabilities sum to 1."
- Superposition is one definite state, not an undecided bit; the randomness appears only when you measure.
- |+> and |-> are the two equal superpositions, 50/50 each, separated by a sign that measurement in the right basis can reveal.
Check yourself
A qubit's amplitudes are alpha and beta. Which condition must always hold?
The state |+> = (|0> + |1>)/sqrt(2) is measured. What are the outcome probabilities?
Write the general one-qubit state and its constraint, and give |0> and |1> as column vectors.
The core object of the whole subject. Try to state it, then check.
Match each object to what it is.
the column vector [1, 0]
the column vector [0, 1]
the equal superposition (|0> + |1>)/sqrt(2)
must equal 1 for a valid qubit
Primary source
Quantum Country, Quantum computing for the very curiousAndy Matuschak and Michael Nielsen build the qubit from the ground up with spaced-repetition prompts baked in. Their treatment of the state vector and of why superposition is not "both at once" is the clearest first pass anywhere; read the opening sections alongside this lesson.
Sources
The single-qubit state vector follows Quantum Country's development[1] and the standard notation of Nielsen & Chuang section 1.2[2].