High-fidelity phase and amplitude control of phase-only computer generated holograms using conjugate gradient minimisation

We demonstrate simultaneous control of both the phase and amplitude of light using a conjugate gradient minimisation-based hologram calculation technique and a single phase-only spatial light modulator (SLM). A cost function which incorporates the inner product of the light field with a chosen target field within a defined measure region is efficiently minimised to create high fidelity patterns in the Fourier plane of the SLM. A fidelity of $F=0.999997$ is achieved for a pattern resembling an $LG^{0}_{1}$ mode with a calculated light-usage efficiency of $41.5\%$. Possible applications of our method in optical trapping and ultracold atoms are presented and we show uncorrected experimental realisation of our patterns with $F = 0.97$ and $7.8\%$ light efficiency.


I. INTRODUCTION
Simultaneous control over the amplitude and phase of light has allowed significant advances in optical trapping of microscopic objects [1], microscopy [2] and optical communication [3]. A variety of methods have been developed which allow arbitrary independent control over both. Tandem or cascaded approaches sequentially manipulate the amplitude then phase using either two Spatial Light Modulators (SLMs) or two distinct regions of a single SLM [4][5][6]. Analytical approaches which calculate a single phase-only modulation to simultaneously sculpt amplitude and phase include the shape-phase method [7] and a variety of methods which spatially control the height, and thus diffraction efficiency, of the applied phase [8]. Recently, a high-fidelity superpixel approach to phase and amplitude control has also been demonstrated for Digital Micromirror Devices (DMDs) [9].
In order to control the light field in a particular plane holographically, we wish to apply a bespoke phase modulation φ p,q (with indices p and q denoting spatial co-ordinates) to a fixed incident laser field with amplitude S p,q , in a simple setup with a single phase-only SLM and a single focussing element. The electric field in the plane of the SLM is E in p,q = S p,q exp (iφ p,q ). Given S p,q and φ p,q , the electric field in any other plane E out n,m (with output plane coordinates denoted by n and m) is straightforwardly calculated using an appropriate propagator P such that E out n,m = P E in p,q . For patterns in the far field P is approximated by a fast Fourier transform [10] such that where N T = n,m 1, while I n,m and ϕ n,m are the output plane intensity and phase respectively. Calculation of the appropriate phase-only modulation φ p,q to give an acceptable output field is a well-known inverse problem which, in general, requires numerical solution. Iterative Fourier Transform Algorithms (IFTAs) are commonly used in calculating the phase modulation required to generate a desired intensity distribution, and variants which control both phase and amplitude have been recently demonstrated [11,12]. In this paper we propose an alternative iterative method to creating patterns with independent control over the phase and amplitude profiles: using a conjugate gradient minimisation technique which was previously shown to achieve smooth, accurate and highly-controllable intensity patterns [13]. The technique efficiently minimises a specified cost function which can be carefully manipulated to reflect the requirements of the chosen light pattern, such as removing optical vortices from regions of interest. Here, we extend this method to produce a variety of high fidelity and smooth patterns in both phase and intensity, which are designed primarily for optical trapping.

II. CONJUGATE GRADIENT METHOD
The conjugate gradient minimisation method is intuitively described in [14], and our original conjugate gradient optimisation routine for control of the amplitude in holograms is presented in more detail in [13]. The main advantage of this approach is the high level of control it gives over any feature of interest in the output plane, provided that the arXiv:1701.08620v1 [physics.optics] 30 Jan 2017 feature can be encapsulated within an analytical cost function C. This defines an effective error to be minimised, and judicious choice of the cost function terms can allow precise guiding of the hologram optimisation process. For our holograms, the cost function is based on the difference between the calculated electric field and a chosen target, and the parameter space for the optimisation encompasses all the different phase distributions that the SLM can generate. In order to find a hologram which gives acceptable amplitude and phase, we find that a good choice is where τ n,m = T n,m exp (iΦ n,m ) is the target electric field, and the over-tilde denotes normalisation over a specified region of interest, which is small compared to the total output plane. Similar to the MRAF method [15], we choose this region of interest to encompass regions of non-zero amplitude in the target pattern (known as the measure region) plus a surrounding area of zero intensity. Experimentally, the light which the algorithm places outside the region of interest can be spatially filtered. The multiplicative prefactor 10 d is used to increase the steepness of the cost function within the parameter space to improve convergence time and accuracy. Figure 1 shows a diagrammatic representation of the calculation. The initial position in the parameter space of C is determined by S p,q (a two-dimensional Gaussian profile with 1/e 2 -radius σ) and a guess phase φ p,q = R p 2 + q 2 + D (p cos θ + q sin θ). The two terms in φ p,q respectively control the size and position of the envelope of the output plane intensity. This combination of phase patterns is known to suppress the formation of optical vortices during hologram calculation, which can otherwise cause premature stagnation and low accuracy [15,16].
As an initial step, we calculate ∂C/∂φ p,q for each pixel to determine the direction of steepest descent g 1 and minimise C along this direction to change φ p,q . For subsequent iterations i of the process, the descent direction α i is the conjugate direction The process continues until the cost function stagnates (i.e. when the difference in the value of the cost function between iterations is below 10 −5 ) or a predefined maximum number of iterations is reached. We implement the conjugate gradient calculation in Python with the cost function gradient determined using the Theano library [17].

III. NUMERICAL RESULTS
We test our method on a range of target patterns particularly chosen with applications in optical trapping in mind. Independent spatial control over both the amplitude and phase of trap light is also increasingly desirable in the field of ultracold atoms, for example in the transfer of orbital angular momentum from light to atoms [18], and in the creation of artificial gauge fields [19][20][21]. In the particular case of trapping ultracold atoms in continuous geometries [15,[22][23][24][25][26], accuracy and smoothness of the intensity are vital to avoid fragmentation.
We calculate a pattern of phase values between 0 and 2π for the SLM plane of 256 × 256 pixels (with a pixel size of 24µm) padded with zeros in the border such that the plane is 512 × 512 pixels, such that there is no loss of resolution in the resulting 512 × 512 output plane. The patterns are diagonally offset from the center of the plane by 85 pixels to avoid the zeroth order (undiffracted light) that would appear due to the finite efficiency of the SLM. This constrains two of the initialisation parameters to D = −π/2 and θ = π/4. We show the region of interest of the calculated intensity and phase for each of our target patterns in Figure 2. The pattern similar to a Laguerre-Gaussian (LG) mode provides a good benchmark for our method and such patterns have a wide variety of uses [27], including in ultracold atom experiments to induce circulation states [18]. We can also retain the phase structure of LG modes but with arbitrary amplitude profiles. As examples, ring and square lattices with underlying phase windings have potential applications for quantum simulation of magnetic flux in solid state systems [19]. Ultracold atoms confined in a honeycomb lattice with alternating phase between nearest neighbouring sites have also been shown to experience an artificial gauge field in a graphene quantum simulator [20], while a trapping potential comprising a flat intensity profile and an inverse square power-law phase has been proposed for investigations on sonic horizons and artificial black holes [21]. A Gaussian line with a phase gradient across it can be used to trap particles in optical tweezers, but at the same time cause them to flow [28]. As a test of our method's versatility, we have also chosen the more arbitrary patterns of a chicken and eggs [29] which have uncorrelated intensity and phase patterns. The main metric for accuracy is the fidelity, which is defined as F = n,m τ * n,m E out n,m 2 [9] and is evaluated over non-zero amplitude within the measure region. The light efficiency (η) is the fraction of light in the output plane that is in the region of interest. A relative phase error Φ within the measure region and the non-uniformity error nu for regions in the patterns that have a flat intensity [12] are defined as: where P is a correction term to account for the cyclical nature of the phase, M n,m is a binary mask which is equal to one where the target intensity is approximately uniform and zero everywhere else and I a = (1/N ) n,m M n,mĨn,m is the average output intensity in the uniform region (N is the total number of pixels in the measure region).  Table I. Lower values of d cause early stagnation of the algorithm into poor quality local minima. The maximum iteration number was reached for d > 6, whilst the fidelity would increase at approximately the same rate for d > 4 (only d = 1, 2, 3 and 6 are shown in Figure 3 for clarity). It was found that a steeper cost function would not only lead to improved fidelities in the patterns, but also faster calculation times per iteration t (Figure 3b)). A typical minimization routine converges in < 200 iterations at a total duration of < 75s with a standard desktop computer (2.5 GHz processor). For all patterns shown in this article, we have used d = 9. For each pattern we perform an optimisation over the initialization conditions σ and R (see Figure 3c)-d)). It was found that smaller incident laser beam sizes and reduced curvature in the guess phase led to higher light efficiency at  Figure 2, with optimal values of σ, R and region of interest diameter ROI.
Pattern  Figure 2 were chosen to provide both good light efficiency whilst maintaining a high fidelity. The optimal values of calculated holograms are shown in Table I. The authors of [12] recently developed an IFTA for full-plane control of amplitude and phase, which they compared to a previous regionally-constrained algorithm [11]. They find that the regionally-constrained algorithm is more accurate at the cost of light-utilisation efficiency, which has also been seen in amplitude-only control algorithms [13,15] and in the present work. For far-field holograms of lines of continuous intensity with phase gradients, the regional algorithm gives nu = 0.04%, Φ = 1.63% and η = 3.48%, while the full-plane IFTA is less accurate ( nu = 3.48% and Φ = 3.77%) but achieves higher efficiency (η = 77.84%). For our chosen cost function in Equation (4), the comparable continuous patterns amongst our range of targets (i.e. the Gaussian Line and Flat Top) are significantly smoother: we find nu is lower by a factor 6-20 and Φ is lower by one or two orders of magnitude than the regional IFTA. The light-utilisation of the conjugate gradient optimised patterns is a factor 3-11 times higher than the regional IFTA, but between 15-53% of the full-plane IFTA. We note that the freedom in choice of the cost function terms and their relative weightings could be exploited to prioritise the efficiency of light usage at the expense of accuracy or smoothness if this is of greater importance to a particular application.

IV. EXPERIMENTAL VERIFICATION
We verify the calculated holograms experimentally using the setup shown in Figure 4a). The output of a 1070 nm fiber laser (IPG YLP-5-1070-LP) is expanded to an experimentally-convenient 1/e 2 waist of 3.0 mm and split using a polarising beam splitter. One path is phase-modulated as it is reflected (14 • AOI) by a liquid crystal SLM (BNS P1920) and focussed onto a CCD camera (Thorlabs DCU200 Series) using an f = 150 mm achromatic doublet. The other path gives a reference beam which is optionally recombined with the modulated beam after the focussing optic to produce interference fringes which are used to extract the phase of the modulated light via the Fourier transform fringe analysis method [30].
As shown in Figure 4b)-d) and detailed in Table II, the measured fidelities are lower than the numerical predictions, but could be improved by the addition of feedback [22,25] or the characterisation of wavefront aberration in the optical system [31,32]. We include the rescaled efficiency η * , which is η/0.45, due to the 45% diffraction efficiency of the SLM. Higher diffraction efficiencies could be obtained by replacing the SLM with a micro-fabricated diffractive optical element.  The first λ/2 waveplate is used to vary the power between the reference and SLM beam, whilst the second waveplate is used to reorientate the polarisation of the reference beam to match the SLM beam for interference. b) -d) Measured intensity (left) and phase (right). The white scalebar in b) denotes 300 µm, and is common to all images. Color scaling as in Figure 2.

V. CONCLUSION
We have demonstrated that smooth, high fidelity light patterns with independent control over the amplitude and phase can be generated with a single phase-only SLM. The holograms calculated with the conjugate gradient minimisation approach surpass the accuracy and smoothness of previous IFTA approaches. We note that our approach achieves comparable results in F and η for image-quality holograms to the super-pixel method for DMDs [9], and improved F for the LG mode, at the expense of constraining the pattern to a subset of the output plane.
This approach to hologram calculation is compatible with existing methods for the generation of multi-wavelength holographic optical traps [24]. In this work we have concentrated on using a fast Fourier transform as the propagator P. However, we find that near-field patterns calculated using Angular Spectrum Wavefront Propagation [10] achieve comparable fidelity, efficiency and smoothness. The accurate control over amplitude and phase will be crucial to a future research direction in the design of axially-structured light fields.