The physics of optical matrix multiplication: a primer

By Yuna Kishida

Illustration of light propagating through a Mach-Zehnder interferometer array for matrix multiplication

What this post is and is not

This is a first-principles walkthrough of how optical interference in a silicon photonic chip performs the mathematical operation of matrix-vector multiplication. It is written for people who understand linear algebra and basic wave physics but have not necessarily followed the photonic computing literature. We will use concrete numbers where they help, and we will flag where we are describing the physics generally versus where we are describing our specific architectural choices.

We are not going to make claims about performance numbers for our chip. This is a physics explanation, not a product data sheet.

The representation problem: encoding numbers as light

Classical computation encodes numbers as voltages or currents. A transistor distinguishes between two voltage states, and digital arithmetic is built on that distinction. Optical computation needs a different representation, because light does not naturally take on discrete binary states.

The representation used in coherent photonic computing is the complex amplitude of an optical field. A monochromatic laser beam at wavelength lambda can be described as an electromagnetic wave with a time-varying electric field. At a given point in space, this field has an amplitude (how intense the light is) and a phase (where in its oscillation cycle the wave is at a given moment). Together, amplitude and phase define a complex number: if amplitude is A and phase is phi, the complex amplitude is A * exp(i * phi).

This complex number is the basic unit of information in coherent photonic computation. Input vectors to a matrix multiplication are encoded as a set of complex amplitudes, one per waveguide input port. The values a real neural network inference engine needs to handle are real-valued activations, not complex numbers. The architecture handles this by using the real part of the optical amplitude to represent each activation, accepting some redundancy in the representation. Alternatively, both real and imaginary parts can carry independent values if the architecture is designed to separate them at the output.

The Mach-Zehnder interferometer as a multiplication unit

The Mach-Zehnder interferometer (MZI) is the fundamental building block of photonic matrix multiplication. Understanding what an MZI does physically is the key to understanding how a photonic chip computes.

An MZI in a silicon photonic chip consists of: a first 50:50 beam splitter (typically a directional coupler), two waveguide arms of different lengths, and a second 50:50 beam splitter. Light entering one input port of the first splitter is divided equally between the two arms. The light in each arm travels its respective path length and arrives at the second splitter with a certain phase, determined by the optical path length of each arm.

If the two arm lengths are equal, the light recombines at the second splitter in a way determined entirely by constructive or destructive interference. If there is a phase difference of delta_phi between the two arms, the fraction of power that exits the first output port versus the second output port is set by the interference condition. Specifically, the power in the first output port is proportional to cos^2(delta_phi / 2), and the power in the second output port is proportional to sin^2(delta_phi / 2).

By controlling delta_phi through a phase-shifter element (a thermal heater that changes the refractive index of one arm), we can set the splitting ratio of the MZI to any value between 0 (all power to port 1) and 1 (all power to port 2). The phase-shifter converts a controlled electrical input into a controlled optical splitting ratio. This is the mechanism by which a matrix weight is encoded: each MZI's phase setting represents a specific element of the transformation being applied to the input optical field.

From a single MZI to a matrix transformation

A single MZI with two input ports and two output ports implements a 2x2 optical transformation. If we define the input optical amplitudes as a 2-vector u, the MZI applies a 2x2 unitary matrix U to produce an output 2-vector v = U * u. The specific U is determined by the phase setting of the MZI and the phases of any additional phase-shifters on the input or output ports.

A well-known result from linear algebra (specifically, from the Reck et al. 1994 paper on unitary decomposition and its subsequent extensions by Clements et al.) is that any N x N unitary matrix can be decomposed into a product of 2x2 unitary operations. This decomposition maps directly onto a triangular or rectangular mesh of MZIs, where each MZI in the mesh corresponds to one 2x2 factor in the decomposition. The phases of all the MZIs in the mesh together specify the full N x N matrix.

This is the mathematical foundation of photonic matrix multiplication: an N-port MZI mesh can implement any N x N unitary matrix, with the matrix elements encoded in the phase settings of the individual MZIs.

Non-unitary matrices and the singular value decomposition

Neural network weight matrices are generally not unitary. They are rectangular matrices with arbitrary real (or complex) values. The way a photonic chip handles this is through the singular value decomposition (SVD). Any matrix M can be written as M = U * S * V^dagger, where U and V are unitary matrices and S is a diagonal matrix of singular values. The diagonal singular values can be implemented as amplitude modulators on each waveguide, and U and V are implemented as MZI meshes.

The full pipeline for a matrix-vector product is then: first MZI mesh applies V^dagger to the input vector, the amplitude modulators scale each waveguide by the corresponding singular value, and the second MZI mesh applies U. The result at the photodetectors is the matrix-vector product M * x for input vector x.

The amplitude modulation step (applying S) is the place where the architecture diverges from a pure unitary computation. Real optical amplitude modulators introduce loss, and the singular value weighting creates an unequal power budget across channels. Managing this unequal power budget is one of the practical challenges in photonic inference that does not appear in the idealized physics description.

Reading out the result

After the optical computation, the result vector exists as a set of optical amplitudes at the output ports of the second MZI mesh. To produce usable numerical outputs, these amplitudes must be converted to electrical signals by photodetectors. A photodetector produces a photocurrent proportional to the optical power, which is the squared magnitude of the optical amplitude.

This means the detector output gives us |v_k|^2 for each output component v_k, not the complex amplitude v_k itself. For inference applications where the downstream computation (like a softmax or ReLU activation) operates on real-valued scalars, this magnitude-squared output is often exactly what is needed. When both the sign and magnitude of each output are required, more sophisticated detection schemes are needed, such as coherent detection against a reference beam, or differential detection with a balanced photodetector pair. These approaches add hardware complexity and are an active area of development in photonic inference architectures.

The fundamental physics of the MZI is well-established and taught in any advanced optics course. What is not textbook is how to build this into a manufacturable chip with the calibration, thermal compensation, and packaging that a real inference workload demands. That gap between idealized physics and working hardware is where most of the engineering challenge lives, and it is what we are working through.

Great Sky is building the GSK-1 photonic inference co-processor in Boulder, Colorado. Evaluation kits are available for qualified data-center inference teams.

Request Eval Kit More Articles