Student field guide · algebra → geometry → quantum physics

Quaternions in the quantum world.

Quaternions are four-component numbers that make rotations composable and elegant. Their most useful connection to ordinary quantum computing is the exact bridge between unit quaternions, spin, the Bloch sphere, Pauli matrices, and single-qubit gates.

Precision checkpoint: standard quantum computers use complex amplitudes, not quaternion-valued amplitudes. Quaternions enter ordinary quantum computing through their exact relationship with rotations and the group SU(2). Quaternionic quantum mechanics is a separate foundations-level generalization.
01 · Intuition

From a line, to a plane, to rotations.

A quaternion is a scalar plus a three-dimensional imaginary vector. Multiplication carries orientation information, which makes unit quaternions exceptionally useful for rotations.

ℝ

Real numbers

x = a

One coordinate on a line. Multiplication scales.

ℂ

Complex numbers

z = a + bi

Two coordinates. Multiplication can scale and rotate a plane.

ℍ

Quaternions

q = a + bi + cj + dk

Four coordinates. A unit quaternion encodes a three-dimensional rotation.

Plain-language model

Think of a unit quaternion as a rotation instruction.

The real component controls the rotation angle. The three imaginary coefficients point along the rotation axis. Multiplying two unit quaternions composes two rotations into one. The half-angle in the formula is essential: q and −q represent the same physical 3D rotation.

02 · History

A number system born from a rotation problem.

Quaternions were not invented as a quantum formalism. They emerged from Hamilton's search for a multiplication rule capable of representing spatial rotations.

1843

Hamilton's breakthrough

William Rowan Hamilton formulates quaternions and the relation i² = j² = k² = ijk = −1.

1850s

Geometric development

Hamilton and Tait develop quaternion methods for geometry and mechanics.

1880s

Vector analysis

Gibbs and Heaviside extract vector algebra, which becomes dominant in physics education.

1920s

Quantum mechanics

Complex Hilbert spaces, spinors, and Pauli matrices become central to quantum theory.

Today

Rotations and quantum gates

Quaternions remain important in attitude control, graphics, robotics, and the geometry of single-qubit operations.

03 · Mathematics

The algebra, carefully.

A quaternion q = a + bi + cj + dk has one real component a and a vector part (b,c,d). Quaternion multiplication is associative and distributive, but generally not commutative.

Basis multiplication

×1ijk
11ijk
ii−1k−j
jj−k−1i
kkj−i−1

Notice ij = k but ji = −k. Reversing order reverses orientation.

Core operations

q* = a − bi − cj − dk
‖q‖ = √(a² + b² + c² + d²)
q⁻¹ = q* / ‖q‖²   (q ≠ 0)
pq = (p₀q₀ − p⃗·q⃗) + (p₀q⃗ + q₀p⃗ + p⃗×q⃗)

The dot product contributes to the scalar part; the cross product contributes to the vector part.

Encoding and applying a rotation

  1. Choose a unit axis n̂ = (nₓ,nᵧ,n_z) and a rotation angle θ.
  2. Build a unit quaternion: q = cos(θ/2) + (nₓi + nᵧj + n_zk)sin(θ/2).
  3. Embed the vector: v = (vₓ,vᵧ,v_z) becomes the pure quaternion 0 + vₓi + vᵧj + v_zk.
  4. Rotate: v′ = qvq*. For a unit quaternion, q* = q⁻¹.
Example: 90° about z → q = cos 45° + k sin 45° = (√2/2)(1 + k)
04 · Comparison

Quaternion, vector, spinor, or matrix?

These objects are related, but they answer different questions. Confusing them is a common source of errors.

ObjectComponentsPrimary meaningRotation roleImportant caution
3D vector(x,y,z)Magnitude and directionThe object being rotatedA vector does not by itself encode a full rotation.
Unit quaternion(a,b,c,d), norm 1Axis and angleCompact rotation operatorq and −q encode the same SO(3) rotation.
Rotation matrix3×3 real matrixLinear map on ℝ³Acts directly on vectorsNine entries obey six constraints.
Qubit stateTwo complex amplitudesQuantum state rayPoint on Bloch sphere after removing global phaseGlobal phase is physically unobservable for an isolated state.
SU(2) operator2×2 complex unitary, det = 1Single-qubit rotationActs on a spinor/qubitSU(2) double-covers SO(3).
05 · Quantum connection

Unit quaternions and SU(2) are the same rotation geometry.

Every unit quaternion can be mapped to a special unitary 2×2 complex matrix. This is why quaternion language appears naturally when studying spin-½ particles and single-qubit gates.

ℍ

Unit quaternion

q = a + bi + cj + dk
a²+b²+c²+d²=1
σ

Pauli matrices

The imaginary quaternion units can be represented by −i times the Pauli matrices, with a consistent sign convention. Their multiplication mirrors quaternion multiplication.

S³

Double cover

Unit quaternions form a 3-sphere. Two antipodal quaternions q and −q map to the same physical rotation in SO(3), just as U and −U act identically on Bloch vectors.

Quantum gates

U = exp(−iθ n̂·σ / 2)

A rotation around axis n̂ has the same half-angle structure as the corresponding unit quaternion.

Standard theory versus alternative theory: using quaternions to describe SU(2) rotations is standard. Replacing the complex Hilbert space of quantum mechanics with a quaternionic Hilbert space is a more radical proposal with different physical and compositional questions.
06 · Interactive labs

Experiment with the mathematics.

All calculations run locally in this HTML file. Change the values and compare the results.

Calculator 01

Quaternion algebra workbench

Enter q and r. Compare qr with rq to see noncommutativity directly.

q = a + bi + cj + dk
r = a + bi + cj + dk
q + r
q r
r q
conjugate q*
norm ‖q‖
inverse q⁻¹
Calculator 02

Axis–angle rotation and quantum-gate converter

Choose a rotation axis, vector, and angle. The calculator builds the unit quaternion, rotates the vector, and shows the equivalent SU(2) matrix.

Rotation axis n
Vector v
Normalized axis
Unit quaternion
Rotated vector qvq*
Equivalent SU(2) matrix

X, Y, Z, and H presets match the familiar gates up to a physically irrelevant global phase. S and T are z-axis rotations up to global phase. Controlled operations require more careful phase bookkeeping.

Interactive visual

Move a pure qubit on the Bloch sphere

After normalization and global phase are removed, a pure qubit needs two real angles. A unit quaternion needs three parameters, so it naturally describes a rotation acting on the qubit—not a unique qubit state.

State |ψ⟩
Bloch vector
Probabilities P(0), P(1)
07 · Check yourself

Short conceptual review.

Open each item after forming your own answer.

Why is quaternion multiplication noncommutative?

The vector part includes a cross product. Reversing the operands reverses the cross product's sign, so pq and qp generally differ.

Why does the rotation quaternion use θ/2?

Unit quaternions and SU(2) double-cover the ordinary rotation group SO(3). The half-angle produces the correct physical rotation after the sandwich operation qvq*.

Does a quantum computer normally store amplitudes as quaternions?

No. Standard quantum mechanics uses complex Hilbert spaces. Quaternions are a powerful representation of the SU(2) rotations that act on a qubit.

Why do q and −q represent the same 3D rotation?

In (−q)v(−q)* the two minus signs cancel, producing qvq*. They are antipodal points on the unit 3-sphere that map to the same SO(3) rotation.

08 · References

Continue learning.

These links cover history, quantum computation, visualization, and quaternionic extensions of quantum mechanics.