## 2 Procedure of Operation
### Generating Arbitrary Light Fields Using a Phase-Only SLM
Since a superpixel map that can be displayed on a phase-only SLM is required, two complex pointers, whose amplitudes are equal to 1, need to be determined. In superposition, they need to represent the desired data map entry (see Figure 3b). Since the phase distribution of LP modes is binary (\(\pi/2\) or \(-\pi/2\)) [23], the implementation becomes significantly easier. The desired pointer \(C(j\omega)\) with the amplitude \(C_{0}\) from Figure 3b is located either on the positive or negative imaginary axes and can be described as the superposition of two symmetrically displaced unit pointers (\(A(j\omega)\) and \(B(j\omega)\)), whose phase levels \(\Phi_{A}\) and \(\Phi_{B}\) have to be determined as  
\[\Phi_{A}=arcsin\left(\frac{C_{0}}{2}\right),\text{ and }\Phi_{B}=\pi-\Phi_{A} \tag{1}\]  
The calculated phase levels have to be arranged in a superpixel as shown in Figure 3c. The presented principle was applied on a phase-only LCoS SLM from the manufacturer HOLOYE (type PLUTO-2). In order to image the modulator plane on a 25 \(\upmu\)m sized core of a MMF with the optical setup from Figure 2, 935 \(\times\) 935 pixels from the SLM are used. The required amount of SLM pixels was determined from the demagnification introduced by the optical system of factor 270. The superpixel method was tested using a LP\({}_{02}\) 'donut' mode as a target field. The measured amplitude and phase distribution are shown in Figure 4a,b. The measured amplitude and phase profiles shown in Figure 4c,d prove that both amplitude and phase gradients can be modulated with the presented technique. The generated field was measured with DH, which is explained in Section 2.3. One approach to determine the modulation quality of the presented technique is to calculate the fidelity of the measured complex light field \(\vec{E}_{\text{Obtained}}\) compared to the numerical distribution \(\vec{E}_{\text{Target}}\)[20]. The fidelity is given by  
\[Fidelity=F=|\vec{E}_{\text{Obtained}}\vec{E}_{\text{Target}}^{*}|^{2}. \tag{2}\]  
Figure 3: Superposition of complex pointers. (**a**) Generation of an arbitrary complex pointer by superimposing two different complex pointers. (**b**) Generation of a mode data entry with two symmetrically displaced unit pointers for the superpixel map being displayed on a phase-only SLM. (**c**) Resulting superpixel that represents the desired complex pointer \(C(j\omega)\). 3 \(\times\) 3 SLM-Pixel form one subpixel. The theoretical maximum of \(F_{\text{theoretical}}=0.9943\) was derived by developing a simulation of the presented technique. The computed superpixel pattern is superimposed with a diffraction grating and allocated as the phase distribution of an LP\({}_{01}\) mode. After performing an FFT, the desired diffraction order is filtered in the Fourier plane with a digital pinhole. Afterwards, an IFFT is performed on the filtered signal. The result is the simulated outcome of the presented technique. Deviations in the simulated result can be explained, on one hand, with both finite aperture and resolution and on the other hand with phase-quantization of the system. In this experiment, a fidelity of 0.9509 is achieved, which corresponds to 95.6% of \(F_{\text{theoretical}}\). We achieved similar results with modes of higher order. In particular, imperfections of optical components cause deviations from the simulated result. On one hand, LCoS SLMs are known for their phase flickering property [24]. On the other hand, as mentioned above, the first diffraction order is spatially filtered in the Fourier plane behind L1. Undesired polarizations of light and unmodulated light caused by a modulation efficiency \(<1\) of the SLM lead to unwanted background light and errors, which are located in the 0 th diffraction order in the Fourier plane. Because of that, the superpixel distribution is superimposed with a diffraction grating that spatially separates the actual modulated light field into the 1 st diffraction order from the 0 th order in the Fourier plane.