# Complex Wavefront Shaping through a Multi-Core Fiber
## 3 Complex Wavefront Shaping through a Multi-Core Fiber  
Gerchberg-Saxton (GS) algorithm [31; 32] is an iterative phase retrieval approach, which is employed to retrieve the phase at the source plane from the intensity image at the target plane. Boosted progresses of SLMs make the GS algorithm a widely used approach to generate the precise modulation hologram of SLMs for reconstructing a complex light field at far-field [33; 34]. Generally, this is an adequate approach for wavefront shaping employing SLMs [33]. However, the discrete distribution and the much lower number of cores than the pixel number of the SLM lead to spatial sampling when the modulated light is coupled into the MCF. This can result in strong image distortions at the distal far-field. To simulate the light field propagation through an MCF, the location of each core is detected from the image of the fiber facet, and the corresponding location of cores on the SLM is obtained by the affine transformed coordinate system of the camera. In the simulation, a GS algorithm generated phase (Figure 3a) is spatially sampled by the binary image of the core distribution map (Figure 3b). The simulated light fields at the target plane (Figure 3e,j) are strongly distorted and the experimental light fields transmit through a calibrated MCF (Figure 3f,k) are even indistinguishable. We propose an optimized algorithm named Core-GS, which is specialized for phase retrieval through MCFs. The source phase and intensity are spatially sampled by the core distribution map (Figure 4) in each iteration for better simulation of the propagation through the MCF. Shown in Figure 4, to retrieve the source phase \(\phi_{s}(x,y)\) for a target intensity \(A_{t}(x,y)\), a random phase \(\phi_{t}(x,y)\) is generated and constitutes the complex light field at the target plane \(E_{t}(x,y)\)  
\[E_{t}=A_{t}\,e^{\phi_{t}}. \tag{6}\]  
The composed light field at the target plane is numerically backpropagated with fast Fourier transform (FFT) and inverse fast Fourier transform (iFFT) for phase retrieving  
\[\phi_{s}(x,y)=\,Arg\Bigg{\{}\mathrm{iFT}\Big{\{}\mathrm{FT}\big{\{}E_{t}\big{\}} e^{-\mathrm{i}z\sqrt{(2\pi/\lambda)^{2}-{k_{x}}^{2}-{k_{y}}^{2}}}\Big{\}}\Bigg{\}}, \tag{7}\]  
\(k_{x}\), \(k_{y}\) are the spatial frequencies, \(z\) is the distance between the target and source plane. An experimental measured binary core distribution map \(M(x,y)\) is superposed on both intensity \(A_{s}(x,y)\) and phase image \(\phi_{s}(x,y)\) at the source plane for simulating the spatial sampling process through the MCF facet. The light field at the source plane is  
\[E_{s}=\left(A_{s}\cdot M\right)e^{\phi_{s}\cdot M}, \tag{8}\]  
Figure 2: **(a,b)** Distal far-field of MCF with and without DOPC for a tailored Fresnel lens input at the proximal side. The focus after the compensation has a peak-to-background ratio of 29 dB. The scale bar indicates a length of 5 \(\upmu\)m. **(c)** The stability of the wavefront shaping through an MCF is characterized by the FWHM of the focus in 50 h. The standard deviation of the FWHM in 50 h is only 0.55%. which is then forward propagated to the target plane for updating the target phase \(\phi_{t}(x,y)^{\prime}\)  
\[{\phi_{t}}^{\prime}=Arg\Bigg{\{}\text{iFT}\Big{\{}\text{FT}\big{\{}\text{FT}\big{\{} E_{s}\big{\}}e^{i\sqrt{(2\pi/\lambda)^{2}-{k_{x}}^{\prime}}^{2}-{k_{y}}^{ \prime}}^{2}\big{\}}\Bigg{\}}\Bigg{\}}. \tag{9}\]  
The correct phase at the source plane can be retrieved after about 20 iterations, which is then displayed on the SLM for complex wavefront shaping through the MCF. The simulation results demonstrate that the Core-GS algorithm retrieved phase (Figure 3c) can reconstruct the complex light field with much higher quality (Figure 3g.I). The experimental results present the distal light field transmitted through a 50 cm long calibrated MCF (Figure 3h,m).