Universal unitary photonic networks: local interactions and network topology
MZI matrix representations, Haar initialization, and optimization of redundant and permuting rectangular meshes.
English translation of the author’s Chinese Zhihu article, preserving its original date and viewpoints. Figures retain the original labels; click a figure to enlarge it.
Today I read a Stanford paper on performing arbitrary matrix multiplication with MZI photonic devices [1]. It mainly discusses how local interactions between MZI building blocks scale into a network, how gradient-based optimization converges toward random unitary matrices, and how changes to topological connectivity improve the network architecture.
1. Explicit representation of an MZI photonic neural network
A single-mode MZI phase shifter essentially consists of lossless 50:50 MMI splitters and phase modulators, allowing an arbitrary U(2) or SU(2) transformation on its inputs:

With N input modes and an interferometer connecting waveguides n and n + 1, the 2 × 2 matrix U in equation 1 can be embedded in N-dimensional space. The local unitary “Givens rotation” Uₙ is defined as follows:

This embedding replaces a 2 × 2 block in the identity matrix with the elements of the previously derived unitary cell. Different network nodes represent different matrix positions. There are N(N − 1)/2 nodes in total. Multiplying these matrices gives the matrix representation of the cascaded network.

The resulting cascade is illustrated below.

2. Global convergence and initialization
Convergence of global optimization primarily depends on the sensitivity of each phase shift. The gradient-descent optimization studied in the paper converges when phase shifts are correct within an acceptable range. That range can be rigorously defined using the means and variances of mesh phase shifts that together specify an unbiased, “Haar-random” unitary matrix. To realize a Haar-random unitary, some MZIs must be biased toward the cross state: tₙ′ = cos²(θ/2) = |U₁₂|² = |U₂₁|² approaches 1, while θₙ′ approaches 0. This bias compresses the acceptable ranges of transmissivity and phase near the extreme cross-state configuration, producing greater sensitivity.
For a Haar-random unitary matrix, the MZIs with low transmissivity tolerance lie at the center of a rectangular mesh and the apex of a triangular mesh. In both mesh types, each MZI’s cross-state bias and corresponding sensitivity depend only on the total number of accessible waveguide ports.
Haar initialization: In a physical setting, Haar-distributed phases are used to set each MZI’s measurable transmissivity tₙ′, thereby initializing the photonic device to a random matrix. In conventional initialization, nonlocal, off-diagonal elements of the realized unitary matrix tend to be close to zero because there are fewer conversion paths between distant inputs and outputs—for example, input 1 and output 8 in figure 1 have only a single path. The mesh therefore produces a banded unitary matrix, with banding increasingly evident at larger sizes.
Haar initialization avoids this banded-matrix problem and substantially improves gradient-descent convergence. Physically, light spreads quickly from the mesh inputs and interacts near its boundaries—the inputs, outputs, top, and bottom—while the center has high transmissivity. With randomly set phases, by contrast, light effectively performs a random walk through the mesh, producing the field propagation pattern shown in panel (f).

3. Architectural innovations
Redundant rectangular mesh (RRM): Adding extra tunable MZIs can greatly accelerate optimization of a rectangular mesh toward an unknown unitary matrix. In panel (a) below, the additional tunable layers are shown in green. Such an underdetermined mesh, with fewer inputs than tunable layers, can overcome photonic errors and recover the fidelity of unitary construction algorithms. Adding layers increases the overall optical depth. However, embedding a smaller mesh with extra splitter layers into a rectangular mesh of acceptable optical depth does not introduce an inherent waveguide-loss problem.
Permuting rectangular mesh (PRM): Another way to accelerate rectangular-mesh optimization is to periodically shuffle outputs within the mesh. This rearrangement relaxes component tolerances and changes the uniformity of the number of paths available for each input–output conversion. The paper formalizes this intuition as a permuting rectangular mesh. Its permutation blocks can be implemented using a rectangular mesh of MZIs with fixed cross-state phase shifts, as in panel (b), or through low-loss waveguide crossings.
Extra tunable layers, shown in green, can substantially reduce convergence time.

After initializing the photonic mesh, the authors optimize a mean-squared-error cost against an unknown Haar-random unitary U, using the Frobenius norm to train the MZI network to fit an arbitrary unitary matrix. TensorFlow automatic differentiation simulates global optimization of the unitary mesh. Physically, this can be implemented with the in situ backpropagation procedure in reference [2]. That optical backpropagation procedure uses interference to physically measure dLtrain/dθₙ and can be extended to any architecture discussed in the paper.
4. Summary
The scalability of gradient-based optimization of Haar-random unitary matrices on universal photonic meshes is limited by small reflectivities and MZI phase-shifter sensitivities arising from constraints on locally interacting components. The mean reflectivity and sensitivity required by each MZI are inversely related to the total number of inputs and outputs it affects. If physical components do not meet tolerance requirements, optimization struggles to converge to the target unitary operator. For N = 128, random phase-shifter initialization generally fails to converge through in situ backpropagation. Haar initialization, however, can sufficiently bias optimization toward the desired random unitary matrix even with significant simulated splitter fabrication errors.
The paper also proposes extra tunable splitters or mesh nonlocality to accelerate optimization. Naive, uniform-random initialization on a standard photonic mesh struggles to learn random unitary matrices by gradient descent. Adding nonlocality improves optimization without extra parameters. A Haar-initialized redundant architecture can reduce mean squared error for Haar-random unitaries by five orders of magnitude and shorten optimization time by at least two orders, as illustrated below. The results suggest that architecture and initialization are important for improving the scalability and stability of reconfigurable universal photonic devices and their classical and quantum applications.

Test-error comparison of RM, PRM, and RRM meshes for N = 128 in TensorFlow: 20,000 iterations, Adam updates, learning rate 0.0025, and batch size 256. Haar-random initialization θₙ′ = 0. δN denotes additional layers in the redundant mesh.
References
1. Pai, S., Bartlett, B., Solgaard, O., & Miller, D. A. (2019). Matrix optimization on universal unitary photonic devices. Physical Review Applied, 11(6), 064044.
2. Tyler W. Hughes, Momchil Minkov, Yu Shi, and Shanhui Fan. Training of photonic neural networks through in situ backpropagation and gradient measurement. Optica 5, 864 (2018).