## Main

Realizing efficient light–matter interfaces and engineering states of light at the quantum level are challenging due to the small interaction cross section between atoms and photons1. Overcoming this challenge requires enhanced coupling between light and matter, for example, via optical cavities2,3,4,5,6 or waveguides7,8,9,10 for single atoms, or by exploiting systems with high optical densities coupled to Rydberg states11,12,13,14. In optical cavities, for example, the presence or absence of a strongly coupled atom can be exploited to change the optical response of the cavity from transmitting to reflecting for impinging photons, the basis of photon–photon gates15,16,17. There, the enhanced interaction cross section, however, comes at the cost of a strong mode selection: optical cavities typically support only a single spatial mode for the photons, which limits their use for spatial light shaping. Ordered subwavelength arrays of emitters have recently emerged as an alternative approach to realizing strong light–matter coupling18,19,20,21,22,23,24,25,26, with distinct advantages over disordered ensembles in applications such as photon storage27 or photonic gates28,29. In these systems, emitters are periodically arranged at distances below the wavelength of light, resulting in highly cooperative optical properties as a result of dipolar interactions. The free-space nature of cooperative arrays strongly relaxes the mode selection, which enables spatial control over the modes of single photons interacting with the array. In particular, such control was recently proposed by using strong interactions between highly excited atomic Rydberg states28,29,30. The properties of a cooperative array can thereby be altered through the excitation of a single atom to a Rydberg state, realizing a ‘quantum-controlled metamaterial’ as introduced by Bekenstein et al.28, in which the optical response of the system can be changed in a spatially controlled way. Such control provides a fundamentally new approach to photonic state engineering in free space, with the perspective of creating large-scale photonic entangled states relevant for photonic quantum information applications28. Closely related proposals exploit a single atom to control the spatial photon mode via a dipole–dipole exchange interaction in an atomic ensemble31 or a bilayer atomic array32. In contrast to schemes based on dissipation11,12,13,33,34,35, where decay occurs randomly from the input channel into a large number of modes by free-space scattering, the cooperative array allows for coherent switching between various spatial light modes, such as the transmission and reflection of an atomic array. Furthermore, the cooperative optical response of ordered arrays dramatically reduces the atom number and density required to reach optical depths comparable to disordered ensembles27,29. Similar to recent work performed in optical cavities17,36, they can therefore help to mitigate known systematics that limit the performance of disordered ensembles in free space at large atomic densities33,37.

Here, we exploit the strong cooperative response of an array of ordered emitters separated by subwavelength distances to realize a switch for photons. This setup allows for recreating the prototypical situation encountered in strongly coupled cavity quantum electrodynamics, where single-atom control can be exploited to reroute single photons6. We utilize the strong interactions between Rydberg states of opposite parity to switch the optical properties of the array from transmitting to reflecting. We achieve spatial control by using an ancilla atom prepared with single-site precision at a specific target position within the array. We demonstrate that the optical properties of the array can be altered coherently by driving Rabi oscillations on the ancilla into the Rydberg state. Finally, we directly measure the spatial switching area of the ancilla in our system and present evidence that the residual imperfections in switching are dominated by the finite Rydberg lifetime and preparation fidelity of the ancilla, both straightforward to overcome with future upgrades to the experimental setup.

Analogous to recent experiments focused on quantum optics with Rydberg atoms11,13,33, the key idea for controlling our subwavelength array is to transfer the strong interactions between Rydberg states to the optical response of the cooperative array through electromagnetically induced transparency (EIT)38. We start with a cooperative atomic array with emitters approximately described as two-level systems with ground state $$\left\vert g\right\rangle$$ and excited state $$\left\vert e\right\rangle$$. To induce EIT, the excited state $$\left\vert e\right\rangle$$ is coupled with a control field Ωc to a highly excited Rydberg S-state $$\left\vert S\right\rangle$$ (Fig. 1b). As a result, the cooperative optical two-level response for a weak probe field of Rabi frequency Ωp, impinging normal on the array, is altered and the system becomes transparent on the $$\left\vert g\right\rangle \leftrightarrow \left\vert e\right\rangle$$ resonance in the presence of the control beam (Fig. 1c, middle column). In establishing transparency, the excited state $$\left\vert S\right\rangle$$ is admixed to the state $$\left\vert e\right\rangle$$ through the control field Ωc. Consequently, $$\left\vert e\right\rangle$$ inherits some of the long-range interacting character of $$\left\vert S\right\rangle$$. The parameters Ωc and Ωp are chosen to keep the Rydberg state population sufficiently small to avoid optical nonlinearities due to self-blockade, which is expected when the probability to find any array atom in $$\left\vert S\right\rangle$$ approaches unity11,39. To control the properties of the cooperative mirror, an additional ‘ancilla’ atom in the ground state $$\left\vert {g}^{{\prime} }\right\rangle$$ is excited to a neighbouring Rydberg P-state $$\left\vert P\right\rangle$$.

Due to strong Rydberg interactions between $$\left\vert S\right\rangle$$ and $$\left\vert P\right\rangle$$, the state $$\left\vert S\right\rangle$$ is shifted in energy by Uint(r). This interaction shift exceeds half of the EIT spectral width within a ‘blockade disc’ of radius rb (refs. 40,41) centred around the location of the ancilla. Consequently, the EIT condition breaks down and the optical properties return to those of the cooperative mirror. Due to its coherent nature, the single ancilla atom can entangle the mirror response with the ancilla state, which can subsequently be exploited for photonic state engineering28. Furthermore, controlling the position of the ancilla atom within the array enables full spatial control over the optical properties of the array (Fig. 1c). In particular, using this scheme, optical modes with diameters of a few lattice sites can be controlled without compromising the cooperativity of the response27.

We began our experiments by preparing a nearly unity filled two-dimensional atomic array of 87Rb atoms spin-polarized in the state $$\left\vert g\right\rangle =\left\vert 5{{{{\rm{S}}}}}_{1/2},F=2,{m}_{F}=-2\right\rangle$$ in a single vertical antinode of a three-dimensional optical lattice with lattice constant alat = 532 nm. The lattice spacing was below the transition wavelength λp = 780 nm from the ground state $$\left\vert g\right\rangle$$ to the excited state $$\left\vert e\right\rangle =\left\vert 5{{{{\rm{P}}}}}_{3/2},F=3,{m}_{F}=-3\right\rangle$$, leading to a cooperative response of the array at a ratio of alat/λp = 0.68 (ref. 25). To enable control of the optical response of the mirror via Rydberg interactions, we coupled the excited state $$\left\vert e\right\rangle$$ to the $$\left\vert S\right\rangle =\left\vert 44{{{{\rm{S}}}}}_{1/2},{m}_{J}=-1/2\right\rangle$$ Rydberg state. The optical properties of the array were probed with a weak probe beam with Rabi coupling Ωp/2π = 168(5) kHz Ωc/2π = 6.7(6) MHz on the $$\left\vert g\right\rangle \leftrightarrow \left\vert e\right\rangle$$ transition, which is sufficient to create the EIT window and admix a small Rydberg amplitude to the excited state $$\left\vert e\right\rangle$$ (ref. 38). We deterministically created a single ancilla atom in the $$\left\vert {g}^{{\prime} }\right\rangle =\left\vert 5{{{{\rm{S}}}}}_{1/2},F=1,{m}_{F}=-1\right\rangle$$ state with a fidelity of 0.83(4) at the centre of the array using single-site addressing42,43. The ancilla was then controllably excited to the Rydberg state $$\left\vert P\right\rangle =\left\vert 44{{{{\rm{P}}}}}_{3/2},{m}_{J}=3/2\right\rangle$$ on an ultraviolet (UV) transition at a wavelength of 297 nm. The interaction with the admixed $$\left\vert S\right\rangle$$ state Rydberg fraction of the array atoms led to a Förster-enhanced energy shift Uint(r), featuring a characteristic van der Waals distance dependence proportional to C6/r6 due to interactions with nearby Zeeman sublevels (Supplementary Information). For our parameters, this resulted in a blockade radius $${r}_{\mathrm{b}}={(2{C}_{6}{\Gamma }_{\mathrm{e}}/{\varOmega }_{\mathrm{c}}^{2})}^{1/6}=4.6\,\upmu {{{\rm{m}}}}$$ (Supplementary Information) which defined the range over which the mirror properties are altered. Preparing an atomic array with a radius rarb and detecting the probe light with a low-noise electron-multiplying change-coupled device (EMCCD) camera, we directly reveal the spatially switched area and demonstrate the spatially selective response of our array (Fig. 1c). To suppress the effect of long-range dipolar exchange of the ancilla41,44, we work in a regime ra ≈ rb for the following characterization of the switching response of the array (Supplementary Information).

In a first set of experiments, we aim to demonstrate the basic mechanism of switching the cooperative mirror by using the ancilla atom. To this end, we first confirm the cooperative nature of our atomic array by measuring the reflection and transmission response of a laser beam tuned near the resonance of the $$\left\vert g\right\rangle \leftrightarrow \left\vert e\right\rangle$$ transition. We find a strong directional signal with a subradiant Lorentzian lineshape and an extracted width of down to ΓM/2π = 3.75(14) MHz, narrower than the natural linewidth of Γe/2π = 6.06 MHz (Fig. 2a). This confirms that our array is in the cooperative regime explored previously25. Illuminating the array with both the probe and control fields on resonance, we observe EIT, resulting in a switching from a reflecting to transmitting atom array. Scanning the probe detuning, we observe that the dip in transmission (peak in reflection) splits into a doublet with splitting Ωc, demonstrating the effects of the control field. Interestingly, this doublet again shows signatures of a cooperative response, with a high level of reflectance of 0.37(2), exceeding the reflectance signal for isotropic scattering 0.16(3) (Supplementary Information). The width of each peak amounts to ΓEIT/2π = 2.95(17) MHz, consistent with the width in the single-particle limit of Γe/2. Our parameters were chosen to maximize the on-resonance contrast between the cooperative mirror and the EIT response using a probe duration tp = 20 μs, only slightly shorter than the measured lifetime τ = 27(5) μs of the Rydberg ancilla. The probe power and pulse duration were chosen to keep the Rydberg admixture and the effects of self-blockade small, while providing sufficient signal-to-noise ratio of the probe light on the EMCCD camera (Supplementary Information).

To investigate the effect of the Rydberg ancilla on the array, we apply a π pulse on the $$\left\vert {g}^{{\prime} }\right\rangle \leftrightarrow \left\vert P\right\rangle$$ transition with duration t, such that ΩUVt = π. The resulting spectra exhibit a broad resonance featuring a substructure of three distinct peaks, with the reflectance on resonance amounting to 0.25(2) (Fig. 2b). Our observation of a triple-peak structure can be understood to arise from a combination of the configurations with and without the ancilla Rydberg atom present. A simplified model assuming a statistical mixture of the mirror in the switched and unswitched state, weighted with the probability of finding the ancilla in the Rydberg or ground state, respectively, quantitatively reproduces the observed features in Fig. 2b. The ansatz of a statistical mixture of the two mirror states is motivated by imperfect initial state preparation of the ancilla in $$\left\vert {g}^{{\prime} }\right\rangle$$ and decay of the ancilla Rydberg state during probing (Supplementary Information). To illustrate potential improvements in an upgraded experimental setup, the dashed lines in Fig. 2b also show the expected spectra for perfect ancilla preparation in $$\left\vert {g}^{{\prime} }\right\rangle$$ and substantially shorter probe duration of tp = 2 μs, for which on the order of one photon is scattered, and the decay of the Rydberg ancilla becomes negligible.

To highlight the capability of coherent manipulation in our system, we next aim to dynamically change the optical properties of the atomic array. To this end, we drive the ancilla from the ground state $$\left\vert {g}^{{\prime} }\right\rangle$$ to the Rydberg state $$\left\vert P\right\rangle$$ with variable UV pulse durations, resulting in coherent Rabi oscillations of the ancilla with a Rabi frequency of ΩUV/2π = 1.22(2) MHz (Fig. 3). Measuring the transmittance or reflectance of the array in the same sequence, we find a strong correlation between ancilla Rabi oscillations and the optical properties of the array, where the mirror switches from transmitting to reflecting during the course of the oscillations. Fitting the dynamics of transmittance and reflectance of the array with a damped sinusoidal function derived from the Rabi oscillations with the amplitude and offset of the oscillation as free parameters, we find excellent agreement between this model and the data. This agreement indicates that, indeed, the switching behaviour is determined by the quantum state of the ancilla before probing. The small distortions in the transmittance can be attributed to a non-vanishing probability to initially have two ancilla atoms before excitation to the Rydberg state (Supplementary Information). Notably, the maxima of the oscillating reflectance are clearly above the single-particle limit of a vertically disordered array (ref. 25 and Supplementary Information) demonstrating that the cooperative response of the mirror is preserved during the oscillation (Fig. 3c).

The strong correlation between the state of the ancilla and the state of the mirror can be further studied through photon number statistics. In the ideal case, we expect all photons within a detection window to be reflected (transmitted) when the ancilla is excited to the Rydberg state $$\left\vert P\right\rangle$$ (in its ground state $$\left\vert {g}^{{\prime} }\right\rangle$$). We study this correlation by monitoring the number of reflected photons for a longer integration time of tp = 60 μs after controllably exciting the ancilla with a π pulse (Fig. 4). The distribution with the ancilla in $$\left\vert P\right\rangle$$ exhibits a long tail at high numbers of reflected photons in addition to a peak at low photon numbers. We find good agreement of our observed histogram with a model taking into account our estimated preparation fidelity as well as the independently measured lifetime of the Rydberg-excited ancilla via Monte Carlo sampling (Supplementary Information and Fig. 4).

The spatial control over the position of the ancilla allows for a fundamentally new approach to controlling the optical response of the subwavelength array in a spatially resolved way. To demonstrate such control, we prepared the ancilla at a target site in the centre of the array and compared the optical response of a small array of radius ra = 4.7(7) μm with a larger array with radius of ra = 12.5(5) μm, which exceeds the expected blockade radius (Fig. 5). In the small array, we observe a relatively sharp edge where the transmission jumps from its central value of 0.48(2) to near unity, due to the combination of the finite size of the array ra and the blockade radius rb. In contrast, the large array has an increased transmittance at the centre as well as a more gradual increase of the transmittance beyond the blockade radius. These observations indicate the presence of previously studied long-range exchange processes41,44, which cause the ancilla to delocalize over the entire system and lead to a smoothened transmission signal. Importantly, these exchange processes can be suppressed either by operating on shorter probe timescales or by reducing the probe power, as the relevant exchange process scales with $$\propto {\Omega }_{p}^{2}$$ (ref. 44 and Supplementary Information). This regime is experimentally accessible with optimized detectors matched to the manipulated spatial modes of the light field, which, however, would not have allowed for the spatially resolved proof-of-principle characterization of the array response performed in this work.

In conclusion, we have demonstrated the ability to switch and coherently control the optical properties of a cooperative subwavelength array of atoms using a single ancilla atom. Our system is presently limited by finite preparation efficiencies as well as the finite Rydberg lifetime of the ancilla. The former can be improved by better addressing techniques, for example, by placing the ancilla in a single microtrap overlapped with the cooperative array, and the latter with optimized single-photon detectors. Alternatively, we foresee the use of Rydberg dressing45 for the ancilla, improving its lifetime while minimizing motional decoherence effects due to reduced repulsion in the lattice and the suppression of dipolar exchange processes.

Our measurements already demonstrate all the experimental building blocks to control single photons by manipulating single atoms in subwavelength arrays and open the path towards the detection of atom–photon entanglement46, the realization of photon–photon gates28,47 or multimode quantum optics in cooperative arrays28,29,30.