|q⟩ Bad Qubits

intermediate · Physics · Hilbert Spaces & Dirac Formalism

Inner Product Spaces

A bare complex vector space tells you how to add vectors and scale them, but it gives you no notion of length or angle. To measure overlap between quantum states — and ultimately to compute probabilities — we equip the space with an inner product.

The inner-product axioms

An inner product on a complex vector space VV is a map that takes two vectors u,v|u\rangle, |v\rangle to a complex number uv\langle u | v \rangle, subject to three axioms. We use the physics convention, which is conjugate-linear in the first slot and linear in the second.

1. Conjugate symmetry.

uv=vu.\langle u | v \rangle = \overline{\langle v | u \rangle}.

Swapping the arguments conjugates the result. A consequence is that vv\langle v | v \rangle equals its own conjugate, so it is always real.

2. Linearity in the second argument.

uαv+βw=αuv+βuw,α,βC.\langle u \,|\, \alpha v + \beta w \rangle = \alpha \langle u | v \rangle + \beta \langle u | w \rangle, \qquad \alpha, \beta \in \mathbb{C}.

Combined with conjugate symmetry, this forces conjugate-linearity in the first argument: αu+βwv=αuv+βwv\langle \alpha u + \beta w \,|\, v \rangle = \overline{\alpha}\langle u | v \rangle + \overline{\beta}\langle w | v \rangle.

3. Positive-definiteness.

vv0,with vv=0    v=0.\langle v | v \rangle \ge 0, \qquad \text{with } \langle v | v \rangle = 0 \iff |v\rangle = |0\rangle.

This is the axiom that makes "length" meaningful, and it is the reason the first slot is conjugated: in Cn\mathbb{C}^n we get vv=kvkvk=kvk20\langle v | v \rangle = \sum_k \overline{v_k} v_k = \sum_k |v_k|^2 \ge 0.

The induced norm

From the inner product we define the norm (length) of a vector by

v=vv.\| v \| = \sqrt{\langle v | v \rangle}.

Positive-definiteness guarantees the quantity under the root is real and non-negative, so the norm is a well-defined real number. A vector with v=1\|v\| = 1 is normalized — exactly the condition we impose on physical quantum states so that the Born-rule probabilities sum to 1.

The Cauchy–Schwarz inequality

Every inner product satisfies the fundamental bound

uvuv,|\langle u | v \rangle| \le \|u\|\,\|v\|,

with equality if and only if u|u\rangle and v|v\rangle are linearly dependent (parallel). This single inequality underlies the triangle inequality u+vu+v\|u + v\| \le \|u\| + \|v\|, the definition of the angle between vectors, and the bound ϕψ21|\langle \phi | \psi \rangle|^2 \le 1 for normalized states that caps transition probabilities at 1.

A worked example

Let v=(2+i,  12i)|v\rangle = (2 + i,\; 1 - 2i) in C2\mathbb{C}^2. Its squared norm is

vv=(2+i)(2+i)+(12i)(12i)=2+i2+12i2.\langle v | v \rangle = \overline{(2+i)}(2+i) + \overline{(1-2i)}(1-2i) = |2+i|^2 + |1-2i|^2.

Computing each modulus-squared: 2+i2=22+12=5|2+i|^2 = 2^2 + 1^2 = 5 and 12i2=12+(2)2=5|1-2i|^2 = 1^2 + (-2)^2 = 5. Therefore

vv=5+5=10,v=10.\langle v | v \rangle = 5 + 5 = 10, \qquad \|v\| = \sqrt{10}.

Note the result is real and positive, as positive-definiteness demands.

Try it

This is a numerical exercise — your code should return a number, not a circuit. For v=(2+i,  12i)|v\rangle = (2+i,\; 1-2i), compute the squared norm vv\langle v | v \rangle.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.