The Beamsplitter as a Matrix

The last module ended on a loaded sentence: an ideal Mach–Zehnder interferometer is three matrix multiplications. This module takes that sentence literally and rides it as far as it will go — which turns out to be all the way to a programmable processor that multiplies matrices at the speed of light. The programme is simple to state. Step one (this lesson): a photonic component is a matrix — pin down exactly which matrices physics permits. Step two: make that matrix settable. Step three: compose small matrices into any big one. Everything downstream — photonic neural networks, boson samplers, programmable photonic fabrics — is these three steps wearing different applications.

So, step one. The humblest interference component we have is the beamsplitter — on a chip, the directional coupler. Two guided fields go in; two come out. Today we write down its 2×2 transfer matrix, discover why the crossed path insists on carrying a factor of i, and prove the module's licensing law: losslessness forces unitarity. Not "suggests". Forces.

The transfer-matrix formalism

Describe the light in the two input waveguides by complex amplitudes a_1, a_2 — magnitude for field strength, argument for phase, exactly the phasors of Euler's formula. The physical powers are |a_1|^2 and |a_2|^2. Because Maxwell's equations in a linear medium obey the superposition principle, the output amplitudes must depend linearly on the inputs — and a linear map from two complex numbers to two complex numbers is nothing but a 2×2 complex matrix:

\begin{pmatrix} b_1 \\ b_2 \end{pmatrix} = U \begin{pmatrix} a_1 \\ a_2 \end{pmatrix}, \qquad U = \begin{pmatrix} t & r' \\ r & t' \end{pmatrix}.

Read the columns as biographies: column 1 is what becomes of light entering port 1 alone (t stays straight, r crosses over), column 2 the same for port 2. The formalism pays for itself the moment components are chained: if light traverses device U_1 and then device U_2, the composite is the matrix product U_2 U_1 — rightmost factor first, in the reading order of function composition. A photonic circuit diagram is a matrix expression drawn sideways.

For an ideal symmetric coupler that crosses a fraction K of the power, the amplitudes split as |t| = \sqrt{1-K} and |r| = \sqrt{K}. Writing \cos\kappa = \sqrt{1-K} turns the pair into a cosine–sine team whose squares always sum to one:

A 50:50 splitter is \kappa = \pi/4; a wisp of a tap coupler that skims off 1% for monitoring is \kappa \approx 0.1. One knob, every splitting ratio. But magnitudes are only half a complex number — the interesting question is what phases the four entries are allowed to have.

Why the crossed path carries an i

Here is the beautiful part: the phases are not free. Demand only that the coupler is lossless — output power equals input power for every possible input — and the phase of the crossed amplitude gets fixed for you. Feed port 1 alone: |t|^2 + |r|^2 = 1. Feed port 2 alone: |r'|^2 + |t'|^2 = 1. So far, only magnitudes. Now feed both ports coherently, a = (a_1, a_2), and expand the output power:

|b_1|^2 + |b_2|^2 = |a_1|^2 + |a_2|^2 + 2\,\mathrm{Re}\!\left[ a_1 \bar{a}_2 \left( t\bar{r}' + r\bar{t}' \right) \right].

The first two terms are what we want; the cross term is an interference surplus or deficit that would create or destroy energy depending on the input phases. Losslessness for all inputs therefore demands the cross term vanish identically:

t\bar{r}' + r\bar{t}' = 0 .

This is exactly the statement that the two columns of U are orthogonal. Now specialise to a symmetric coupler — same behaviour from either side, so t' = t and r' = r, with t chosen real by fixing a reference plane. The condition collapses to 2t\,\mathrm{Re}(\bar r) = 0: the crossed amplitude must be purely imaginary,

U_{\mathrm{BS}}(\kappa) = \begin{pmatrix} \cos\kappa & i\sin\kappa \\ i\sin\kappa & \cos\kappa \end{pmatrix}, \qquad U_{50:50} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & i \\ i & 1 \end{pmatrix}.

That is the origin of the i-fingerprint the MZI lesson used on faith: crossing over costs a quarter turn of phase — 90° — because energy conservation says it must. No geometry, no material property, no convention of the fab: any symmetric lossless two-port, in any technology, on any planet, tags its crossed path with \pm i. It is also precisely the mechanism behind the MZI's seesaw: the two routes to the cross port pick up one i each while the two routes to the bar port pick up i^0 and i^2 = -1 — a built-in 180° offset that makes one port's constructive interference the other's destructive.

Losslessness \Rightarrow unitarity

The argument above never used "beamsplitter" — only linearity and energy conservation. Run it in general. A lossless linear N-port preserves power for every input: \|U v\|^2 = \|v\|^2 for all v. Expand: \|Uv\|^2 = (Uv)^\dagger (Uv) = v^\dagger (U^\dagger U) v. Demanding v^\dagger (U^\dagger U - I)\,v = 0 for every vector — not just a lucky few — forces the Hermitian matrix in the middle to vanish (test it on basis vectors for the diagonal, on sums and i-weighted sums of basis vectors for the off-diagonal entries). Hence:

Physicists reach the same conclusion by counting photons; electrical engineers know it as the losslessness condition on a scattering matrix. It is worth pausing on what has happened here: a conservation law has become a matrix identity. When the meshes of the next lessons grow to hundreds of ports, we will never re-derive energy conservation — we will simply say "the mesh is unitary" and all of it comes along for free.

Worked check: the algebra, by machine

Verify the two claims numerically — U^\dagger U = I for the coupler at any ratio, and the failure of an "innocent" all-real 50:50 matrix, which turns out to manufacture energy for the right input:

type C = { re: number; im: number }; const c = (re: number, im = 0): C => ({ re, im }); const add = (a: C, b: C): C => c(a.re + b.re, a.im + b.im); const mul = (a: C, b: C): C => c(a.re * b.re - a.im * b.im, a.re * b.im + a.im * b.re); const conj = (a: C): C => c(a.re, -a.im); type M = C[][]; const dagger = (m: M): M => [ [conj(m[0][0]), conj(m[1][0])], [conj(m[0][1]), conj(m[1][1])] ]; const matmul = (p: M, q: M): M => [ [add(mul(p[0][0], q[0][0]), mul(p[0][1], q[1][0])), add(mul(p[0][0], q[0][1]), mul(p[0][1], q[1][1]))], [add(mul(p[1][0], q[0][0]), mul(p[1][1], q[1][0])), add(mul(p[1][0], q[0][1]), mul(p[1][1], q[1][1]))], ]; // How far is U†U from the identity? (max entry-wise deviation) function unitarityError(u: M): number { const g = matmul(dagger(u), u); let worst = 0; for (let i = 0; i < 2; i++) for (let j = 0; j < 2; j++) { const target = i === j ? 1 : 0; const d = Math.hypot(g[i][j].re - target, g[i][j].im); if (d > worst) worst = d; } return worst; } const coupler = (K: number): M => [ [c(Math.sqrt(1 - K)), c(0, Math.sqrt(K))], [c(0, Math.sqrt(K)), c(Math.sqrt(1 - K))], ]; for (const K of [0.01, 0.2, 0.5, 0.85]) { console.log("K = " + K + " unitarity error: " + unitarityError(coupler(K)).toExponential(2)); } // The impostor: a 50:50 splitter with no i on the crossed path. const s = 1 / Math.sqrt(2); const impostor: M = [ [c(s), c(s)], [c(s), c(s)] ]; console.log("all-real 'coupler' unitarity error: " + unitarityError(impostor).toFixed(3)); // Feed it equal in-phase inputs (total power 1) and count the output power: const b1 = add(mul(impostor[0][0], c(s)), mul(impostor[0][1], c(s))); const b2 = add(mul(impostor[1][0], c(s)), mul(impostor[1][1], c(s))); const powerOut = b1.re * b1.re + b1.im * b1.im + b2.re * b2.re + b2.im * b2.im; console.log("impostor output power for 1.0 in: " + powerOut.toFixed(3) + " (energy from nowhere!)");

The genuine coupler passes at every ratio; the all-real matrix doubles the input energy — which is the algebra's way of saying no passive device can have that matrix. Its columns are parallel, not orthogonal, and column orthogonality was exactly the no-free-energy clause.

Anyone arriving from quantum computing will squint at \tfrac{1}{\sqrt 2}\begin{pmatrix} 1 & i \\ i & 1 \end{pmatrix} and think of the Hadamard, H = \tfrac{1}{\sqrt 2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} — also unitary, also a 50:50 mixer, but stubbornly real. Can a beamsplitter be a Hadamard? Not naked: we just proved a symmetric lossless coupler must put its minus-sign budget into a 90° phase on both crossed paths, while H spends it as a 180° phase on one bar path. But the two differ only by phase shifts on the ports: sandwich the coupler between single-arm phase plates and you get H exactly. In the lab the distinction usually evaporates — an asymmetric beamsplitter (a slab with a dielectric coating) can realise the real convention directly, and quantum-optics papers hop between conventions with a cheerful "up to local phases". The habit to take away: two unitaries that differ only by diagonal phase factors are, photonically, the same hardware with different lead lengths. That throwaway remark becomes a load-bearing wall in the mesh decomposition lesson.

Because every matrix in this lesson happens to be unitary, it is easy to absorb the idea that "2×2 matrix" and "possible photonic component" are the same thing. They are spectacularly not. Pick a random 2×2 complex matrix: it has 8 real parameters; the unitaries form a measly 4-dimensional surface inside that 8-dimensional space — a set of measure zero, as thin as a soap film. The shear \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} is invertible and even has determinant 1, yet no arrangement of passive lossless optics can implement it — feed port 2 alone and it would emit double the power it received (run the numbers: (1,1)^{\mathsf T} out, power 2, from power 1 in). |\det U| = 1 is a consequence of unitarity, not a substitute for it. What passive optics can do beyond unitaries is only worse: loss gives sub-unitary matrices, never super-unitary ones. So how will a photonic chip ever implement the decidedly non-unitary weight matrix of a neural network? By a trick worth waiting two lessons for — every matrix factors into unitaries plus pure loss.

Where this goes next

The beamsplitter's matrix is unitary but frozen: \kappa is set by geometry at fabrication time and never moves again. The next lesson unfreezes it — two phase shifters turn the humble MZI into a 2×2 unitary you can dial, the photonic analogue of a settable rotation. After that, the composition theorem: any N \times N unitary from a mesh of dialled 2×2s. The licensing law proved today — lossless \Leftrightarrow unitary — is the rulebook every one of those pages plays by.