Optical techniques for Rydberg physics in lattice geometries

We address the technical challenges when performing quantum information experiments with ultracold Rydberg atoms in lattice geometries. We discuss the following key aspects: (i) the coherent manipulation of atomic ground states, (ii) the coherent excitation of Rydberg states, and (iii) spatial addressing of individual lattice sites. We briefly review methods and solutions which have been successfully implemented, and give examples based on our experimental apparatus. This includes an optical phase-locked loop, an intensity and frequency stabilization setup for lasers, and a nematic liquid-crystal spatial light modulator.


Introduction
The field of cold atoms has rapidly developed throughout the recent decades. Single atoms can be trapped, cooled and coherently manipulated. Cold atoms qualify as a possible platform for quantum information [1,2] and simulation experiments [3], in which qubit information needs to be stored in the atomic states, and a mechanism of entanglement has to be introduced. In this context, exciting atoms to high lying Rydberg states has become increasingly studied [1].
Any quantum information platform has to provide two basic properties: Initialize and coherently manipulate qubits, and establish entanglement between qubits. The first is usually addressed by preparing the population in selected states of the atomic ground state manifold. Atomic ground states have a long lifetime and are relatively insensitive to environmental influences, such as magnetic or electric fields [4]. Therefore, qubit information can be coherently stored for up to several seconds [5]. However, when excited to states of high principal quantum number n, called Rydberg states, atoms usually experience stronger environmental influence. Many properties scale strongly with n, for example, the electric dipole moment (∝ n 2 ), van der Waals interaction strength (∝ n 11 ), atomic radius (∝ n 2 ) and lifetime (∝ n 3 ) [6]. As individual addressing of qubits is desirable, the interaction must be strong over distances larger than the size of the addressing laser beam, usually several micrometers. Such interaction strengths between Rydberg atoms can be achieved by using states of high n [7] or by the use of Förster resonances at lower n to increase the interaction strength [8,9]. Rydberg states of such high quantum number possess long lifetimes (> 10 μs) [10], allowing coherent excitation with sufficiently low spontaneous decay rates [11]. Based on those properties, a mechanism for entanglement was introduced for Rydberg atoms: the dipole blockade. The dipole blockade allows two atoms to be entangled, and to perform gate operations on them [12,13].
Several platforms are used to confine cold alkali atoms for subsequent optical manipulation and Rydberg excitation: optical lattices [14,15], dipole traps [16] and magnetic traps [17]. All of those implementations pose individual challenges, and have been the focus of intense scrutiny over the recent decades. However, in the context of Rydberg excitation they share common properties and have to tackle common technical problems. Those can be roughly classified in three categories: (i) manipulating the atomic ground state, (ii) exciting the atoms to a Rydberg state, and (iii) the spatial addressing of Rydberg atoms. Transition frequencies in (i) are usually in the microwave or radio-frequency regime, whereas in (ii) transitions are usually optical. The properties of Rydberg states impose properties on the optical transitions. Their long lifetimes imply narrow natural linewidths, typically in the range of several tens of kHz. Therefore, the frequency stability and linewidth of the excitation lasers are of the utmost importance. Furthermore, the intensity of the lasers should ideally be stable over time, as it not only influences the Rabi frequency of the transition, but also shifts the atomic levels via the AC-Stark effect. These shifts lead to an additional dephasing mechanism [16,18]. Category (iii) requires single atoms or qubits to be manipulated independently by laser light, as well as addressing multiple atoms at the same time.

Ground state atoms and qubits
The hyperfine structure of atoms offers the option to encode qubit information in two different levels of the atomic ground states. These states are long-lived and insensitive to many environmental influences, such as DC-electric fields, thus in principal long coherence times can be achieved. Transitions between the hyperfine-manifolds are magnetic dipole transitions and are usually in the GHz range. Depending on the choice of levels, a qubit transition can be directly driven using a microwave (MW) field [19] or a two-photon process using MW and radio-frequency (RF) fields [5]. Figure 1 shows the ground state Zeeman manifold of 87 Rb with a spacing of ∼6.8 GHz between the hyperfine levels [20]. The transition between |F = 1, m F = 0 → |F = 2, m F = 0 qualifies as a clock transition, as its frequency is insensitive in first order to magnetic field fluctuations. However, they are magnetically non-trappable states and therefore cannot be used in magnetic traps. Another candidate is the |F = 1, m F = −1 → |F = 2, m F = 1 transition between magnetically trappable states, which is less sensitive to magnetic field fluctuations around the so called magic field of B = 3.23 G [5]. As this transition requires a change of Δm F = 2, it can only be achieved in a two-photon process. We drive this transition using a combination of MW and RF fields, where the individual frequencies are detuned from the Zeeman states (see Fig. 1). The atomic population is prepared in the |F = 1, m F = − 1 state using optical pumping [21] prior to the qubit operation.
For single-site addressing of individual traps with a few micrometer spacing, one has to refrain from using (MW) radiation alone and implement an optical or optically  87 Rb ground state, with the candidate qubit states |a and |b , which are less sensitive to magnetic field fluctuations at the magnetic magic field. Possible excitation mechanisms between these states use two photons with MW-and RF-radiation, or an optical Raman transition involving two optical photons at 780 nm. (b) Two-photon excitation to a Rydberg state |r using two off-resonant lasers in a ladder type arrangement. assisted scheme instead [22]. A standard solution for optical transitions between alkali atom ground states is to use a Raman transition, where two individual lasers are detuned from an excited state with their frequency difference equal to the ground state splitting (see Fig. 1). Being coupled off-resonantly to the excited state, the atomic population can be transferred coherently between different hyperfine states. As the ground states are long lived states (∼1 s), the corresponding transition frequency is very narrow, requiring the Raman lasers to be phase coherent over long timescales. Many different schemes have been implemented to achieve a pair of phase coherent lasers. In [23], the current of a diode laser is modulated, producing sidebands with the desired frequency spacing, after which the carrier frequency is filtered out by the use of a cavity, leaving both sidebands for excitation. In [24], the 0th and 1st order of a high bandwidth acousto-optical modulator (AOM) are used as the excitation pair. Another solution is to produce a sideband at the desired frequency by an electrooptical modulator (EOM) and then selectively injection-lock another diode laser to that sideband [25].
Besides those implementations a versatile method exists which is based on extending the concept of phase locking from RF applications to the optical regime: the optical phase-locked loop (OPLL) [26,27]. This concept, which is based on stabilizing the relative phase between two laser sources, has also been introduced for semiconductor [28] and grating stabilized lasers [29]. The starting point is the beat-note signal of two lasers (usually called the "master"-and "slave"-laser), which can be used as an error signal for the slave-laser to track the frequency and phase of the master-laser. If a frequency offset between the lasers is required, as for our ground state transitions, one has to down-mix the beat-note signal with the desired frequency [30]. This is referred to as a heterodyne OPLL.

Raman laser phase lock
Our experimental apparatus aims at driving the |F = 1, m F = − 1 → |F = 2, m F = 1 transition around the magnetic magic field value. The setup is based on a heterodyne OPLL using a MW generator at 6.8 GHz. We present the optical and electronic components together with a discussion of the phase lock performance. The optical phase lock of the master-and slave-laser at 780 nm. The master-laser is frequency stabilized using polarization spectroscopy in a vapor cell. The beat-note signal between the two lasers created at a high-bandwidth photo diode is down-mixed using an analog mixer and a microwave (MW) source. A second mixer creates an error signal using a radio-frequency (RF) generator at 25 MHz. The error signal is processed by a commercial PID-controller and fed back to the current modulation input of the slave-laser. Additionally, the error signal is sent via an integral-controller to the piezo element of the laser-cavity for the frequency locking of the slave-laser (not shown).

Phase lock setup
The optical and electronic setup for phase locking of two commercial diode lasers at 780 nm (DL100, Toptica) is shown in Fig. 2. The optical components mainly serve to generate a heterodyne beat signal of the two diode lasers around 6.8 GHz, where we coarsely adjust the respective laser wavelengths using a commercial wavemeter. The master-laser is frequency locked to a 85 Rb transition using the dispersive signal gained from polarization spectroscopy in a rubidium-vapor cell [31]. This ensures a stable detuning from the intermediate transition when driving the Raman transition in 87 Rb. We choose polarization spectroscopy instead of frequency-modulation spectroscopy [32], as the necessary frequency sidebands would interfere with the phase lock. Around 20% of the laser light intensity of each laser is used to generate the beat signal on a high-bandwidth photo diode. The rest of the light is overlapped on a non-polarizing beamsplitter and passes through an AOM before being coupled into an optical fiber going to the experiment. The AOM is used to generate square laser pulses down to approximately 50 ns width.
The beat signal is first amplified and then down-mixed at 6.8 GHz using an analog mixer. The 6.8 GHz signal is generated by a commercial MW-generator, which has been modified such that it is internally phase locked to a commercial, computercontrolled RF-generator. This allows for steering of the MW-frequency with sub-Hz precision. The down-mixed signal is amplified using an RF-amplifier, and split into two parts. One part is compared to a 25 MHz frequency reference with a digital phase/frequency discriminator (AD9901, Analog Devices), whose output is low-pass filtered to yield an error signal proportional to the phase difference between signal and reference. We use a low pass filter with a cutoff-frequency of 10 kHz, and feed the resulting error signal to the cavity piezo in the slave-laser using an integral-controller.
Thereby we achieve a frequency lock of the slave-laser to the master-laser at the desired offset frequency. The other part of the down-mixed signal is again mixed with the 25 MHz reference to obtain an error signal, which is processed by a commercial high-bandwidth PID-controller (mFalc, TOPTICA) and fed back to the current modulation input of the slave-laser. This high bandwidth feedback achieves the phase locking.
Part of the heterodyne beat signal is split off with a 20 dB coupler before the down-mixing and subsequently probed with a spectrum analyzer. This allows for a measurement of the absolute frequency offset between the lasers. Before the second down-mixing with the 25 MHz reference, another part of the signal is split off and analyzed by a spectrum analyzer for simultaneous control of the phase lock performance. As all the frequency sources in this setup, including the spectrum analyzer, are phase-locked to a commercial 10 MHz rubidium clock, we can get an accurate account of the phase-lock absolute frequency.
Any signal delay in the feedback loops leads to a restriction of the achievable feedback bandwidth [33]. The two main sources of signal delay are the optical path length of the beat setup and the cable length of the involved electronics. In our setup we try to minimize both lengths, achieving around one meter each. This results in a signal delay of approximately 5 ns.

Phase lock performance
As a rule of thumb, the bandwidth of the feedback system has to exceed the combined linewidth of the lasers, which we find to be around 1.5 MHz from the beat signal of the frequency lock in Fig. 3(b). A fixed limit to the bandwidth is introduced by the PID-Controller (measured bandwidth of 10 MHz) and the signal delay. In order to properly evaluate the feedback system's properties, and to subsequently choose proper loop filter settings [34], we have to know the transfer function of the involved components. We use the methods which are described in more detail in Sects. 3.1 and 3.2.2 to evaluate the system's response to a small sinusoidal input on the laser current modulation. To do so, the frequency lock is engaged and the phase-discriminator is used with a higher cutoff-frequency to produce an error signal, which is monitored with a spectrum analyzer. As explained in Sect. 3.2.2, when we solely apply feedback to the piezo, the system will only stay part of the time on the linear slope of the error signal. This indirectly dampens the response. To calibrate the overall magnitude we measure the DC response of the system, which can be inferred from the frequency shifts of the laser due to DC current changes and the properties of the error signal. Initially we achieve only a poor phase lock (see inset in Fig. 3(b)), with insufficient noise suppression and strong spikes resulting from ringing effects in the feedback loop. This can be understood from the frequency response measurement shown in Fig. 3(a), which reveals a sharp drop at frequencies of approximately 10 4 Hz effectively reducing the feedback bandwidth. The reason for achieving phase lock at all is that the PID-Controller partially compensates with increasing gain at high frequencies.
We use this information to improve the bandwidth of our feedback loop, by removing active components with insufficient bandwidth and significantly reducing the cable lengths and the optical beam path. Introducing additional MW-and RF-amplifiers with low noise figure enhances the open-loop gain and improves the signal-to-noise ratio of the error signal. With those measures the bandwidth is sufficiently increased, such that we achieve a phase-lock with strong noise suppression ( Fig. 3(b)), using mostly the integral and proportional part of the PID-controller to assure very high gain at frequencies of up several MHz. The central feature of the beat spectrum has a linewidth limited by the resolution of the spectrum analyzer (10 Hz), and more than 40 dB difference in magnitude to the noise background. To further validate the quality of the phase-lock, we measure the holding and acquisition range. In both cases, we switch off the frequency locking. The holding range is estimated by changing the laser frequency with the piezo element, and observing at which frequency the lock is lost. The acquisition range is measured by setting the slave-laser frequency close to the desired frequency, engaging the feedback and noting the frequency at which the lock is acquired. In both cases we get a range of more than 10 MHz, verifying the good loop performance. In general, the frequency lock does not contribute to the phase noise reduction, but it enlarges the holding and acquisition range to several 100 MHz, which is indispensable for long term stability.

Conclusion
In conclusion, the phase lock provides strong noise suppression and long term stability. Additionally, the offset-frequency can be tuned with sub-Hz precision using the external frequency reference as observed with the spectrum analyzer on the beat signal. The quality of the phase lock proves sufficient to perform transfer of atomic population in our cold atom experiment. Care must be taken in order to ensure sufficient bandwidth in the feedback loop. For an even longer coherence time between the lasers the signal delay must be reduced further, which can be achieved by integrating all electronic components on a PCB and using micro-optics.

Technical challenges of Rydberg excitation
Ideally, a cold atom or quantum optics experiment delivers monochromatic light with fixed absolute frequency and reproducible intensity. If a system deviates from those properties it will impair the experimental results. For example, in the field of Rydberg physics and quantum information, deviations will lower the fidelity of quantum gates [12,35]. The necessary accuracy is governed by the involved atomic levels. Rydberg states of alkali atoms have a lifetime of tens to hundreds of μs [6,36], corresponding to natural linewidths down to 10 kHz. Schemes which excite atoms to Rydberg states in one-, two-or multi-photon processes [1,37] have to provide an absolute and relative frequency accuracy of the order of the natural linewidth of the Rydberg states. Thus, sources of laser light have to be stabilized to that order of magnitude in absolute frequency and linewidth. This precision can usually not be achieved by locking to atomic spectra [32,38], but necessitates the use of external frequency references. Changes in the laser light intensity can induce changes in the effective Rabi frequency, and thus, for example, lower the contrast in measurements, such as those performed in [11]. Furthermore, AC-Stark shifts scale with the laser light intensity. Fluctuations in intensity will therefore induce shifts of the atomic levels, which can be influential in dipole traps or during Rydberg excitation [18], leading to additional decoherence. Sources of intensity fluctuations are numerous: from the laser source itself, laser beam pointing as well as thermal and acoustic noise in optical fibers. Thus, in some cases active stabilization of the laser light intensity is necessary.

Intensity stabilization
Intensity noise of laser light is introduced by several sources, such as optical fibers, which are subjected to thermal and acoustic noise. This noise also introduces fluctuations in the phase of the laser light, which needs to be compensated in order to deliver laser linewidths down to a few Hz through optical fibers [39]. In the context of Rydberg excitation this is normally not required as the bandwidth of those noise sources is lower than the natural linewidth of Rydberg atomic levels. Standard methods to stabilize the intensity of laser beams are either passive, such as mechanical rigidity of optical mounts, or active, such as deflecting a variable part of the light by an acousto-optical modulator (AOM) [40,41] or changing the transmittance of an electro-optical modulator (EOM) [42]. For laser diodes, the current of the diode can be modulated to achieve intensity stabilization. However, this is accompanied by unwanted changes in frequency.
Here we present a setup based on an AOM to stabilize the laser light intensity. We also briefly introduce elements of control theory. They are necessary to understand the principles discussed in Sects. 2.1.2 and 3.2, and can easily be evaluated for this system. Figure 4(a) shows the intensity stabilization setup. A variable fraction of the light is deflected into the first order of an AOM and blocked while the zeroth order is coupled into an optical fiber. After the fiber, part of the beam intensity is guided to a photo diode by a beam sampler, and compared to a reference level. The resulting error signal is processed by a PID-Controller and fed back to a voltage-variable-attenuator, which modifies the RF-Power driving the AOM, thereby stabilizing the light intensity in the zeroth order. This setup is an electronic negative feedback system. The characteristic curve of control voltage against intensity is locally sufficiently linear to ensure that linear control theory can be applied. For the description of our system and the subsequent analysis we follow [43]. A simple representation of our system in terms of control theory is shown in Fig. 4(b). Each element (VVA: voltage-variable attenuator, PD: photo diode, PID: PID-Controller) can be described by an individual transfer function: as their respective unit conversion (V: Volts, W: Watt). Usually, the system under scrutiny is split into a fixed element, referred to as the plant, and an element whose properties can be changed to optimize the feedback system, here the PID-controller. We can ascribe a transfer function to the plant, X Plant = X VVA · X AOM · X PD , which can be measured. For our system, the open-loop transfer function is given as X OL = X Plant · X PID . The system comprises several noise sources, which can be added to the feedback system at their respective position (compare Fig. 4(b)) with their noise spectral density. Here we identify electronic noise from the controller (S contr [V 2 /Hz]), electronic noise from the RF-source, the VVA and the amplifier (S el [W 2 /Hz]), intensity noise from the laser and the fiber (S i [W 2 /Hz]) and noise from the photo detector (S det [W 2 /Hz]). As we are interested in reducing the intensity noise, we want to know the noise spectral density (S out ) of the closed loop. This can be expressed, following the treatment of noise sources in [43], as If we assume a high open loop gain, X OL 1, which is necessary to suppress all the additional noise sources, this expression can be approximated as Consequently, with optimal loop performance, the closed loop intensity noise is just limited by the noise performance of the photo detector. We measure the noise in between photo detector and PID-controller while blocking the light before the photo diode. The measured white noise part of the noise spectrum is consistent with the specified photo detector noise. To ensure that both efficient noise reduction and closed loop stability can be achieved by properly adjusting the PID-Controller settings, the plant transfer function has to be known.  can easily be retrieved from a frequency response measurement. We apply a small sinusoidal signal to the VVA with varying frequency, and measure amplitude and phase of the signal after the photo detector. From that we can retrieve the Bode plot of the plant transfer function shown in Fig. 5. The measured frequency response can be well described in terms of a second order system (similar to a damped mechanical oscillator) with a transfer function with fitted parameters k = 0.14, η = 0.6 and eigenfrequency ω n = 1.31 · 10 5 rad/s. We can use this theoretical description to find optimal PID-controller settings. Additionally, we need to convert the controller-settings to a transfer function model of type X PID (s) = G p + 1 Tis (we neglect the differential part in our setup), based on a frequency response measurement from which we extract the proportional gain G p and the integral time constant T i . Now that we have a theoretical description for X plant and X PID , we can calculate the open loop transfer function (for unity feedback) X OL = X plant · X PID and the closed loop transfer function X OL /(1 + X OL ). Furthermore, we calculate the system response to a unit step input and retrieve the root locus plot with the proportional gain G p as a free parameter.
We measure the noise in the closed loop system after the photo detector using a spectrum analyzer which can measure close to DC signals. From all measurements we subtract the signal which is obtained when the light is blocked. The measured spectrum of the intensity noise, obtained without closing the loop, is shown in Fig. 6(a). In the subsequent measurements we close the loop and apply a fixed integral and varying proportional gain. The plot reveals the influence of the feedback system on the intensity noise. For very low proportional gain there is almost no suppression of noise visible. If the gain is increased to 75, there is significant noise reduction over the whole frequency range. Increasing the gain even further leads to a noise increase at high frequencies. The noise at 50 Hz and odd multiples stems from ground loops introduced by differing ground levels between two different laboratories, and can, in principle, be avoided. The feedback system cannot compensate for the uncorrelated ground loop noise. The measurements match nicely to the theoretical evaluation of the loop performance. In Fig. 6  we demand X OL 1. The other two gain settings yield sufficient open-loop gain for noise suppression, which is also evident in the measurement. The increased noise at G p = 500 can be understood by looking at the system's unit step response in Fig. 6(c). For high proportional gain the system is highly oscillatory at the eigenfrequency ω n of the second-order system, which also shows up as a gain increase in the closed loop at high frequencies. The root locus plot shows that the closed loop poles are moved parallel to the imaginary axis when increasing G p , rendering the system more oscillatory and undamped. Thus, this example illustrates the trade off between sufficient gain for noise suppression and the stability of the feedback system. It should be mentioned that the intensity stabilization mechanism might interfere with laser pulse generation if the bandwidth of both overlaps. In this case, a hybrid solution might be preferable, for example, an AOM for intensity stabilization and an EOM after the optical fiber for pulse generation.

Frequency stabilization
There are a multitude of different methods to stabilize a laser source to an external reference in the frequency domain: locking to a frequency comb [44][45][46], using transfer cavity locking [47], and, if a stable external laser source is available, beat note locking [48] or injection locking [49]. In many applications optical reference cavities are used [50,51], as they provide a robust and relatively simple way of reducing the laser linewidth to the Hz [52] and even sub-Hz regime [53]. As the locked laser source inherits the frequency stability of that cavity, great care must be taken to limit the frequency drift of the reference. A crucial ingredient is that the material used for mounting the cavity mirrors has a low thermal expansion coefficient [54,55], as any change in cavity length changes the cavity modes' frequencies. Furthermore, the cavity is usually mounted in vacuum using vibration-insensitive components, activelytemperature stabilized and passively temperature shielded. All these measures are meant to reduce environmental influences on the cavity. As mentioned before, Rydberg excitation requires linewidths of a few kHz, which mitigates the requirements for the reference cavity compared to systems used for optical clocks [52]. Those systems need cavities with high optical finesse (usually > 10 5 ), intricate solutions for fluctuations induced by vibrations [56,57] and are even limited by thermodynamical fluctuations in the mirror coatings [58].
Our external reference is a commercial Fabry-Pérot cavity (Stable Laser Systems) with a finesse of about 2 × 10 4 and free spectral range of 1.5 GHz, which is temperature stabilized around a point of zero thermal expansion. We stabilize two diode lasers onto the cavity using a sideband-locking scheme [59], achieving linewidths of a few kHz. We measure the absolute frequency to shifts less than 1 MHz within one month. This proves sufficient for the excitation of Rydberg atoms. We present an overview of the optical setup, which is used to stabilize commercial diode lasers, to analyze their linewidths and to get an absolute frequency calibration from spectroscopy. We explain the methods involved and give a brief review about similar approaches.

Optical setup
The optical setup is sketched in Fig. 7, consisting of two commercial diode lasers at 780 nm and 960 nm wavelength (DL Pro and TA-SHG Pro, Toptica), the latter of which is frequency doubled to 480 nm. The output powers are 60 mW and 450 mW respectively and the free-running linewidth is roughly 200 kHz. These two lasers are used for the two-photon excitation scheme of 87 Rb as depicted in Fig. 1(b). For both lasers part of the light is guided into a fiber-coupled EOM with high bandwidth (PPM785 and PPM960, Jenoptik), which introduces sidebands through phase modulation of the incoming light. After traveling the fiber the light is out-coupled into the high-finesse cavity passing through mode-coupling optics (a combination of telescopes and an imaging lens). The Gaussian beam profile of the light after the fiber helps to efficiently couple the light to the Gaussian TEM 00 mode of the cavity. For the design of our cavity, consisting of a flat and convex mirror, the best mode matching is achieved when the minimal waist of the Gaussian beam matches the waist of the cavity mode at the entrance mirror [60]. With this arrangement our coupling efficiency is around 80%, as measured by the drop of the reflected signal when scanning across the cavity resonance. A combination of dichroic optics and optical bandpass filters ensures that the different wavelengths can be coupled simultaneously into the cavity, whose mirrors are coated for these two wavelengths. Light reflected from the cavity is detected by a fast photo diode, whereas transmitted light is guided to a slow photo diode and a camera for spatial mode investigation. The bandpass filter prevents light from one wavelength leaking into the photo diode dedicated to the other, which would be detrimental for the subsequent error signal generation.
Another part of the light at these two wavelengths is fiber coupled to the selfheterodyne fiber beat setup for analyzing the linewidths (see Sect. 3.2.4), which is built with components supporting both wavelengths. Independent examination of the two lasers' linewidth can be achieved by exchanging the input fibers. The light is split into two parts, the first of which is guided to an AOM in double-pass configuration, which was chosen over a single-pass configuration to make the setup independent of the wavelength. The AOM is required in order to shift the laser beat signal away from DC. The other part is coupled into a 12 km long telecommunication fiber, which strongly attenuates the light intensity at the near-infrared wavelengths, thus requiring high input powers of tens of mW to achieve μW output powers. The out-coupled light is overlapped with the light from the AOM on a photo detector, yielding a beat signal.
The rest of the light is unaffected by the modifications made in these two setups (e.g. the sidebands introduced in the EOMs) and is used for Rydberg excitation in the main experiment. A small fraction of the light is branched off in order to simultaneously monitor the laser frequency on a commercial wavemeter, as well as to perform Doppler free absorption spectroscopy at 780 nm in a rubidium vapor cell. This allows us to have an in-situ analysis of the wavelength while performing experiments. Additionally, the light can be switched to enter another rubidium vapor cell in a counter-propagating arrangement, allowing for EIT measurements as described in Sect. 3.2.3.

Cavity locking
We stabilize our laser frequency to the high-finesse cavity using the Pound-Drever-Hall (PDH) locking scheme [61,62], which uses the response of the cavity in reflection [63] as recorded by the photo diodes in Fig. 7. To obtain the typical error signal of the PDH, sidebands at 2 MHz are introduced onto the light by means of the fiber-coupled EOM. The signal of the photo diodes is demodulated with the sideband frequency using an analog mixer, yielding the error signal. The modulation depth of the sidebands is tuned to increase the error signal slope at the zero crossing. The sideband frequency is chosen to allow for broad non-zero frequency ranges around the slope, which assist in acquiring the lock. If we stabilize our laser to the cavity modes, which are fixed in frequency space (besides thermal drifts etc.), we naturally encounter the problem that those frequencies do most likely not match the atomic transition frequencies (the free spectral range (FSR) of the cavity is 1.5 GHz). Several solutions to this problem exist. One method is to change the cavity modes' frequency by changing the cavity mirror spacing using piezo-electric transducers. This solution usually entails reduced mechanical rigidity and increased sensitivity to thermal fluctuations. Another approach is to use high bandwidth AOMs or cascades of AOMs to shift the laser frequency, introducing the problem of beam-pointing and reduced laser intensity. Therefore, we choose to use the offset sideband-locking scheme as suggested in [59], which offers free tunability of the laser frequency and similar noise characteristics as the PDH locking scheme. The basic principle is that instead of locking the carrier frequency of the laser, we use sidebands introduced via the phase modulation of the EOM. By changing the frequency of those sidebands we can, in principle, address any desired frequency, if the bandwidth is sufficient to cover at least half the FSR of the cavity. In practice a higher bandwidth is beneficial. For ideal phase modulation, we optimize the modulation depth to get maximum power in the first order sidebands, which we use for locking. In order to achieve sideband locking with the PDH mechanisms we combine the frequency of the locking sidebands and the frequency of the PDH sidebands using a combiner, and send both to the EOM. This allows for creating an error signal at the offset sideband frequency.
Similar to the analysis in Sect. 3.1, we need to investigate the feedback system for optimal stabilization and noise suppression. The main source of noise is the laser linewidth, which is translated into voltage noise by the PDH mechanism. Figure 8(b) shows a simplified representation of our feedback systems. For simplifying the representation, the PDH module in the representation comprises several independent components like the cavity, photo diodes and the electronics of the demodulation. All of those components have an individual transfer function, which we do not analyze independently for simplicity. The error signal is compared to 0 V for a perfectly symmetric error signal and the difference signal is fed to a commercial digital PIDcontroller (Digilock, Toptica), where the error signal is split into two independent PID-modules. The integral component of one module is used to control the voltage of the laser piezo element to compensate for long term drifts in laser frequency. The bandwidth here is limited to a few 100 Hz. The other module is used to control the laser frequency through the modulation input of the laser after 26 dB of attenuation, which converts a change in voltage into a change of laser current and thereby frequency. Due to the higher bandwidth of several MHz, this part is responsible for the linewidth reduction of the laser. At the input of the current module, we engage a third-order bandpass filter with a 2 MHz cutoff-frequency. All those elements are described by the transfer functions X PID , X 26 dB , X Mod In , X Laser and X PDH with As shown in Sect. 3.1, a high open loop gain suppresses the noise in the closed loop system, and thereby reduces the laser linewidth. To achieve a high open loop gain for the whole bandwidth of laser noise, we need to know the plant transfer function X plant = X 26 dB · X Mod In · X Laser · X PDH to adjust the PID parameters accordingly. However, a frequency response measurement similar to the one for the intensity stabilization is not straightforward to implement, as the system does not reside in the linear part of the PDH error signal without applying feedback. In principle, the response of each independent component can be measured, for example the frequency modulation (FM) response of the laser to the laser current, or the characteristics of the PDH module. This adds additional complexity, so we choose for a simpler approach instead. We engage either the piezo-feedback or the I-Part of the current feedback, which results in the system oscillating back and forth around the slope of the error signal, as the feedback is too weak to ensure tight locking. Then we introduce a small sinusoidal signal, add it to the error signal and observe the amplitude of the response with the built-in network analyzer of the PID-controller. The measurement for the 780 nm-laser is shown in Fig. 8(a), which clearly features the bandwidth of the relative feedback mechanisms as suppression of the signal at low frequencies. We compare it with a theoretical prediction combining the FM-response of the laser described by the absolute value of as an empirical model for the carrier-induced and thermal FM [64][65][66] (C and ω c are fit parameters, the parameter b in [66] was chosen to be 3), and the transfer function of the third order bandpass filter at 2 MHz. The model accurately describes the system response in the range where the signal is not affected by the relative feedback mechanism. Furthermore, we retrieve the DC-response of our system by calibrating the laser frequency shift at DC-inputs to the current modulation and by measuring the slope of the error signal. The measured DC-gain of around 40 dB is consistent with the model prediction. The high gain of the plant transfer function explains why the laser can be locked by just feeding back the error signal to the laser current, without involving any PID-controller. Additionally, we calibrate the PID-module settings with a frequency response measurement, converting it to the standard form X PID (s) = G p + 1 Tis + T d s. Now we can calculate the open-loop transfer function X OL = X PID · X plant for our locking parameters. The optimal set of parameters can be retrieved empirically from the measurements in Sect. 3.2.4, yielding a laser linewidth of less than 10 kHz. For this set of parameters the open-loop transfer function with the respective phase and gain margins is plotted in Fig. 9. From the plot, we can understand the loop's ability to efficiently suppress noise. A Fourier transform analysis of the error signal shows that the laser frequency noise is limited in bandwidth to 500 kHz, with dominant contributions at low frequencies. High open loop gain at those low frequencies is necessary to suppress the noise and is provided by the I-Part of the feedback, which shows up as the −20 dB linear slope per decade at low frequencies. The third order bandpass filter at 2 MHz allows for sufficient noise suppression at low frequencies, and filters uncorrelated high frequency noise. The steep slope of the filter provides sufficient phase margin despite high overall gain. If we increase the gain even further, the small gain margin vanishes completely, and the system becomes oscillatory, which is clearly evident on the error signal and the heterodyne-fiber beat measurement.

Absolute frequency calibration
An important aspect of optical experiments is to get an absolute frequency reference for spectroscopic experiments. Several methods exist, for example, referring the laser frequency to a frequency comb [67], or using a commercial wavemeter. Commercial wavemeters offer a relative accuracy up to a few tens of MHz, which usually requires frequent recalibration or the use of built-in reference lasers. Even if the laser frequency is known with sufficient accuracy, the theoretical prediction of the atomic transition frequency might not match that accuracy. A simple way to find atomic transition frequencies for cold atom experiments is to use spectroscopy of room temperature vapor cells, as shown in Fig. 7. First, we perform Doppler free saturation spectroscopy with the 780 nm laser, to find the 5s 1/2 → 5p 3/2 transition frequencies of 87 Rb. Then, we fix a sideband of the offset-locking scheme such that the laser frequency matches the transition frequency. We are left with finding the 480 nm-laser frequencies corresponding to 5p 3/2 → ns 1/2 and nd 3/2,5/2 . A common scheme is to use electromagnetically-induced transparency (EIT) [68] with two on-resonant lasers in a ladder-type excitation scheme. EIT spectroscopy can yield sub-MHz precision of Rydberg transition frequencies [69], and can also be used to stabilize the 480 nm laser [38]. Our setup is similar to the one described in [70], featuring two counter-propagating laser beams in a vapor-cell at 480 nm and 780 nm. The vapor-cell is magnetically shielded using mu-metal to minimize systematic deviations due to Zeeman splitting of atomic lines. The transmitted 780 nm laser light is recorded with a photo diode, with maximal absorption if there is no 480 nm light present. If the frequency of the 480 nm laser is scanned such that it matches the Rydberg transition, the medium is rendered partially transparent, increasing the transmitted 780 nm light intensity. We scan the laser frequency by sweeping the sidebands of the offset-locking scheme. If the slew rate of that sweep is sufficiently smaller than the bandwidth of the locking system, the locked laser follows the sideband frequency smoothly. The signal-to-noise ratio is largely improved by chopping the 480 nm light and using lock-in detection, yielding Rydberg spectra as shown for the 22s 1/2 state in Fig. 10, with sufficient resolution to distinguish between different Rydberg hyperfine-states. We fit our EIT spectrum with the analytical expression found in [71] (see red line in Fig. 10), with a fitting error usually a few tens of kHz for the transition frequency.
In conclusion, EIT measurements in a room-temperature vapor cell allow for sub-MHz accuracy in measuring the transition frequency of Rydberg states. If the onresonance frequency of both lasers is known from such a measurement, a well defined detuning can be introduced via the offset-locking scheme allowing for two-photon off-resonant excitation as shown in Fig. 1(b).

Linewidth determination
After introducing the cavity locking scheme we need to verify that the achieved reduction in linewidth is sufficient for the particular application, in our case offresonant Rydberg excitation, requiring linewidths of around 10 kHz. In principle, the laser linewidth can be deduced from the spectral distribution of the closed-loop error signal [72]. We refrain from that approach as we find electronic noise uncorrelated to the laser linewidth in our error signal, most likely originating from leakage of frequencies of the offset-locking into the demodulation of the PDH setup. If two identical laser sources (e.g. two lasers locked to the same reference cavity) or an independent narrowlinewidth reference laser is present, the linewidth can be deduced from a heterodyne beat measurement of those laser sources [73]. Furthermore, the laser linewidth can be inferred from a time-domain measurement of the Allan deviation of the frequency [74].  As we do not have two identical laser sources, and also want to optimize our locksettings in-situ, we chose a self-heterodyne measurement (see Fig. 7 and Sect. 3.2.1 for the optical setup), as first introduced in [75].
As in the case of a heterodyne beat measurement the linewidth is inferred from a beat signal. The delayed light traveling through a long fiber acts as the second laser source. To visualize that idea, one can regard the delayed light as an independent, uncorrelated laser source if the delay time of the light τ 0 in the fiber exceeds the coherence time τ coh of the laser. In this regime (τ 0 > τ coh ) the resulting beat linewidth can be converted into the laser linewidth by correcting with a factor of 1/2 or 1/ √ 2 for the case of Lorentzian or Gaussian linewidth. An example for a beat signal in that regime can be found in Fig. 11(a), for the case of the free running laser at 780 nm and the same laser with feedback. The resulting free running linewidth is measured to be around 230 kHz for a Lorentzian lineshape, consistent with the specifications of that laser. The feedback system yields a significant reduction in laser linewidth, clearly evident in the beat signal. If we optimize our locking parameters such that the resulting laser linewidth drops beneath the inverse delay time 1/τ 0 ≈ 16 kHz, the simple approximation for the laser linewidth obtained from the beat signal breaks down. This case is shown in Fig. 11(b) for the 960 nm laser, where the spectrum features equidistantly spaced fringes, that become more pronounced if τ coh τ 0 . With the assumption that only white noise is present in the phase fluctuations of the laser, yielding Lorentzian line shapes, one can find an analytical expression for the spectral noise distribution in the fiber beat signal [76]: where f 0 is the modulating frequency of the AOM and Δf is the laser linewidth. It should be noted that in reality there are additional noise sources on the laser, such as 1/f noise at low frequencies. In such cases the relation between noise and linewidth is more complicated [77], but in principle, assuming a certain noise distribution, the linewidth can also be inferred from the self-heterodyne measurement [78]. However, there is acoustic and electronic noise in the self-heterodyne beat setup itself, especially acoustic noise in the long fiber. Thus, measuring linewidths less than 1 kHz is not feasible in this setup. We restrict ourselves to the analytical expression in fitting the data. We use τ 0 , Δf and an overall offset as free parameters, and exclude frequencies within −30 to 30 kHz to retrieve acceptable results. The fit yields a realistic fiber delay time of τ 0 = 65 μs, a linewidth of Δf = 2.3 kHz and reproduces the features of the spectrum. From the reasoning above it is clear that this estimate of the linewidth has limited accuracy. However, if we also take into account that the spectral fringes are strongly pronounced, as predicted by theory for Δf 16 kHz, we can safely assume to have a linewidth of less than 10 kHz, matching the requirements.

Conclusion
In conclusion, we achieve absolute frequency stabilization and linewidth reduction down to a few kHz of two diode lasers, sufficient for off-resonant Rydberg excitation as observed in our cold atom experiment. The decrease in linewidth is also visible in the EIT measurements shown in Fig. 10, yielding better spectral resolution compared to similar measurements with free running lasers. We can analyse the linewidth with the self-heterodyne technique presented in Sect. 3.2.4, which gives reasonable results for the linewidths of interest. Furthermore, due to the sideband locking scheme, we can control the absolute frequency of the laser with great freedom and accuracy. The EIT measurements in the room-temperature vapor provide a efficient way to reference the laser frequency to the atomic spectrum.

Spatial addressing
We refer to spatial addressing as the ability of shaping the spatial intensity distribution of laser light, for the purpose of creating trapping geometries or to selectively excite atoms. There exists a multitude of different realizations, either static or dynamic: dipole trap arrays generated by microlens arrays [79], beam steering with acousto-optical modulators [23], coupling atoms to optical waveguides [80], using digital mirror devices (DMDs) in a binary amplitude modulation [81,82] or holographic mode [83,84], projecting a binary mask [85], or using liquid-crystal spatial light modulators (SLM) [86,87].
Spatial light modulators in general describe devices which modulate amplitude, phase or polarization of light, based on micro-electromechanical systems (MEMS), diffractive optical elements (DOE) or liquid crystal technology [88,89]. DMDs, belonging to the MEMS, are a versatile tool for light modulation, also in commercial applications [90,91]. They offer high update rates (in the kHz range) and high optical resolution, up to 10 6 pixels. Liquid crystal type spatial light modulators have lower update rates of up to 60 Hz, but similar resolution, a high dynamical range and higher efficiency. Our experiment aims at spatial addressing of atoms in a magnetic lattice, both for Raman type transitions and Rydberg excitation. This requires to change the spatial excitation pattern once per experimental cycle (∼20 s). Therefore we do not depend on high update rates. Rydberg excitation however depends on high laser power at 480 nm in the two-photon excitation scheme, thus high efficiency of the light shaping is preferred. As a consequence we opt for a SLM based solution. In general, if conversion efficiency is more important than fast update rates, like for dipole trap arrays [92] or Rydberg excitation [86], SLM devices have become increasingly popular in the field of cold atoms for their versatility and ease of operation.
Due to intensive research for scientific and commercial applications [88,93], SLMs and their working principle are well understood. Usually, the beam shaping is done by means of geometric beam shaping [94] or the iterative Fourier transform algorithm (IFTA) [95]. Geometric beam shaping is based on dividing the SLM into independent areas of locally different phase gradients for beam steering. This method is simple to implement, but suffers from low efficiency due to the fact that just part of the SLM contributes to a given point in the image plane. The IFTA method utilizes the fact that for light originating from the SLM and being imaged by a lens, the light fields at the SLM and focal plane of the lens are related by a Fourier transform in the Fresnel approximation. For a review of these two methods and an efficient implementation of the IFTA method, see [96].
For the excitation or confinement of atoms in lattice geometries the SLM can be used to create diffraction limited spot patterns. In conjunction with high numerical aperture (NA) lenses, great care has to be taken to produce reproducible spot patterns of homogeneous intensity. As recently shown in [92], it requires compensation of the non-flat surface of the SLM ("factory correction") and the aberrations of the imaging system (aberration correction), as well as introducing an in-situ feedback system for the spot intensity. This work shows that these corrections can be obtained by solely using the SLM device in interferometric measurements. Additionally, we point out the general procedure of multiplexing the SLM for two wavelengths, 480 nm and 780 nm.

The spatial light modulator
Aiming at high diffraction efficiency, we choose for a parallel-aligned nematic SLM, as this type offers a high fill factor of up to 90% [87]. The fill factor refers to the active, voltage controlled part of the pixelated SLM surface. Any light hitting the SLM at the inter-pixel space leaves the device undeflected. Usually this part of the light is referred to as the "zeroth order" deflection, and cannot be used for beam-steering purposes. Our SLM (HoloEye Photonics AG, PLUTO-BB HES 6010 BB) has a fill factor of 87%, which yields a theoretical diffraction efficiency of (fill factor) 2 = 76%, which we indeed find experimentally. The SLM is a phase-only modulator with 1920 × 1080 pixels, operating in the reflective mode, such that the light passes the active area twice and the modulation depth is twice as large as for transmission. The working principle is based on electrically changing the optical properties of an anisotropic liquid-crystal [97]. By controlling the applied voltage, the molecular alignment can be altered from parallel to perpendicular with reference to the display [98,99]. This rearrangement leads to a change in the refractive index and introduces a phase-shift on the incident light. As the voltage of each pixel can be modified independently, the SLM imprints a two-dimensional phase pattern φ(x, y) onto the reflected light. The modulation depth, meaning the maximal achievable phase shift, is usually a few multiples of 2π. Therefore, phase information φ(x, y) is usually sent as φ(x, y) mod 2π to the device.
To ensure optimal phase modulation with minimal amplitude modulation, the polarization of the incoming light has to be aligned with the crystal axis. An advantage of the parallel-aligned nematic SLM is that they do not alter the polarization state of the reflected light, which is indispensable in quantum optics experiments.

2804
The European Physical Journal Special Topics Fig. 12. Optical setup of the spatial light modulator (SLM, DM: dichroic mirror). Laser light at 480 nm (blue) and 780 nm (red) are coupled out of an optical fiber and expanded to match half the SLM screen in size. After leaving the SLM, the beams are separated at a DM, and enlarged by another factor of two, such that they match the diameter of the high NA imaging lens. The beams are overlapped again at another DM and focused by the lens. The intensity distribution in the focal plane is magnified by a factor of 16 using a microscope objective and imaged on a CCD camera.

The optical setup
We require our SLM setup to steer both the 480 nm and the 780 nm light beams independently, both for ground state transitions and two-photon excitation of 87 Rb to Rydberg states (compare Sect. 2 and Sect. 3). Using two wavelengths at the same time adds additional complexity, first and foremost because the phase of the SLM pixels strongly depends on the wavelength. In addition, the optical components have refractive index dispersion which must be compensated. The atom chip experiment [100] features an imaging lens of high numerical aperture (NA = 0.4), which is able to resolve individual traps in a 10 μm lattice. In our spatial addressing scheme this lens serves to transfer the SLM phase pattern to a desired intensity distribution at the trapped atoms' location. We built a test setup with an identical imaging lens, as seen in Fig. 12. Both wavelengths are coupled out of optical fibers to achieve a Gaussian beam profile. Subsequently they are expanded with a telescope, such that their diameter matches the height of the SLM display (the display size is 15.36 mm×8.64 mm). This maximizes the amount of available SLM pixels per beam. The beams are aligned next to each other by means of custom-made dichroic mirrors and guided such that each hits the center of one half of the SLM. Being reflected off of the SLM, the beams are separated using another dichroic mirror, and expanded again by a second telescope. The beams are overlapped by another dichroic mirror and focused by the lens. The beam sizes match the diameter of the imaging lens, thus, we exploit the full NA of this lens. The intensity distribution in the focal plane is magnified by a factor of 16 by means of a microscope objective, and imaged with a CCD camera. This extra magnification is required to gain sufficient spatial resolution of the intensity distribution, as the diffraction limited spot size in the focal plane is less than the camera pixel size.
The wavelengths are split into independent beam paths, as ray tracing simulations show that even with the use of achromatic optical elements, diffraction limited spot patterns in the focal plane cannot be achieved in a single beam path due to residual wavelength dispersion of the optical components. Independent optical components also allow for fine tuning. For example, the spacing of the telescope lenses can compensate for the difference in the imaging lens' focal length at 480 nm and 780 nm. The second telescope, in between the SLM and the imaging lens, is operated in a 4f-configuration. This means that the spacing between SLM and the first telescope lens, and between the second telescope lens and the imaging lens, has to match the respective focal lengths. As pointed out in [92], this configuration ensures that the deflected beam hits the center of the imaging lens independent of the deflection angle at the SLM. We found earlier that without the 4f-configuration, we could only achieve small displacements in the focal plane without losing efficiency, especially for large beam sizes (compared to the lens) and long beam paths. The size of the telescope lenses and mirrors have been chosen such that we can achieve displacements of up to 300 μm in the focal plane.
The angle between the incoming and reflected beam at the SLM was chosen to be 12 • , which ensures that the beams can be separated at acceptable distances from the SLM, as well as that the angle of incidence at the SLM is around 6 • . The latter is the optimal angle for the performance of our SLM. In general the diffraction efficiency of SLMs strongly depends on the angle of incidence of the incoming beam [101]. To further maximize the diffraction efficiency, we introduce a λ/2-waveplate to align the light polarization with the long axis of the SLM display.

Linearization of phase response
As mentioned before, the SLM is operated in a mod 2π-mode, meaning that the maximum phase shift is 2π. The phase shift φ(x, y) of every pixel is digitally programmed by an 8-bit value, called gray level, resulting in 256 different phase values. Ideally, the resultant phase values are equally spaced increments of 2π/256. In practice, we need to calibrate the relationship between the gray levels and the voltage which is applied to the nematic crystals in order to achieve a linear phase response up to 2π [98]. This calibration curve can be sent to the SLM, and serves as an interface between digital and phase information.
In order to calibrate the phase response we have to measure the actual phase value on the SLM. A simple approach is to use an interferometric measurement similar to a Mach-Zehnder interferometer, depicted in Fig. 13(a). We expand a laser beam outcoupled from an optical fiber at either 480 nm or 780 nm respectively, such that it fills a mask with two identical holes. The mask divides the beam into two independent parts, each of which hits the center of one half of the SLM. Afterwards, the two beams which are reflected from the backplane of the SLM are focused down, making them overlap and interfere on a CCD-camera. In Fig. 13(b) we show a typical interference pattern resulting from optical path length differences between the beam paths. These patterns are sensitive to thermal fluctuations and vibrations, inducing a shift of the interference fringes. In order to measure the relative phase value corresponding to a gray level, we change the gray level on one half of the SLM, leaving the other half unaltered. When ramping the gray levels from 0 to 255, the interference pattern is shifted, as can be seen in Fig. 13(c). The translation x of the phase pattern is compared to the average spacing of the fringesX, to give the SLM phase as φ = 2π ×x/X. We take the spatial average of one fringe in the x-direction and plot the corresponding value against the applied gray value (see Fig. 14(a)). The measurements are performed with the default factory curve, and both show non-linear behavior and a phase shift of more than 2π. There is a clear difference between the total phase stroke for 480 nm and 780 nm, which is expected as the ratio in phase shift should scale as the ratio 480 nm/780 nm. We use the information from the phase curves to change the gray value calibration curve to yield a linear response. A second measurement (Fig. 14(a)) shows the respective phase curves after applying the new calibration for 480 nm and 780 nm. The total phase shift matches 2π, and the phase curve behaves more linearly. We are limited in our precision by the width of the fringes and the fluctuations mentioned above. In practice the applied calibration curves prove sufficient to produce high resolution spot patterns in the focal plane of Fig. 12.
As mentioned in Sect. 4.1.1, we use the SLM for 480 nm and 780 nm laser light at the same time. However, only a single phase calibration curve can be introduced to the SLM, such that the maximal phase shift for one wavelength does not equal 2π. In order to compensate for that, we change the gray values on one half of the SLM using the control software. If we use the calibration curve for 780 nm, we naturally achieve a 2π phase shift for that wavelength and a larger one for 480 nm. We rescale the gray values g on the right half of the SLM, where the blue laser is incident, by g = α · g + g offset . In this formula, α and g offset are free parameters, which we optimize empirically by the resultant intensity patterns for 480 nm. One would assume α = 480 780 as the optimal solution, but it proves to be α = 0.4. We show for the optimal parameters the phase pattern on the SLM for a 2 × 2 spot pattern with 10 μm spacing in Fig. 14(b). This pattern yields the intensity distribution shown in Fig. 14(c) in the focal plane of the high NA lens. For both wavelengths we achieve a spot pattern with well defined spacings of 10 μm. The difference in wavelengths is apparent in the different resolution limited spot sizes.

Correction for the backplane non-flatness
Due to the fabrication process the backplane of the SLM is not flat [102], with measured deviations up to 3λ [103]. As the phase modulation depth of the SLM is 2π,  the curvature of the backplane is sufficient to degrade the image quality in the focal plane. Hence we need to compensate for that deviation by introducing a corrective phase pattern on the SLM. To derive the spatial coordinates of a surface from the phase patterns of interferometric measurements using that same surface is a well know problem [104]. A common, multi-image solution is to use a modification of the original Le Carré algorithm [105], the so called phase-shifting interferometry (PSI) [106]. In PSI, an interference image is created from two independent surfaces, one of which is known to be optically flat. Then the relative phase of the light coming from both surfaces is changed, e.g. by varying the optical path length, inducing changes in the interference pattern. Measuring that pattern for four different known phase values allows for retrieval of the phase deviation of the non-flat surface. In our approach we follow the methods presented in [107] in order to apply PSI to our system. The test setup, shown in Fig. 15(a), is very similar to a Michelson-interferometer. The optically flat reference surface is implemented by a dielectric mirror with a surface flatness of better than λ/10. The incident laser light at 780 nm is expanded and split by a 50/50 non-polarizing beam splitter into two arms, filling most of the SLM backplane and the mirror. The light is reflected in zeroth order from the SLM, and partially overlapped at the same beam splitter with the light originating from the mirror. The overlapping beams are projected onto a CCD camera such that the size of the interference pattern matches the size of the camera chip. The change in relative phase is achieved by introducing a phase shift on the SLM. As the interference pattern is sensitive to environmental influences, we swiftly ramp the phase on the SLM from 0 to 2π, triggering the camera to take four images during the ramp yielding interference pattern at a phase of 0, π/2, π and 3π/2, shown in Fig. 15(b). We optimize the interference pattern such that it shows the minimal number of fringes. Then we can assume normal incidence on both surfaces which simplifies the mathematical analysis.
The resultant four images contain a two-dimensional array of intensity information I i (x, y) with i ∈ {1, 2, 3, 4} in the camera plane (x and y denote the index of the relative camera pixel), from which we want to extract a similar array of phase values φ(x, y). For the four step algorithm it can be shown that images taken with the relative phase of δ i = (i − 1) · π 2 , yield the following relation [108]: where I 0 is the summed individual beam intensity and I fr is the fringe modulation. These are four equations per pixel for the three unknowns I 0 , I fr and φ, which can be solved for φ(x, y): We can use the inverse tangent with two arguments, as the sign of numerator and denominator are known, to retrieve φ(x, y) in the range [−π, π] . Now the phase values are known mod 2π in the camera plane (see Fig. 16), which in principle would be sufficient as the SLM phase is encoded in the same fashion. However, we need to relate the measured phase values in the camera plane to the relative phase values in the SLM plane. This relation is given by a transformation describing the imaging properties of our optical system. We first have to retrieve the actual phase from the values mod 2π, because this phase is more robust to the applied transformation. Retrieving the actual phase is a non-trivial problem in more than two dimensions [108], usually referred to as phase unwrapping. A multitude of different algorithms have been developed to minimize errors and mathematical artifacts [109,110] in the phase unwrapping. We unwrap the measured phase array φ(x, y) and retrieve a smooth two-dimensional phase pattern Φ(x, y) with values up to 4π, consistent with the previously mentioned literature values. We are left with transforming the phase values Φ(x, y) to the corresponding values Φ (x , y ) in the SLM plane. Therefore, we need The coordinate transformation f (x, y) between camera and SLM plane is found by introducing a pattern of regularly spaced spots with some voids on the SLM, and imaging the corresponding intensity pattern on the camera. The phase found by PSI at the camera has to be unwrapped before transforming the values to the SLM plane.
The transformed values have to be interpolated, accounting for the lower resolution of the camera. The resulting phase pattern has to be wrapped mod 2π. The inverse of that is used as the factory correction. to measure the coordinate transformation f (x, y) between the SLM (x , y ) and the camera (x,y) coordinates. We introduce a pattern of regularly spaced spots (with some defects for better reference, see Fig. 16) onto the SLM, and observe the resulting intensity pattern in the camera plane. Every spot is clearly identifiable besides those which are not captured by the imaging system or outside of the laser intensity profile. As there is now a one-to-one correspondence between spots in the camera and SLM plane, we can retrieve the desired transformation function f for the spatial coordinates and apply Φ (x , y ) = Φ(f −1 (x , y )). The resultant phase pattern does not fill the whole SLM canvas, as not all spots are imaged on the camera. Furthermore, there are missing pixel values as the resolution of the camera is smaller than the SLM resolution. We fill those missing elements by interpolating between neighbouring pixel values. The resultant phase Φ (x , y ) is mapped by mod 2π to values φ (x , y ), from which we retrieve the correction sent to the SLM as 2π − φ . This correction is usually called factory correction, as it accounts for the non-flatness of the surface due to the manufacturing process.

Aberration correction
Optical aberrations are an unwanted feature of an optical system, degrading its imaging quality. In practice, every optical system suffers from a variety of different aberrations, which have to be determined and compensated for. There is a multitude of ways to measure aberrations in an optical system [108], and many measures can be taken to improve the performance. For example, one can compensate for chromatic aberrations by introducing achromatic optical elements, or for spherical aberrations by using aspheric lenses. Besides that, it is common to use adaptive optics as an active compensation method, for example in astronomy [111] or biology [112]. This is especially useful if there are time-varying aberrations present, like atmospheric turbulence in astronomy, or if the aberrations are complex. A standard technical device for aberration analysis is the Shack-Hartmann (SH) sensor [113], which is often used with adaptive optics [114]. As an example, SH sensors are used in astronomy for telescopes [115], or in biology to measure the aberration of the human eye [116]. The SH sensor consists of a multi-lenslet array, which images the incoming wavefront to an array of single spots on a CCD camera. The basic working idea is to use the measured displacement in the imaging plane to estimate the local wavefront tilt incident on an individual lenslet. The SH sensor is calibrated with a near-perfect plane wave to localize the optimal spot position on the CCD camera. Any wavefront with a local phase gradient will lead to a deviation from that optimal position. Naturally, a SLM qualifies as a candidate for adaptive optics, as we can adjust the local phase of an incident wavefront with high resolution. Additionally, we want to use the SLM as a sensor for optical aberrations of our imaging system without necessitating an additional commercial device. Our scheme mimics the working principle of the SH sensor, and resembles the one presented in [117]. We aim primarily at improving the quality of spot patterns in the focal plane of our high NA lens, which can be achieved by compensating aberrations with the SLM itself [92]. The idea behind our method is depicted in Fig. 18(a). If light propagates in the z-direction, it can be described at a given point z = z 0 by the wavefront Ψ(x, y). For a surface of equal phase, we define Ψ(x, y) as the deviation at (x, y) in z-direction from a flat surface. For a perfect plane wave, the wavefront is flat, hence Ψ(x, y) = 0 m and ∂Ψ(x0,y0) ∂x = ∂Ψ(x0,y0) ∂y = 0 at any point (x 0 , y 0 ). Optical aberrations in the beam path will influence the wavefront, introducing non-vanishing gradients. Locally the wavefront can be thought of as tilted by an angle θ with respect to the plane perpendicular to the z-direction. Such a tilt leads to a displacement from the focal point of a lens imaging that wavefront. In our setup we introduce a pattern like shown in Fig. 18(b) onto the SLM. The pattern consists of a spot with diameter 500 μm, containing a linear grating which steers the light away from the zeroth order of the SLM. The rest of the light coincides with the zeroth order and is blocked in the focus of the second telescope in Fig. 12. Hence the spot acts like a local aperture, selecting only a small part of the wavefront. We image the deflected light on our CCD camera, and measure the displacement in the focal plane compared to the image of the complete wavefront. All measurements are performed with the factory correction from Sect. 4.1.3 present on the SLM. We move the spot around the SLM canvas in steps of 250 μm in x-and y-direction, thus super-sampling the wavefront. Any change in the wavefront smaller than the diameter of the spot cannot be distinguished. In order to increase the resolution of this method, we need to decrease the spot size. However, there is a limit to the spot size due to two reasons: the intensity of light coming from smaller spots is too low to be detected by the CCD, and smaller spots mean an effective decrease in NA of the imaging lens, thus leading to larger images which increase the uncertainty in the image center position. Using the mentioned spacing, we obtain a displacement vector (x i , y j ) in the focal plane for every spot position (x i , y j ) on the SLM (see Fig. 18(c)) from fitting a 2D-Gaussian function to the image. The data is limited to a 4 × 4 mm area around the 780 nm beam center on the SLM due to the finite beam size.
There is a simple geometric relation between the gradient of the wavefront Ψ at (x i , y j ) and the measured displacement (x i , y j ): where f = m · f is the modified focal length of our imaging system, with m the magnification of the second telescope. From our measurements, we receive an array of estimators for the local gradient of the wavefront in the x-and the y-direction.
We now need to retrieve the actual wavefront from those gradients. This is a well known problem, for which two methods have been developed, called the zonal and modal reconstruction methods [118]. The zonal method reconstructs the wavefront from the gradients in every measurement point, whereas the modal method expresses the wavefront as a superposition of basis functions, and tries to fit the gradients to the data. Both methods have advantages and disadvantages depending on the specific application. Therefore we use both methods in our case and evaluate which one performs better. Mathematically, we use the approach depicted in [119] based on the singular value decomposition (SVD). The zonal approach necessitates a set of basis functions, for which one normally uses Zernike polynomials, as they allow a direct interpretation in terms of actual optical aberrations [108]. As Zernike polynomials are defined on the unit sphere, they have to be transformed to be pairwise orthogonal in a rectangular geometry, matching our measurement. We take the first 15 rectangular Zernike polynomials as defined in [120]. We convert the wavefront Ψ obtained from both methods to a phase information φ according to φ(x, y) = 2π · Ψ(x, y) λ , and use the inverse of that for our correction on the SLM. The resultant phase pattern for both the modal and zonal method are shown in Fig. 19(a). As the zonal method yields a set of discrete values with 250 μm spacing, the zonal phase pattern is interpolated. There are visible differences between both patterns, as well as structural similarities. Naturally, the modal phase pattern is smoother due to the underlying functional description. Both patterns do not allow for an easy explanation in terms of standard aberrations. However, the term corresponding to a tilt in the x-direction is the largest coefficient in the Zernike decomposition. To validate that the correctional phase patterns compensate for the aberrations in our optical system, we look at intensity spot patterns created in the focal plane. Ideally those spots are resolution limited and possess identical intensity and shape. The spot patterns are shown for the example of a three by three pattern with a 10 μm x 20 μm spacing for the case of no correction, the zonal and the modal correction in Fig. 19(b). Visually, the spots become more uniform in intensity and shape. The spot pattern without correction shows a strong decrease of intensity in the x-direction, which is related to the tilt in that direction predicted from the zonal method. To better quantify the performance we define an easy figure of merit by the summed intensity in an area of 700 nm × 700 nm around each spot center, roughly corresponding to the atom cloud size in our magnetic microtraps. The results are normalized to the highest summed intensity in every pattern, and plotted in Fig. 19(c), which show that there is a spread of up to 33% in the uncorrected case. This spread in intensity is reduced by both correction patterns, with the modal correction performing better than the zonal correction. This can be most likely related to the fact that the modal method compensates better for the finite resolution of our SH method.

Conclusion
In conclusion, we showed that we can use the SLM for both analyzing and correcting optical aberrations in our system. The detected aberrations can be related to the SLM itself, as for the non-flatness of the backplane, or to the optical components in the rest of the imaging system. The backplane curvature can be corrected to yield an effective SLM surface with a flatness of around λ/10, whereas the modal correction pattern significantly improves the imaging performance. Both the factory and modal correction are required on the SLM. However, with all corrections present, we still have a spread in intensity of around 15% in our spot patterns. Furthermore, the performance decreases if the number of spots is increased, as the finite resolution of the SH methods becomes more influential. To achieve more uniform spot patterns we have to involve an active feedback system, as was previously found in [92].