Ultra-precise holographic beam shaping for microscopic quantum control

High-resolution addressing of individual ultracold atoms, trapped ions or solid state emitters allows for exquisite control in quantum optics experiments. This becomes possible through large aperture magnifying optics that project microscopic light patterns with diffraction limited performance. We use programmable amplitude holograms generated on a digital micromirror device to create arbitrary microscopic beam shapes with full phase and amplitude control. The system self-corrects for aberrations of up to several $\lambda$ and reduces them to $\lambda/50$, leading to light patterns with a precision on the $10^{-4}$ level. We demonstrate aberration-compensated beam shaping in an optical lattice experiment and perform single-site addressing in a quantum gas microscope for $^{87}$Rb.


Introduction
Applications in quantum optics frequently rely on the interaction of light with quantum particles. In the highly controlled and isolated systems that are now available on a variety of platforms, it is often possible to individually address quantum objects, for example cold trapped ions [1], ultracold atoms in optical lattices [2,3], or emitters in solid-state environments [4]. To this end, it is necessary to create high-precision optical beam shapes, with complete control over beam profiles, alignment and focus [5][6][7].
In many experimental settings, achieving optimal beam shaping is hindered by aberrations in high-resolution imaging systems and the difficulty to reliably align and focus optical beams on the target, which may be embedded in a solid state environment or trapped inside a vacuum chamber. Methods for aberration compensation and adaptive optics have rapidly developed in the last decades, most prominently in the fields of astronomy [8], optical tweezers [9,10] and microscopy [11][12][13].
Here we present a technique for holographic beam shaping that is optimally suited for highprecision optical control in almost any quantum optics setting. By using a digital micromirror device (DMD) as a programmable amplitude hologram in a Fourier plane, we are able to engi-neer wavefronts with both phase and amplitude control [14][15][16][17]. We demonstrate the generation of high-order Laguerre-and Hermite-Gauss beams, as well as arbitrary, numerically defined beam profiles.
Using the complete control over the wavefront, it is possible to correct for known aberrations and achieve diffraction-limited performance even with phase errors of several λ in the imaging system. The beam-shaping system itself can be used to measure aberrations in the imaging system, and to pre-correct the engineered wavefront accordingly. Here, we use a photodiode as an intensity point detector in an image plane to map out aberrations, which automatically guarantees diffraction-limited performance, as well as alignment and focus onto the point detector. We obtain exceptionally precise optical potentials with four orders of magnitude of dynamic range and wavefront errors as low as λ /50. Similar performance can be achieved for any quantum object that can act as a point intensity probe, for example trapped ions or solid state emitters via their fluorescence rate. As an application, we demonstrate how to achieve diffraction-limited arbitrary beam profiles in an optical lattice experiment with single-site resolution [18,19]. We use DMD-generated beams to address individual atoms in an optical lattice and manipulate their dynamics.
Holographically defined potentials afford novel capabilities in quantum gas microscopes and have allowed us to observe two-particle quantum walks [20] and to detect entanglement entropy in Bose-Hubbard systems [21]. Similar approaches to DMD-based holography have recently been developed for mode-matched light injection into optical resonators [16,17].

Holography with digital micromirror devices
We use the digital micromirror device DLP5500 from Texas Instruments as a spatial light modulator. This optomechanical device consists of 1024 × 768 square mirrors of width 10.8 µm that are individually mounted on diagonal torsion hinges on top of an array of CMOS memory cells. Each mirror can be switched between a +12 • "on" and a −12 • "off" orientation, realizing a binary intensity filter with switching frequencies up to 5 kHz. Other versions with more than 4 megapixels and refresh rates of 50 kHz are available. Unlike for LCD-based spatial light modulators, which require periodic reversals of the pixel-defining field, binary patterns displayed on the DMD are completely static and avoid fluctuations due to intensity modulation.
We employ the DMD holographically in the Fourier plane, which enables both local amplitude and phase control despite the direct DMD modulations being binary in intensity. In order to illustrate the idea, consider a diffraction grating of fixed periodicity (set to 1 in the following). The m th diffraction order lies in the direction where the phase difference between neighboring slits is 2πm, or the light emerging from the grating has a linear phase gradient of slope 2πm/slit (Fig. 1). The outgoing light field of a single slit of width a (a fraction of 1) centered around x 0 is given by The phase φ of the outgoing field is linearly dependent on the position of the slit, φ ∼ mx 0 . We use this to imprint a phase modulation onto the beam by choosing the correct slit position. The intensity of the light field depends on the slit width a, and the diffraction orders have relative amplitudes sin(πma)/πm. The 0 th diffraction order of the displayed grating cannot be used for phase control since it imparts a constant phase over the entire area, and we use the +1 st order for beam shaping.  We obtain the desired phase and amplitude profiles by displaying a grating with a period p of e.g. 4 pixels at an angle of θ on the DMD and locally changing the slit widths and positions (examples in Fig. 3). The DMD is illuminated with monochromatic light of wavelength λ . Assuming we have an incoming amplitude profile E in (x, y) with phase profile φ in (x, y), and we want to have an amplitude profile E out (x, y) and a phase profile φ out (x, y), the DMD pattern is a binarized version of with a local "on" fraction given by the slit width from eq. 1, where the scaling factor s is given by s = (min (E in (x, y)/E out (x, y))) −1 . E out is the Fourier transform of the desired shape in the image plane. We compared two methods for the generation of binary holograms from the smooth phase and amplitude profiles: A completely deterministic algorithm, i.e. rounding eq. 2 to either 0 or 1, is prone to artifacts which occur if the effective periodicity of the grating is locally close to an integer such that it matches the periodicity of the mirror array. Every pixel has a grating phase assigned, and this phase determines if the pixel is on or off. If the periods of the DMD mirrors and the holographic pattern match, some phases occur more often than others, thus sampling the grating in a biased way -a bias towards 0 over-represents "on"-pixels while one towards π/2 leads to too many dark pixels. DMD areas with artifacts reduce the ability to define the local amplitude. This effect is enhanced if θ , the angle of the pattern on the DMD, is chosen too small, such that the grating is aligned with the DMD. A randomized binarization that assigns "on" to a pixel with a higher probability the greater the value of eq. 2, can reduce artifacts. Choosing θ = 10 • and employing a randomized algorithm yields good results [22].
While the holographic DMD setup allows for phase and amplitude control, a down-side of this configuration is its low efficiency in terms of laser power. The first non-trivial diffraction order m = ±1 carries only 1/π 2 ≈ 10% of the incoming intensity. This grating sits on top of an inherent secondary grating formed by the individual mirrors, and the reflected light is distributed among several dozens of diffraction orders. Power can be maximized in one diffraction order by fulfilling the blazing condition, i.e. finding a simultaneous solution to both the grating equation and the law of reflection. We were able to get 55% into one diffraction order of the mirror grating, which leaves us with 5.6% in the first order of the displayed pattern. Modulations of the amplitude profile reduce the power of the resulting beam even further to typically 1-2%.

In situ calibration procedure
Optical high-precision applications demand the absence of aberrations in the optical setup. Aberrations manifest themselves as deformations in the phase front of a beam or an image. Similar to the approach in references [17,23], the holographic employment of the DMD allows manipulations on the local phase and can be utilized to correct image defects if their parameters are known.
Aberrations in an imaging system can be characterized using the DMD itself by displaying a sequence of patterns and recording the response in the image plane. Our scheme requires the direct or indirect measurement of the light intensity in the image plane.
A pattern sequence shows diffraction gratings on two small regions of 40 pixels diameter. One is located in the center (reference patch), the other one is moved between measurements to cover the entire area of the DMD (sampling patch, Fig. 2(a)). The grating phase of the sampling patch can be increased in steps of 2π/3, labeled by the index q. The two beams emerging from those regions will overlap in the image plane and form a standing wave interference pattern, whose spatial phase is equal to the phase difference between the two beams ( Fig. 2(b)). The beams converging towards the focal plane at an angle γ can be described by where k = 2π/λ , such that the intensity of the interference pattern becomes Thus, the interference fringes at the origin (x = 0, z = 0) have a contrast of 2ab and a phase of ∆φ , which can be measured using a point detector, such as a photodiode behind a pinhole, a small region on an image sensor, or a single fluorescent atom, ion or solid state emitter. By making three measurements with q = 0, 1, 2, adding 2π/3 to ∆φ each time by changing the phase of the reference patch and hence translating the interference pattern, ab and ∆φ can be determined ( Fig. 2(c)). From the three intensity measurements m q , the phasor [24] can be used to calculate their values: The measured phase is ∆φ mod 2π, but it can be unwrapped reliably if the phase front distortions are smooth. For the phase unwrapping we linearly extrapolate two neighboring data points and add n · 2π, n ∈ Z, to the next point such that the difference to the extrapolated value is minimal (Fig. 2(d)). We oversample the phase in a small region to make sure there cannot be phase gradients > π at the starting point of this unwrapping procedure. The DMD is placed in the Fourier plane of the optical system. Light emerging from the two patches interferes in the image plane. The position of the interference stripes depends on the relative phase between the two beams. (c) Using the phase-shifting capabilities of the holographic DMD, we sample the interference patterns at the same point in space for three different relative phases. From this data, the phase difference between the beams and their relative amplitude can be derived. (d) The measured phase difference is mod 2π (shaded interval). Adding integer multiples of 2π (gray dots), the true, smoothly varying phase profile can be found by unwrapping (blue dots). (e) Phase and amplitude map of the fully calibrated DMD path. Tilt and focus have been removed from the phase map, showing 3λ of astigmatism due to bending of the DMD chip itself. The amplitude map shows the Gaussian envelope of the illuminating beam, which falls to 50% of its maximal value at the edge of the aperture. Knowing the phase and amplitude profile of the beam in the image plane, we can make local modifications to the light phase by changing the grating phase ∆φ (x, y), and to the light amplitude by changing the slit width a(x, y), to match any target profile. This way we can remove aberrations and create arbitrary beam shapes.

Beam shaping performance
In order to benchmark the holographic approach, we illuminate the DMD with a 532 nm laser beam under an angle of 46 • , for which the mirrors act as a blazed grating in the +7 th diffraction order at −22 • . Light in the first diffraction order of the DMD pattern is captured by a 1 m lens and focused onto a 10 µm pinhole, behind which a photodiode with low-noise amplifier measures the light intensity.
We run the calibration sequence to create a phase and amplitude map of the beam (Fig.  2(e)). The phase data is interpolated to individual pixels and applied to eq. 2 to compensate for aberrations. The amplitude map is used to calculate slit widths according to eq. 3 to match the target profile. Even for highly corrugated initial beam profiles, application of the correction produces extremely precise beam shapes. Figure 3(a) shows a beam before and after correction. The corrected beam shows striking agreement with the Gaussian target profile and follows the theoretical prediction down to the noise floor at 10 −4 . Creating a phase map of the corrected beam shows residual phase errors below λ /50. The phase correction eliminates tilt and defocus just like the true optical aberrations, such that the beam is perfectly focused on the pinhole after the process. Conversely, it is also possible to add tilt and defocus purposefully to move the focus  on the image plane or change the position of this plane. All beam profiles in this section are recorded by moving the beam on a grid over the pinhole and thus sampling its local intensity. We independently verified with a CCD camera at several exposure levels that this procedure correctly reproduces the beam profiles. Using the full control over amplitude and phase of the wavefront, extremely clean profiles can be created, including high-order Laguerre-Gaussian beams which require a phase vortex in the center (Fig. 3(b)). Analytic beam profiles and numerically defined shapes (Fig. 4) can be created in this fashion. The limiting factors are the finite resolution of the DMD and the binary nature of the amplitude modulation, which requires blocks of pixels for pseudo-grayscale pictures.

Implementation in a quantum gas microscope
We demonstrate the potential of holographic beam shaping techniques using a quantum gas microscope [25]. Here, tailored beams can be used to address individual atoms in an optical lattice and to control the dynamics of many-body systems through the optical potential. The experimental setup has been described in previous work [18]. In brief, a two-dimensional quantum degenerate gas of 87 Rb resides in a square optical lattice with spacing a = 680 nm at the focus of a high-resolution imaging system with numerical aperture 0.8. The system realizes a Bose-Hubbard system with tunneling matrix element J and on-site interaction U [26]. We obtain single-atom and single-site resolved images of the many-body states using fluorescence imaging in deep optical lattices.
For this application, we use holographically generated beams to create arbitrary potentials on top of the optical lattice. The DMD is illuminated with coherent laser light at λ = 760 nm, which is blue-detuned with respect to the D1 and D2 transition of 87 Rb and generates repulsive conservative optical potentials. The DMD is coupled into the microscope beam path using a dichroic, and is imaged onto the back focal plane of the objective, covering the full NA of 0.8. The effective aperture diameter on the DMD chip is 500 pixels (5.4 mm).
We first calibrate all aberrations in the beam illuminating the DMD, the DMD itself, and the partial beam path using a photodiode as a point detector in an intermediate image plane, as outlined in section 3. In a second step, we calibrate aberrations in the remaining part of the beam path to the atoms, including the high-NA objective. Because it is not possible to directly image the interference pattern or to place a photodiode in the plane of the atoms, we use the atoms themselves to probe aberrations in the microscope. Optimal alignment and focus onto the atoms in the lattice are thus guaranteed.
If used with resonant light and tightly trapped atoms, for example in ion traps, the DMD could be calibrated using the fluorescence rate of one (or several) atoms instead of a photodiode as a intensity point detector. Here, we instead use the response of the atoms to the conservative potential generated by far-detuned light to infer the phase differences between patches in the Fourier plane.
We prepare a weakly interacting superfluid of ∼400 atoms in a shallow two-dimensional lattice of depth 1 E r , where the recoil energy E r /h = 2π × 1240 Hz. We then adiabatically turn on the DMD beam while displaying a hologram of two patches spaced by 1/5 of the aperture (Fig. 5). The atoms experience a repulsive standing-wave pattern of period 3.7 sites and arrange themselves in the minima of the DMD-generated potential. Images of the cloud directly reveal the phase difference between the two hologram patches on the DMD (Fig. 5). By averaging ∼10 images and fitting the integrated density profile, we can determine the relative phase with a typical uncertainty of ±0.2 rad.
We map out the aberrations across the aperture by repeating the experiment with different pairs of patches. The spacing between the patches and hence the spacing of the interference pattern on the atoms remains fixed while the two patches are translated across the Fourier plane in steps of 1/25 of the aperture diameter.
Because the reference patch is translated with the sampling patch, the measured phase difference does not directly give the phase profile along the one-dimensional path. We model the profile with a 6 th order polynomial in the center of mass coordinate x of the patch pair The patches then sample the difference between two shifted polynomials where l is the distance between the two patches. Fitting ∆φ (x) to the measured phase difference between pairs along a cut through the Fourier plane yields the phase profile φ (x) up to an arbitrary offset a 0 . We repeat this procedure along different paths and obtain six phase profile cuts through the Fourier plane (Fig. 5). The phase offset a 0 for each profile is adjusted to connect the cuts to a smooth two-dimensional surface. We interpolate the phase profile across the entire DMD aperture by fitting a two-dimensional surface parameterized by Zernike polynomials to the six phase profiles. We allow Zernike polynomials up to radial order 4 and azimuthal order 3. An example of a fitted phase map is shown in Fig. 5. Typical deviations from an expected flat wavefront after applying the correction are λ /6 peak-to-peak, caused by differences between the six measured phase profiles and the fitted two-dimensional surface. No additional amplitude map is obtained in the calibration to the atoms.

Single-site addressing
The calibrated beam-shaping setup in the quantum gas microscope can be used to generate arbitrary repulsive potentials with single-site resolution. The maximal deliverable power on the atoms is 900 µW, which for our setup corresponds to a Stark shift of V /h = 2π × 45 MHz if focussed onto a single lattice site. Many potential configurations are possible, including box potentials, engineered disorder, or single-particle control of dynamics. Here we demonstrate single-atom addressing and few-body state preparation. The pinned atoms are then loaded back into the optical lattice. By choosing higher orders of the addressing Hermite-Gauss beam, up to six adjacent columns can be prepared.

State initialization
Few-particle Fock states in a lattice can be initialized by "cutting" individual atoms from a low-entropy Mott insulator (Fig. 6). We prepare a Mott insulator with one particle per site in the atomic limit U J in a two-dimensional lattice with V x = V y = 45E r . The DMD then superimposes a beam with Hermite-Gauss profile along in the transverse direction and a flattop profile along the longitudinal direction (length 10 µm). The distance between the peaks of the Hermite-Gauss profile is 930 nm, with a typical peak depth of 25 E r . We switch off the transverse lattice in the presence of a large (40 µm waist) Gaussian, non-interfering deconfinement beam at 760 nm. Only atoms in columns coinciding with the nodes of the Hermite-Gauss beam are retained, while all other atoms are expelled from the system within 40 ms before the transverse lattice is ramped back on (Fig. 6). By choosing high-order Hermite-Gauss beams, we deterministically prepare up to six adjacent columns of atoms (length ≈10 sites). This cutting procedure retains atoms in the rows pinned by the DMD with a fidelity of 99(1)%, and the fidelity of preparing one atom per site is limited by the initialization fidelity of the Mott insulator of typically ≥ 98%.

Full number statistics
Our method of isolating well-defined subsystems from a many-body system can be used to circumvent parity projection inherent to in situ fluorescence imaging [18,19]. A large Mott insulator with up to three atoms per site appears as a ring of concentric bright and dark rings when imaged in situ, corresponding to odd and even occupancy, respectively (Fig. 7). To avoid pairwise atom loss during imaging, we cut one row of atoms from the Mott insulator as above, emptying all other sites. We turn off the DMD addressing beam and release the atoms into one-dimensional tubes transverse to the cut, performing a ∼5 ms free vertical expansion. The atoms delocalize over ∼100 lattice sites during the time of flight, separating particles originating from the same site near the center of the Mott insulator. The atoms are then imaged individually without being lost to parity projection. Summing counts along transverse tubes yields the full number statistics of the one-dimensional cut through the two-dimensional system. Figure 7 shows these results for an n = 3 Mott insulator, directly revealing the wedding cake structure and site-resolved number distributions [25]. The available field of view currently limits the transverse time of flight counting procedure to n ≤ 4 particles per site. Using higher laser powers in the addressing beam and a larger field of view, this technique could be applied to larger occupation numbers. The full number statistics obtained through this procedure contain all the information to construct high-order number correlation functions between all sites within one cut. Such measurements are ideal for characterizing density correlations, for example in one-dimensional impurity problems [27], or to detect entanglement through number fluctuations [28]. In combination with a transverse magnetic field gradient [29], it is possible to obtain fully spin-and number-resolved readout and study, for example, spin-charge separation [30].

Conclusion
We demonstrate a system for holographic beam shaping based on digital micromirror devices which achieves amplitude and phase control. Aberrations in the optical system can be measured and compensated to achieve precise alignment, focus, and diffraction-limited performance. Using the holographic beam shaping method with a quantum gas microscope, we demonstrate the creation of arbitrary potential landscapes and single-site addressing in an optical lattice.
Our technique for aberration compensation is general, and can be of importance in a variety of experiments requiring precise optical wavefront control. Even better performance than demonstrated here can be achieved with DMD devices with more pixels, which are rapidly becoming available.