Skip to content

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'

You will hear that a qubit is "0 and 1 at the same time." That phrase makes it sound undefined, a bit that has not made up its mind. It has. A qubit in superposition is one specific state, pinned down by two exact numbers - the same way the point at 3 o'clock on a clock face is one specific direction, not "up and right at the same time." There is nothing fuzzy about it. What is true is that when you measure it, you get a single 0 or 1, with odds set by those two numbers. Superposition is a definite state; the randomness only shows up at measurement.

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.

Drag the point around the circle, or slide the angle. Every point is a valid qubit: the two coordinates are alpha and beta, and staying on the circle is exactly the rule alpha squared plus beta squared equals one.
|0>|1>|+>|->
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.

Measurement probabilities: the height of each bar is that outcome's chance.

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

You might ask why we carry at all instead of storing the two probabilities directly. Because the amplitudes can be negative, or complex, and can therefore cancel when states combine - the interference that the amplitudes lesson introduced and that every quantum speedup relies on. Two bare probabilities, always non-negative, can only ever add. Keeping the vector keeps the signs, and the signs are where the power lives.

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.5
A qubit is just its two amplitudes. Here is |+> as a state vector.

Lock 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.

drop here

the column vector [1, 0]

drop here

the column vector [0, 1]

drop here

the equal superposition (|0> + |1>)/sqrt(2)

drop here

must equal 1 for a valid qubit

Primary source

Quantum Country, Quantum computing for the very curious

Andy 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

  1. 1.Matuschak & Nielsen, Quantum computing for the very curious (quantum.country/qcvc)
  2. 2.Nielsen & Chuang, Quantum Computation and Quantum Information, section 1.2

The single-qubit state vector follows Quantum Country's development[1] and the standard notation of Nielsen & Chuang section 1.2[2].