From optics to hydrodynamics, shock and rogue waves are widespread. Although they appear as distinct phenomena, new theories state that transitions between extreme waves are allowed. However, these have never been experimentally observed because of the lack of control strategies. We introduce a new concept of nonlinear wave topological control, based on the one-to-one correspondence between the number of wave packet oscillating phases and the genus of toroidal surfaces associated with the nonlinear Schrödinger equation solutions by the Riemann theta function. We prove it experimentally by reporting the first observation of supervised transitions between extreme waves with different genera, like the continuous transition from dispersive shock to rogue waves. Specifically, we use a parametric time-dependent nonlinearity to shape the asymptotic wave genus. We consider the box problem in a focusing Kerr-like photorefractive medium and tailor time-dependent propagation coefficients, as nonlinearity and dispersion, to explore each region in the state-diagram and include all the dynamic phases in the nonlinear wave propagation. Our result is the first example of the topological control of integrable nonlinear waves. This new technique casts light on dispersive shock waves and rogue wave generation and can be extended to other nonlinear phenomena, from classical to quantum ones. The outcome is not only important for fundamental studies and control of extreme nonlinear waves, but can be also applied to spatial beam shaping for microscopy, medicine, and spectroscopy, and to the broadband coherent light generation.
Quantum and classical physics can be used for mathematical computations that are hard to tackle by conventional electronics. Very recently, optical Ising machines have been demonstrated for computing the minima of spin Hamiltonians, paving the way to new ultra-fast hardware for machine learning. However, the proposed systems are either tricky to scale or involve a limited number of spins. We design and experimentally demonstrate a large-scale optical Ising machine based on a simple setup with a spatial light modulator. By encoding the spin variables in a binary phase modulation of the field, we show that light propagation can be tailored to minimize an Ising Hamiltonian with spin couplings set by input amplitude modulation and a feedback scheme. We realize configurations with thousands of spins that settle in the ground state in a low-temperature ferromagnetic-like phase with all-to-all and tunable pairwise interactions. Our results open the route to classical and quantum photonic Ising machines that exploit light spatial degrees of freedom for parallel processing of a vast number of spins with programmable couplings.