  General-purpose programmable photonic processors provide a versatile platform
for integrating diverse functionalities on a single chip. Leveraging a
two-dimensional hexagonal waveguide mesh of Mach-Zehnder interferometers, these
systems have demonstrated significant potential in microwave photonics
applications. Additionally, they are a promising platform for creating unitary
linear transformations, which are key elements in quantum computing and
photonic neural networks. However, a general procedure for implementing these
transformations on such systems has not been established yet. This work
demonstrates the programming of universal unitary transformations on a
general-purpose programmable photonic circuit with a hexagonal topology. We
detail the steps to split the light on-chip, demonstrate that an equivalent
structure to the Mach-Zehnder interferometer with one internal and one external
phase shifter can be built in the hexagonal mesh, and program both the
triangular and rectangular architectures for matrix multiplication. We
recalibrate the system to account for passive phase deviations. Experimental
programming of 3x3 and 4x4 random unitary matrices yields fidelities > 98% and
bit precisions over 5 bits. To the best of our knowledge, this is the first
time that random unitary matrices are demonstrated on a general-purpose
photonic processor and pave the way for the implementation of programmable
photonic circuits in optical computing and signal processing systems.
