The design of the n2EDM experiment

We present the design of a next-generation experiment, n2EDM, currently under construction at the ultracold neutron source at the Paul Scherrer Institute (PSI) with the aim of carrying out a high-precision search for an electric dipole moment of the neutron. The project builds on experience gained with the previous apparatus operated at PSI until 2017, and is expected to deliver an order of magnitude better sensitivity with provision for further substantial improvements. An overview is of the experimental method and setup is given, the sensitivity requirements for the apparatus are derived, and its technical design is described.


Introduction and motivation
Searches for permanent electric dipole moments (EDM) of fundamental particles and systems are among the most sensitive probes for CP violation beyond the Standard Model (SM) of particle physics; see e.g. [1,2].
Although the CP-violating complex phase of the CKM matrix is close to maximal, the resulting SM values for EDMs are tiny, while theories and models beyond the SM (BSM) often predict sizeable CP violating effects that lie within the range of experimental sensitivities. Some of these models use specific CP violating mechanisms together with other features to explain the observed baryon asymmetry of the universe (BAU) [3], which is inexplicable by known sources of CP violation in the SM.
The scale of CP violation in the QCD sector of the SM is experimentally constrained to be vanishingly small, through the non-observation to date of any non-zero hadronic EDM. This lack of EDM signals in searches with the neutron [4] and 199 Hg atom [5] in particular results in what is known as the "strong CP problem" [6]. Theory offers possible explanations for the suppression of the observable CP violation in the strong sector, most elegantly by introducing axions [7,8]. Axions are also viable Dark Matter candidates [9], but aside from the unexpectedly small EDMs there has so far been no other observations made in support of their existence.
Obviously, nobody today can safely predict where BSM CP violation will first manifest itself in any experiment. If it were to show up in an EDM measurement, it is not clear in which system this would be; thus there is a broad search strategy presently being pursued in many laboratories around the world [10][11][12][13]. In particular, ongoing efforts target intrinsic particle EDMs, e.g. of leptons and quarks, as well as those occurring due to or being enhanced by interactions in nuclear, atomic and molecular systems. In the current situation any sign of an EDM would be a major scientific discovery. In case of a discovery in any of these systems, however, corresponding EDM measurements in other systems will be needed to clarify the underlying mechanism of CP violation. The neutron is experimentally the simplest of the accessible strongly interacting systems, and as such remains a prime search candidate. Searches for EDMs of the proton and light nuclei will also become increasingly important.
The most sensitive neutron EDM search delivered a result of d n = (0 ± 1.1 stat ± 0.2 sys ) × 10 −26 e cm, which sets an upper limit of |d n |< 1.8 × 10 −26 e cm (90% CL) [4]. This measurement was performed with the apparatus originally built by the RAL/Sussex/ILL collaboration [14], which went through continuous upgrades of almost all subsystems and was also moved to the source of ultracold neutrons (UCNs) [15][16][17] at the Paul Scherrer Institute (PSI). Arguably the most important of the upgrades were the addition of an array of atomic cesium magnetometers [18] and of a dual spin detection system [19].
With this last measurement, the RAL/Sussex/ILL nEDM apparatus at the PSI UCN source reached its limits with respect both to systematic effects and to statistical sensitivity. Any further increase in sensitivity requires a new apparatus optimally adapted to the UCN source as well as the replacement of numerous subsystems with more modern and higherspecification equipment.
There are a number of collaborations around the world [20][21][22][23][24][25] attempting to improve the current neutron EDM limit by at least one order of magnitude. The most ambitious competing project is based on a totally new concept of a cryogenic experiment in superfluid helium, where both the UCN statistics and the electric-field strength could be enhanced [20]. More traditionally, we propose to push and extend the powerful and proven concept of a room-temperature UCN experiment with two separate and complementary magnetometry systems. The n2EDM spectrometer, the subject of this paper, is a next-generation UCN apparatus based on the unification of two concepts: the double-chamber setup pioneered by the Gatchina nEDM spectrometer [26], and the use of Hg co-magnetometry [27].
The n2EDM apparatus is designed to measure the neutron EDM with a sensitivity of 1 × 10 −27 e cm, with further possibility to go well into the 10 −28 e cm range. The improvement of the statistical sensitivity will arise from the large double-chamber volume as well as an optimized UCN transport arrangement between the source and the spectrometer. The control of systematic effects needs to shadow these improvements, implying better stability, uniformity and measurement of the main magnetic field. These will be achieved by a dedicated coil system and better magnetic shielding, as well as by substantially improved magnetometry.

The principle of the n2EDM experiment
In this section we present the overall concept of the n2EDM apparatus. The heart of the experiment is a large-volume double storage chamber placed in a new, large, magnetically shielded room. Stable and uniform magnetic-field conditions are of paramount importance for a successful measurement. The magnetic field will be generated by a main magnetic-field coil in conjunction with about 70 trim coils, each powered by highly stable power supplies. Monitoring of the magnetic field is provided by atomic mercury co-magnetometry as well as by a large array of optically-pumped Cs magnetometers.

The n2EDM concept
The measurement relies on a precise estimation of f n -the precession frequency of polarized ultracold neutrons stored in a weak magnetic field B and a strong electric field E. The neutron EDM is obtained by comparing the precession frequencies in the anti-parallel (↑↓) and parallel (↑↑) configurations of the magnetic and electric fields: The statistical sensitivity in the former nEDM experiment [4] was limited by ultracold neutron counting statistics, which depend on the intensity of the UCN source, the efficiency of the UCN transport system, and the size and quality of the storage chambers. Independent of possible improvements of the yield of the PSI UCN source, the guideline for the conceptual design of the new apparatus was to maximize the neutron counting statistics while keeping the systematic effects under control. This will be achieved with a large UCN storage volume and an optimized UCN transport system, placed in a well-controlled magnetic-field environment. Two vertically stacked storage (Ramsey spin-precession) chambers, filled with polarized UCNs and Hg atoms, are embedded in the same vertical magnetic field B, but with opposite electric-field directions E Figure 1 shows the basic concept of the n2EDM experiment. The design of the apparatus is based on two key features: (i) two cylindrical storage (Ramsey spin-precession) chambers, one stacked above the other; (ii) a combination of mercury and cesium magnetometry. The storage volumes are separated by the shared high-voltage electrode, and are each confined at the opposite end by a ground electrode and radially by an insulating ring. In addition to doubling the storage volume, the twin-chamber arrangement also permits simultaneous measurement of the neutron precession frequencies for both electric-field directions. Below we give short overviews of the core systems of the n2EDM apparatus, which will be presented in more detail in Sect. 5.

Precession chambers
-Each of the two precession chambers has internal diameter D = 80 cm and height H = 12 cm. The choice of the dimensions is explained in Sects. 3.1 and 5.1.1. -As noted above the upper and lower chambers are separated by the common high-voltage (HV) electrode, which has a thickness of 6 cm. As in the previous experiment [4], the electrodes will be made of aluminum coated with diamond-like carbon and the insulator rings will be of polystyrene coated with deuterated polystyrene. -The precession-chamber stack will be installed inside an aluminum vacuum vessel with an internal volume of approximately 1.6 m × 1.6 m × 1.2 m. This design allows for the optional installation of a double chamber with inner diameter of up to 100 cm, for a possible future upgrade of the experiment.

UCN polarization, transport and detection
-Neutrons arriving from the PSI UCN source are fully polarized using a 5 T superconducting magnet. -Neutron guides made of coated glass tubes with ultralow surface roughness connect the precession chambers first to the UCN source and then to the detectors. This is achieved by different operational modes of the so-called UCN switch (see Sect. 5.1.3).
-Neutrons are counted by a spin-sensitive detection system based on fast gaseous detectors (see Sect. 5

Magnetic shielding
To shield the experiment from external variations in the magnetic field, the sensitive part of the apparatus is installed inside a magnetic shield that has both passive and active components (see Sect. 5 Magnetic-field generation -A large coil will be installed inside the MSR (but outside the vacuum vessel) in order to produce a highly uniform vertical magnetic field B 0 throughout a large volume. The coil is designed to operate in the range 1 µT < B 0 < 15 µT. In the short to medium term it is intended to work with B 0 = 1 µT, as was the case in the previous single-chamber experiment, but other options are being considered for the future. -In addition to the main coil, an array of 56 independent trim coils is used to achieve the required level of magnetic-field uniformity. -A further seven "gradient coils" will produce specific field gradients that play an important role in the measurement procedure. -RF coils will be installed inside the vacuum tank to generate the oscillating-field pulses applied in the Ramsey measurement cycles.

Magnetometry
-Within each of the storage chambers the volume-averaged magnetic field will be measured using polarized 199 Hg atoms injected into the volume at the beginning of the cycle. The free-precession signal is observed using a UV light beam that traverses the chamber. Throughout the period prior to each measurement cycle the mercury gas is continuously polarized by optical pumping within a smaller adjacent volume separated from the main chamber by a shutter. -An array of 114 Cs magnetometers will measure the field at a number of positions surrounding the chambers. This will provide instantaneous measurements of the magnetic-field uniformity. -An automated magnetic-field mapper will be used offline for B-field cartography of all of the coils as well as for the correction and control of high-order gradients.

Measurement procedure
In the data taking mode, the full PSI proton beam will be kicked to the UCN source for 8 s every five minutes, producing a burst of ultracold neutrons. These UCNs are guided to the apparatus through the UCN transport system (see Fig. 2a). Along the way they are polarized (to almost 100% polarization level) by passage through the 5 T superconducting magnet.
Once the precession chambers have been filled with polarized UCNs, the UCN shutters close the chambers and the neutrons are thereby stored. Ramsey's method of separated rotating fields is then performed: 1. A first horizontal rotating field is applied for t RF = 2 s at a frequency f RF ≈ |γ n |/2π B 0 ≈ 30 Hz (for B 0 ≈ 1 µT). The amplitude of the field is chosen such that the neutron spins are tipped by π/2 into the (horizontal) plane perpendicular to the main magnetic field B 0 . 2. The neutron spins precess freely in the horizontal plane for a duration of T = 180 s (referred to as the "precession time"; see Sect. 3.3) at a frequency f n which in principle will be slightly different in the two chambers. 3. A second rotating field, in phase with the first, is then applied for another 2 s. The vertical projection of the neutron spins (in units ofh/2) after the whole procedure is where α (also referred to as the visibility of the resonance) is the final polarization of the ultracold neutrons, f n is the neutron Larmor precession frequency to be measured, and is the half-width of the resonance. The quantity A is called the asymmetry. Since f n is likely to have a different value in each of the two chambers, the asymmetry in the top chamber A TOP will not be identical to the asymmetry in the bottom chamber A BOT . Notice however that the applied frequency f RF is common to the two chambers. 4. The ultracold neutrons are released from the precession chambers by opening the UCN shutters, and are then guided to the spin analyzers (see Fig. 2b). Each chamber is connected to a dedicated spin-sensitive detector. These devices simultaneously and independently count the number of neutrons in each of the two spin states. These spin analyzers therefore provide, for each cycle, a measurement of the asymmetries for the top and bottom chambers: where N TOP/BOT ↑/↓ are the numbers of neutrons from the top or bottom chamber, with spin parallel (↑) or antiparallel (↓) to the magnetic field. Figure 3 shows an example of a measurement performed with the (single-chamber) nEDM apparatus scanning the The statistical error arising from Poisson counting statistics for one measurement cycle is The maximal sensitivity is obtained for cycles measured at A = 0 where the slope of the resonance curve is highest. In fact, in nEDM data production mode the applied frequency f RF is set sequentially to four "working points" indicated by the vertical bars in Fig. 3. Specifically, we set f RF = f n,0 ± (1 ± 0.1) × Δν/2, where we calculate f n,0 from a measurement of the magnetic field performed in the previous cycle. Hence the four working points follow any possible magnetic-field drifts. Magnetic-field drifts induce shifts of the resonance curve that are in practice much smaller than the width of the resonance Δν, but which nonetheless might be larger than the precision σ ( f n ) of the measurement; this will be discussed below. The slight departure of the working points from the two optimal points f n,0 ± Δν/2 enable the extraction of the visibility α (as well as a small vertical offset of the resonance due to the imperfections of the spin analyzer system) by combining the data of many cycles of a run. This comes at the price of a sensitivity reduction of 2% in comparison to the optimal points. With n2EDM, since the applied frequency is common to the two chambers it is important to ensure that the value of f RF is set sufficiently close to the optimal points for the two chambers simultaneously. This is referred to as the topbottom resonance matching condition. It imposes a requirement on the maximum permitted vertical gradient of the magnetic field. For n2EDM we require the shift between the resonance curves of the top and bottom chambers to be at most 0.2 × Δν/2 in order to limit the resulting sensitivity loss to values lower than 2%.
For a precession time of T = 180 s this corresponds to a maximum difference of 10 pT between the average field in the top and bottom chambers. With a separation between the centers of the two chambers of H = 18 cm, the requirement on the vertical magnetic-field gradient is The measurement procedure described for one cycle is repeated continuously to form a sequence of data with many cycles. Figure 4 shows an example of a sequence produced with the nEDM apparatus in 2016. For each cycle the neutron frequency f n was extracted as explained above. The electric field polarity was alternated with a period of 112 cycles. As is evident from the figure, the neutron frequency is affected by the inevitable small drifts of the magnetic field. These drifts were compensated by the mercury co-magnetometer. At the beginning of a cycle, some mercury from the polarization cell is admitted to the precession chamber just after the UCN shutter is closed. A π/2 flip is then applied to the mercury spins, and they start to precess at a frequency of f Hg = γ Hg /2π B 0 ≈ 8 Hz (for B 0 ≈ 1 µT). The precession is recorded optically, by measuring the modulated transmission of a polarized horizontal UV beam. From the data one may then extract the mean precession frequency f Hg of the mercury atoms sampling, to a very good approximation, the same period of time and the same volume as the precessing ultracold neutrons.
For each cycle we thus obtain simultaneous measurements both of the neutron frequency f n and of the mercury frequency f Hg . The neutron frequency includes contributions from both the magnetic and the electric dipole moments: where the "−" sign refers to the parallel ↑↑ configurations of the magnetic and electric fields and the "+" sign refers to the anti-parallel ↑↓ configuration. The electric contribution, which is ultimately the goal of the search, is tiny: for d n = 10 −26 e cm, E = 15 kV/cm and B 0 = 1 µT, the ratio between the electric and magnetic term is as small as 2 × 10 −9 . The mercury precession frequency effectively has only a magnetic contribution: since the mercury EDM d Hg < 10 −29 e cm [5], the electrical term can be neglected.
The frequency is then The ratio R of neutron to mercury frequencies is then free from the fluctuations of the magnetic field B 0 . This is illustrated in Fig. 4 where the ratio R is plotted in the lower part. Notice that the co-magnetometer corrects for random drifts of the magnetic field that would spoil the statistical sensitivity and also for the B-field variations correlated with the electric field (due to leakage currents along the insulator for example) that would produce otherwise a direct systematic effect. In fact, Eq. (9) is an idealization. It is modified by several effects affecting either the neutron or mercury frequencies. For example, gradient drifts could induce shifts, as the one visible on the bottom panel of Fig. 4 after cycle 400. All known effects will be described in Sect. 4, where the associated systematic effects will be discussed. Finally, with the single-chamber apparatus, the neutron EDM is calculated as follows: In n2EDM, both chambers host a mercury co-magnetometer, and each cycle will therefore provide the neutron and mercury Larmor precession frequencies in the two chambers f TOP n , f BOT n , f TOP Hg and f BOT Hg . Therefore, we can form the two ratios In principle, since the parallel and anti-parallel configurations of the fields are measured simultaneously in n2EDM, a measurement of d n could be obtained without reversing the polarity of the electric field by calculating However, in order to compensate for shifts in R arising from various effects described later in Sect. 4, the electric polarity of the central electrode will be reversed periodically as was done in the previous single-chamber nEDM experiment. The neutron EDM can then be calculated as follows: In the following section we will address the statistical and systematic errors of this measurement.

Projected statistical sensitivity
The statistical sensitivity of the measurement will be limited by the UCN counting statistics. By combining the expression for the statistical sensitivity σ ( f n ) of the neutron frequency at the optimal point A = 0 as given by Eq. (5) with Eq. (1), the following statistical sensitivity on the neutron EDM per cycle may be derived: where α is the measured neutron polarization at the end of the Ramsey cycle, T is the neutron precession time, E is the magnitude of the electric field and N is the total number of neutrons counted from the two chambers. Table 1 summarizes the expected values for each of those contributions. It is based on the demonstrated sensitivity of the nEDM apparatus, the average UCN source performance in 2016 and our Monte-Carlo simulation of the n2EDM UCN system. We will next discuss each of the parameters in Eq. (14).

UCN counts N
The prediction of the number of detected neutrons in the n2EDM apparatus is based on comprehensive Monte-Carlo simulations of the PSI UCN source, guides, and the experiment, treated as one system, performed with the MCUCN code [17,28].
As far as the UCN source and guides leading to the beamports were concerned, the relevant surface parameters of the Table 1 Comparison between (i) the achieved performance of the nEDM apparatus during datataking at PSI in 2016, (ii) the nominal parameters for the n2EDM design (see Eq. (14) and text). In both cases coatings are made of diamond-like carbon (DLC) for the electrodes and deuterated polystyrene (dPS) for the insulator ring. The number of neutrons N is the total number of UCN counted (in the two chambers in case of n2EDM) after a precession time of T = 180 s. The error on the neutron frequency σ ( f n ) is given for one cycle and one chamber. Also shown are the d n sensitivities in one day and the final accumulated sensitivities. The final sensitivity listed in the first column is that actually achieved in 2016; that of the second column represents the achievable sensitivity in n2EDM after an assumed 500 days of data taking, which could be achieved in four calendar years  [29,30]. The simulation parameters and values are listed in Table 4 of [17]. These are: optical (Fermi) potential, loss per bounce parameter, fraction of diffuse (Lambertian) reflections, and the attenuation constant of the windows. Separate values were considered for the following parts: the aluminum lid above the sD2 converter, the vertical NiMo coated guide above the sD2 vessel, the DLC coated storage vessel of the source, the NiMo coated neutron guides to the beamports, and the aluminum vacuum separation windows in the SC magnet and detectors. For the n2EDM apparatus, the following parameters were used: For the NiMo coated guides, an optical potential of 220 neV as measured with cold-neutron reflectometry; a loss per bounce parameter of 3 × 10 −4 as measured in [31] (with a 1σ error added); and an upper limit of 2% for fraction of Lambertian reflections (as benchmarked for NiMo on glass). The NiMo-coated aluminum guide inserts have a small surface fraction, and were assumed to be highly polished and thus not to increase the overall fraction of diffuse reflections above 2%. For the loss-per-bounce parameter of the precession chambers, we use a value of 2.8 × 10 −4 , extracted from storage measurements with the single chamber [32] (with a 1σ error added) . This was very close to the values reported in [33] for DLC (on aluminum foil at 300 K), and in [34] for dPS. We used optical potentials of 230 neV for DLC [17] and 165 neV for dPS, with the latter being the average of measured and theoretical values [34] (because of a large Simulated energy spectra of the detected UCNs. The energy is the sum of the kinetic and the gravitational potential energy calculated at the floor levels of the respective chambers measurement error). The diffuse reflection fraction for the electrodes was 2%, and a maximal roughness was assumed for the insulator ring (Lambertian reflections, corresponding to a diffuse reflection fraction of 100%).
The geometry of the parts of the n2EDM experiment dependent upon UCN optics, and in particular the height of the chambers above the beamline, was optimized in terms of UCN statistics. The optimal height is significantly lower than the height of the previous nEDM experiment. The simulated energy spectra of detected UCNs calculated at the bottom level of the chambers are shown in Fig. 5.
Due to the lower elevation of the chambers with respect to the beamline, the spectra of the stored UCNs are expected to be harder in comparison with the single chamber nEDM experiment. The absence of UCN at lower energies in case of the upper chamber is caused by filling from the top. The maximum attainable energy for the two spectra is determined mainly by the 165 neV optical potential of the insulator ring, and to a lesser extent by the difference in elevation.
The chosen design, with an 80 cm diameter double chamber of 12 cm individual heights, permits an increase of the total number of detected neutrons after 188 s storage time (i.e. 180 s precession time) from 15,000 in nEDM to 121,000 in n2EDM. The uncertainty of the calibration from MC counts to real UCN counts is ±15% [35]. This considerable gain in UCNs is the result of (i) a double chamber as compared to a single chamber, (ii) an increase of the volume of each individual chamber by a factor of three, (iii) an increase in the inner diameter of the UCN guides (6.6-13 cm), (iv) optimization of the vertical position of the precession chambers; the optimum was found to be 80 cm above the beamport. None of these estimates include any of the improvements in the performance of the PSI UCN source that have taken place since 2017.

Electric field strength E
In the single-chamber nEDM apparatus the electric field was generated by charging the top electrode using a bipolar highvoltage supply of ±200 kV. The top electrode was ramped regularly to ±132 kV, while the bottom electrode was kept at ground potential. The maximum voltage was limited by the presence of many optical fibers in contact with both the charged electrode and the grounded vacuum tank. These fibers were used to operate six Cs magnetometers situated on the top electrode.
The same system, without the Cs magnetometers and the fibers, could sustain higher electric fields; tests were carried out up to 16.6 kV/cm.
In the n2EDM apparatus all Cs magnetometers will be mounted at ground potential, above and below the electrode stack. The electric field will not be limited by the presence of optical fibers close to the charged central electrode, and we expect to be able to operate the system at voltages of 200 kV or higher. However, a safe standard operation is anticipated at voltages of ±180 kV, corresponding to an electric field of ±15 kV/cm.

Precession time T
The choice of the precession time T results from balancing two dominant effects: increasing T reduces the width of the Ramsey resonance and tends to improve the sensitivity, but at the same time the number of surviving neutrons N (T ) decreases, and this decreases the sensitivity. Additionally, one has to take into account the fact that increasing T results in fewer measurement cycles per day. In detail, the daily sensitivity σ day follows from the cycle sensitivity given by Eq. (14) and has the form where n cyc is the number of cycles per day, the total length of a cycle being the sum of the precession time T and a dead time T dead accounting for filling and emptying the chambers as well as ramping the electric field. In Eq. (15) we assume that the visibility α is not decreasing with time (i.e. we neglect UCN depolarization). This important point will be discussed later. The loss of neutrons in the chambers is encoded in the function N (T ); this is the main effect driving the choice of T .
In Fig. 6 we show a simulated storage curve, i.e. the number of neutrons counted after a storage duration t as a function of t. The storage duration t = T + 8 s within the EDM cycles is a little longer than the precession time T in order to account for the additional time required to fill the mercury atoms, apply the mercury pulse (4s) and apply the two neutron pulses (4s).
As usual for UCN storage chambers at room temperature, the storage curve departs significantly from a pure exponential decay because the dominating losses originate from wall collisions rather than from beta decay (τ n ≈ 880 s). Wallcollision rates and loss probability per collision are a function of neutron kinetic energy. This results in energy-dependent UCN loss rates and a clear departure from a simple exponential decay. We fit the storage curve with a double-exponential model assuming only two groups of neutrons equi-populated at T = 0.
In Fig. 7 we plot the projection of the daily sensitivity, Eq. (15), for the baseline design of n2EDM. For the sensitivity estimation we set T = 180 s (as in [4]).

Neutron polarisation α
In the perfect case of no depolarization during the precession period, the visibility of the Ramsey resonance would be as high as the initial polarization, 1 which was measured to be α 0 = 0.86 in the single-chamber nEDM spectrometer.  The decay of polarization during storage dα/dt arises from three different contributions: We briefly discuss these effects, and we refer to Ref. [36] for a more complete treatment of this subject.
-The first contribution −α/T wall is due to depolarization during wall collisions. The depolarization rate 1/T wall = νβ is given by the product of the wall collision rate ν, which is determined by the UCN spectrum, and the depolarization probability at each wall collision β, which is set by the surface properties of the chamber. This depolarization mechanism affects equally the transverse and the longitudinal polarization of the neutrons. Dedicated measurements performed with the nEDM apparatus in 2016 resulted in a determination of T wall ≈ 4000 s. In n2EDM we expect about the same values for β and ν. We anticipate that this process will reduce α from 0.86 to 0.83 after 180 s. -A second contributionα grav , called gravitationally enhanced depolarization [37,38], was identified in the nEDM single-chamber experiment. It is due to the vertical striation of UCN under gravity in combination with a vertical magnetic-field gradient. Neutrons with different kinetic energies have different mean heightsz due to gravity. Therefore, in the presence of a vertical field gradient, neutrons with different kinetic energies have different spin precession frequencies. This results in a relative dephasing, which in turn is visible as an effective depolarization quantified by the following expression: The variance of the distribution ofz is a quantity that depends on the total height of the chamber H and on the energy spectrum of the stored UCNs. It was measured to be Var[z] ≈ 0.2 cm 2 in the previous nEDM experiment and it is expected to be smaller in n2EDM: 0.07 cm 2 in the bottom chamber and 0.002 cm 2 in the top chamber, according to the simulated energy spectra. For datataking with the nEDM experiment, the vertical gradient was scanned in the range −30 pT/cm < ∂ B z /∂z < 30 pT/cm as part of the analysis strategy to correct for systematic effects. The cost of that is a decrease of the α parameter due to the gravitationally enhanced depolarization of about 0.05 on average. In n2EDM experiment the wide-range gradient scan is no longer necessary. The experiment will be operated in a much smaller range, −0.6 pT/cm < ∂ B z /∂z < 0.6 pT/cm, in order to meet the top-bottom resonance matching condition discussed earlier. In this case the decrease in α will be negligible. -The last contribution −α/T 2,mag corresponds to the intrinsic depolarization, i.e. the irreversible process of polarization decay within energy groups due to the random motion in a static but non-uniform field. Indeed, a neutron sees a longitudinal magnetic disturbance b z (t) = B z (r(t))− B z as it moves randomly within the chamber with a trajectory r(t). Spin-relaxation theory [39] allows calculation of the decay rate of the transverse polarization due to this disturbance, to second order in the perturbation, as: is the autocorrelation of the longitudinal disturbance and b 2 z is the average of the quantity b 2 z over all particles in the chamber, which in this case is the same as the volume average of (B z (r ) − B z ) 2 . In fact, Eq. (18) serves as a definition of the correlation time. It is important to notice that horizontal gradients G 1, are much more effective in this depolarization channel compared with vertical gradients G 1,0 = ∂ B z /∂z (fields of the type B z = B 0 + G 1,0 z), due to the aspect ratio of the chambers (the height is significantly shorter than the diameter). Figure 8 shows a measurement of the visibility α as a function of an applied (artificially large) horizontal field gradient G 1,1 = ∂ B z /∂ x performed with the nEDM apparatus in 2017. In this case the mean squared inhomogeneity can be calculated to be where R is the radius of the chamber; R = 23.5 cm in the case of the previous single-chamber experiment. The measurement resulted in a determination of τ c (nEDM) = 70 ms. The correlation time scales as τ c ∝ R/v h , where v h = ẋ 2 +ẏ 2 ≈ 3 m/s is the horizontal velocity of UCNs. However, the precise value is complicated to predict; it depends on the velocity spectrum of the stored neutrons, the degree of specularity of the collisions, and also on the shape of the non-uniform field. For an estimate of the UCN correlation time in the n2EDM, we simply extrapolate the value measured in the nEDM experiment by taking into account the increase in diameter of the chambers: For a given field gradient, the depolarization decay rate (18) scales as the third power of the radius of the chamber, because τ c is linear in R and b 2 z is quadratic in R. This is a major challenge for the design of n2EDM because of the increased chamber radius; in fact, the intrinsic depolarization sets an important requirement for the generation of the magnetic field.
In order to reach a final visibility of α(180 s) > 0.80 in n2EDM, we require that the decrease of α due to the intrinsic depolarization to be not more than 2%. This corresponds to T 2,mag > 9000 s. Using Eqs. (18) and (20) we derive the corresponding requirement on the root mean square of the spatial variations of the field in the chamber: Notice that this requirement concerns the absolute value of the field, not the relative value σ (B z )/B 0 . It applies to the baseline choice B 0 = 1 µT as well as for any other B 0 field.

Additional statistical fluctuations and final remarks
The expression Eq. (14) only takes into account the statistical error on the neutron frequency. In fact, when propagating the error in the R ratio, the errors on both the neutron frequency and the mercury frequency contribute to the neutron EDM given by Eq. (13). Taking into account the mercury error, the total statistical error is increased by a factor In addition, there are further sources of statistical fluctuations of the R ratio, in particular the fluctuations of the magneticfield gradient (due to the gravitational shift, see Sect. 4).
The goal for the mercury co-magnetometer design is to reduce the contribution from σ ( f Hg ) to less than 2% of the total statistical error, which corresponds to σ ( f Hg ) < 0.05 × σ ( f n ) = 0.2 µHz for one cycle of measurement in one chamber. In terms of magnetic-field sensitivity, this corresponds to 25 fT. In turn, the sensitivity goal of the co-magnetometer sets a goal for the temporal stability of the magnetic field during the expected 180 s spin-precession time. Indeed, the drift of the magnetic field during the precession time has an impact upon the mercury frequency extraction. In order to ensure that the accuracy of the co-magnetometer is not reduced by magnetic-field drifts, it should be of the same order as the magnetometer precision, i.e. σ (B) ∼ 25 fT over 180 s.
Assuming the same UCN source performance that was provided in 2016 (see Table 1), we plan about 500 days of data taking, which can be accomplished within four years of operation. Therefore, after completion of the data taking, the total accumulated statistical sensitivity is expected to be at the level of σ (d n ) = 1 × 10 −27 e cm. Further upgrades and UCN source improvements could allow the measurement to reach sensitivities well into the 10 −28 e cm range.

Frequency shifts and systematic effects
There are a number of known effects that shift the neutron and mercury frequencies from the ideal case given by Eqs. (7) and (8). These are all encapsulated in the following formula, which is valid for individual chambers: where the three terms δ elec , δ mag and δ other are much smaller than one. The first contribution corresponds to the electrical terms (i.e. they are absent in zero electric field). The second contribution corresponds to the nonuniform magnetic terms (i.e. they are absent in a purely uniform magnetic field). The last contribution δ other corresponds to all other effects. The true EDM term δ true EDM is induced by the linear-inelectric field frequency shifts from the true neutron and mercury EDM: where the + sign corresponds to the anti-parallel (↑↓ or ↓↑) configurations, and the − sign corresponds to the parallel (↑↑ or ↓↓) configurations. The contribution of the mercury EDM: is negligible. Here we have used the most recent measurement by the Seattle group d Hg = (2.2 ± 3.1) × 10 −30 e cm [5]. All of the other δ shifts could generate two types of undesirable consequences. First, they could induce random fluctuations of the ratio R which would increase the statistical error. Second, any correlation between the electric-field polarity and one of these terms will induce a direct systematic effect. Although the first type imposes requirements on the stability of environmental variables, in particular the magnetic-field gradients, it is possible to make these additional fluctuations negligible and we will not address them. Here we will concentrate on the latter effects which, following Eq. (13), correspond to a systematic effect of when considering the two-chamber extraction of the neutron EDM.
Before we describe all of the δ terms in detail, we pause to explain the different conventions used here.
For the sign conventions, we define an angular frequency ω as an algebraic quantity the sign of which is determined with respect to the z axis pointing upwards, i.e. ω > 0 corresponds to a rotation in the horizontal plane following the right hand rule. Note that, since γ n < 0, the neutron angular frequency ω n = γ n B 0 is negative when the magnetic field is pointing up. It is opposite for the mercury atoms because γ Hg > 0. The quantity B 0 is likewise algebraic. It is positive when the field is pointing up and negative when the field is pointing down. The frequencies are defined as positive quantities, i.e. f = |ω|/2π .
To describe the magnetic-field non-uniformities, we use the framework developed in [36] which defines a parametrization of a general field in the form of where G l,m are the generalized gradients and the functions Π l,m , or modes, form a basis of harmonic functions constructed from the solid harmonics. The modes expressed in Cartesian coordinates are polynomials in x, y, z of degree l.
Note that the center of the system of coordinates is in the middle of the two chambers. The G l,m gradients describe the field in the entire inner experiment where the two chambers are located.
In cylindrical coordinates ρ, φ, z the modes take the form of withΠ l,m (ρ, z) being a polynomial function of ρ and z of degree l, and the azimuthal part is Explicit expressions for the relevant modes are specified in Table 2.

Gravitational shift and uncompensated gradient drift
The kinetic energy of ultracold neutrons is so low that their spatial distribution is significantly affected by gravity, and their center of mass lies a fraction of a centimeter below the geometric center of the chamber. In contrast, the mercury atoms form a gas at room temperature that fills the precession chamber nearly uniformly. This results in slightly different average magnetic fields being sampled by the neutrons and the atoms in the presence of a vertical magnetic-field gradient. This effect is called the gravitational shift δ grav . In the framework of the harmonic decomposition of the field up to the second order, the volume average of the vertical where z TOP and z BOT are the center of mass offset between the neutron and mercury in the top and bottom chamber, and H = 18 cm is the height difference between the centers of the top and bottom chambers. The gravitational shift could induce an additional statistical error (due to an instability of the gradients G 1,0 or G 2,0 ) and a systematic effect (due to a direct correlation of the gradients with the electric-field polarity). For simplicity we will only discuss the effect of the linear gradient G 1,0 , and will neglect the second order term G 2,0 . In the nEDM singlechamber apparatus we measured a value of z = −0.39 cm. For the n2EDM estimates we use the values calculated from the simulated energy spectra in Fig. 5, z TOP = −0.09 cm and z BOT = −0.12 cm.
A fluctuation of the gradient G 1,0 with a RMS value of σ (G) induces a contribution to the fluctuation of R TOP − Notice that the effect of the linear gradient drift is reduced when using the double-chamber concept, as compared to the single chamber, because z TOP ≈ z BOT . Still, the residual imperfect compensation of the gradient drifts could generate a direct systematic effect which is called the uncompensated gradient drift. The application of the electric field might itself generate a magnetic-field change which is correlated to the voltage of the central electrode V . Such an effect might be due to the leakage current from the high-voltage electrode to the ground electrodes. It could also be due to a magnetization of the shield by the charging currents during voltage ramps.
In principle the mercury co-magnetometer cancels any field fluctuations, including those correlated with the electric field. However, the cancellation is not perfect due to the gravitational shift. The false EDM due to the correlated part of the gradient δG(V ) is The goal for n2EDM is to have this systematic effect under control at the level of 1 × 10 −28 e cm, corresponding to a control over the correlated part of the gradient at the level of δG(V ) ≤ 1.5 fT/cm.
One possible strategy would be to perform dedicated tests to check for a possible G/V correlation, with frequent reversals of the electric polarity while measuring the magneticfield gradient with the mercury co-magnetometers and the array of atomic cesium magnetometers. For definiteness we consider a series of 1000 polarity reversals, each one lasting about 5 min. The stability of the magnetic-field gradient σ (G)[5 min] will limit the resolution on the sought effect: This sets a requirement on short time variations of the gradient to:

Shift due to transverse fields
Residual transverse field components B x and B y are averaged differently by the neutrons and the mercury atoms. This produces a shift in R denominated the transverse shift δ T . When a particle (a neutron or a mercury atom) moves in a static but non-uniform field it effectively sees a fluctuating magnetic field B(r(t)), where r(t) is the random trajectory. In addition to the intrinsic depolarization process already discussed in the previous section, the fluctuation induces a shift of the Larmor precession frequency. In fact the shift is induced by the transverse component of the field, which can be described by the complex perturbation b(t) := B(r(t)) · (e x + ie y ).
We will again make use of the autocorrelation function of the perturbation b * (t)b(t + τ ) , where the brackets · denote the ensemble average over all of the particles in the chamber. Note that since the motion of the particles is stationary in Spin-relaxation theory allows calculation of the angular-frequency shift at second order in the perturbation b: The timescale of the correlation function is set by the correlation time τ c that we introduced in the previous section. Although Eq. (18) defines and Eq. (20) estimates the correlation time for the longitudinal field b z and not that of the transverse field b, the quantity of concern here, the two are in general approximately equal. The autocorrelation function b * (0)b(τ ) decays to zero at times large compared to τ c . Let us consider first the case of the neutrons. We have seen in the previous section that the anticipated value for the correlation time of stored UCNs in n2EDM is τ c (ucn) ≈ 120 ms according to the estimation of Eq. (20). In a B 0 = 1 µT field the neutron angular frequency is ω n = γ n B 0 = −183 s −1 . Thus, we have |ω n τ c (ucn)| = 22 1; we say that the neutrons are in the high-frequency regime, sometimes also called the adiabatic regime. In this regime one can expand Eq. (37) in powers of 1/ω, and we find at the lowest order The ensemble average b * (0)b(0) is simply the volume average of the quantity b * b = B 2 x + B 2 y . This result of Eq. (38) can be understood with an intuitive picture of quasi-static neutrons: at any given time, each neutron precesses at a frequency |γ n /2π ||B| set by the magnitude of the field at the position of the neutron. This picture is correct because the precession frequency is very fast: a neutron stays at the same place throughout several spin rotations. At second order in b The ensemble of neutron spins precesses on average at a rate The second term of this expression is consistent with Eq. (38). Now let us consider the case of the mercury atoms. They have a mean speed of 180 m/s, which is much faster than the neutrons. Therefore, the correlation time is much shorter: τ c (Hg) ≈ 5 ms. In a B 0 = 1 µT field the mercury angular frequency is ω Hg = γ Hg B 0 = 48 s −1 . Thus, we have ω Hg τ c (Hg) = 0. 24 1, and therefore the mercury atoms are in the low-frequency regime, sometimes also called the non-adiabatic regime. In this regime one can expand Eq. (37) in powers of ω to get the following order-of-magnitude estimate: From this estimate one concludes that the relative frequency shift of mercury is much smaller than the relative frequency shift of the neutrons because δω Hg /ω Hg δω n /ω n ∼ (ω Hg τ c (Hg)) 2 ∼ 0.06.
The mercury atoms are much less sensitive to the transverse field compared to the neutrons. Indeed, during one spin rotation period a mercury atom explores the entire chamber several times and therefore the transverse components of the field effectively average out. In the case of the magneticfield design value of B 0 = 1 µT we will work in the approximation of perfect averaging of the transverse magnetic-field components, and write for the mercury frequency, i.e. effectively using a volume average of B z , only. Equations (39) and (42) can then be used to compute the shift δ T . Note that in these expressions the ensemble average B z is in principle different for the neutrons and the mercury atoms, but this difference is already accounted for by the gravitational shift. The expression of the transverse shift is therefore where With transverse fields of the order of B 2 T ≈ (500 pT) 2 , the transverse shift would give δ T ≈ 0.1 ppm. Although this is a significant shift relative to the statistical precision of R, it is not a critical concern in the double chamber design. This is because a direct systematic effect could arise only through a difference in the shift between the top and bottom chamber; correlated with the electric-field polarity, this is promoted to a direct systematic effect. This in turn is necessarily associated with a non-uniformity of the longitudinal component B z .

Motional field: introduction
Let us now come to the important description of the frequency shift induced by the motional field. According to special relativity, particles moving with a velocity v (in our case |v| c) in an electric field E experience a "motional" magnetic field The effect of the motional field on stored particles was first considered by Lamoreaux [40] who discussed the associated frequency shift quadratic in the electric field. Then Pendlebury et al. [41] discovered that the motional field also leads to a linear-in-electric-field frequency shift in the presence of magnetic-field gradients. Since then this topic has been studied theoretically [42][43][44][45][46][47][48][49] and experimentally [36,50].
This motional field affects both ultracold neutrons and mercury atoms when they are stored in the n2EDM chambers. Since the velocities of the particles are changing randomly in time, the motional field is in fact a magnetic noise transverse to E. Let us estimate the magnitude of this noise in a vertical electric field E = 15 kV/cm, i.e. the design value for n2EDM. For neutrons with RMS horizontal velocity v h ≈ 3 m/s, we obtain magnetic fields of about 50 pT. For mercury atoms at room temperature, the RMS horizontal velocity is 157 m/s and the corresponding RMS motional magnetic field is 2.6 nT.
The motional field B m (t) adds to the fluctuating field B(r(t)) originating from the random motion of the particle in the non-uniform magnetic field. Equation (36) can then be generalized, and the total fluctuating transverse field is described by the complex perturbation b(t) = (B m (t) + B(r(t))) · (e x + ie y ) (45) = E/c 2 (−ẏ(t) + iẋ(t)) + B(r(t)) · (e x + ie y ). (46)  In Fig. 9 a simulated random realization of the transverse field seen by a mercury atom is shown. As discussed before (at which time the motional field was neglected) any transverse magnetic perturbation generates a frequency shift given by Eq. (37). The total shift can be decomposed in powers of E as The term linear in E is while the term quadratic in E is The constant term δω B 2 was discussed previously; it corresponds to the transverse shift δ T . Next we will discuss the effects of the other two terms.

Motional field: quadratic-in-E shift
Let us first specify the angular-frequency shift δω E 2 for the neutrons, by taking the high-frequency limit of Eq. (49). For this purpose we expand the integral in powers of 1/ω by integration by parts and retain the dominant term Second, we specify δω E 2 ,Hg for the mercury atoms, which are in the low-frequency limit if B 0 = 1 µT. To calculate the low-frequency limit of Eq. (49) we first do an integration by parts to obtain Then, by the stationarity property we have Finally, we obtain the angular-frequency shift for the mercury atoms in the low-frequency limit by setting cos(ωτ ) = 1 in the above integral: The combination of Eqs. (50) and (54) leads to the expression for the quadratic-in-electric-field shift: With First, we set a requirement on the electric-field asymmetry. In order to limit the systematic effect due to the quadratic frequency shift in the d TB channel to lower than 1 × 10 −27 e cm, the electric-field strength must be the same in the top and bottom chamber with a precision better than 1% (i.e. |ΔE/E| < 10 −2 ). Second, we set a requirement on the voltage reversal. In order to limit the systematic effect due to the quadratic frequency shift in the d +/− channel to lower than 1 × 10 −28 e cm the absolute value of the voltage applied to the central electrode must be the same in the positive and negative polarities with a precision better than 0.1% (i.e. |ΔV /V | < 10 −3 ).

Motional field: false EDM
Now we will sketch the derivation of the high-and lowfrequency limits of the frequency shift linear in electric field given by Eq. (48).
The high-frequency limit, which applies for ultracold neutrons, is obtained by using the following approximation: which is valid if f (τ ) andḟ (τ ) are smooth functions decaying to 0 for τ → ∞. We apply this scheme to the function We have Therefore, at high frequency Doing the same with the function B y (0)ẏ(τ ) , and using Maxwell's equation with v 2 h = ẋ 2 + ẏ 2 = 2 ẋ 2 . Now, the low-frequency limit, which applies to mercury atoms at low values of B 0 , is simply obtained by using the approximation cos(ωτ ) = 1 in the integral Eq. (48): With Eqs. (60) and (61), we can derive the corresponding shift in the R ratio as where the + sign corresponds to the anti-parallel (↑↓ or ↓↑) configurations and the − sign corresponds to the parallel (↑↑ or ↓↓) configurations. The formula for the false neutron EDM in the high-frequency limit is The false EDM transferred from the mercury in the lowfrequency limit is

False EDM in a uniform gradient
At this point it is important to note that the false EDM is really the combined effect of the motional field and the nonuniformities of the static B 0 field. An assumption of a simple uniform vertical gradient of the form leads to and x B x + y B y = −G 1,0 In this situation, one can estimate the false EDM directly induced on the neutrons d false n and the one induced via the mercury d false n←Hg : where v h = 3 m/s, B 0 = 1 µT and R = 40 cm. It should be noted that the mercury-induced false neutron EDM is much larger than the directly induced neutron motional false EDM. Even if the residual field gradient inside the shield is reduced down to a fraction of a pT/cm, a systematic effect greater than 10 −27 e cm could still be generated. The general strategy to cancel the effect is to split the data production into many runs with different gradient configurations within the allowed range ±0.6 pT/cm. In this way we will measure the EDM as function of the gradient, extrapolating to zero gradient in the final step. In the nEDM experiment the gradient was inferred from the gravitational shift. However, the shift of the R ratio correlates only imperfectly with the gradient, because of all the other frequency shifts. In n2EDM the gradient can be extracted in a more robust way thanks to the double-chamber design. We define the Top/Bottom gradient as where H = 18 cm is the distance between the geometrical centers of the two chambers. The G TB will be accurately measured with the mercury co-magnetometers. At this point one can identify two possible failures of the extrapolation method that would each produce a residual systematic effect.
-First, a systematic shift of the mercury precession frequency of the upper co-magnetometer relative to the lower co-magnetometer will result in a systematically wrong gradient. This is quoted as co-magnetometer accuracy in Table 3. The aim is to constrain that error to lower than 1 × 10 −28 e cm. This sets a requirement on the accuracy of the magnetometers, which must be δ B Hg < 100 fT. Note that this requirement is less stringent than the requirement on the precision per cycle of 25 fT derived in section Sect. 3.5. All known sources of frequency shifts of the co-magnetometer are listed in the previous section (see also Sect. 5.4 for magnetometry).
-Second, and more importantly, the extrapolation procedure to G TB = 0 fails if the field non-uniformities are more complicated than a uniform gradient G 1,0 . It is useful to distinguish two types of non-uniformities: (i) Large-scale spatial B-modes of cubic and higher orders. These are generated by the imperfection of the mu-metal shield, for example due to the openings, and by imperfections of the B 0 coil. (ii) Magnetic dipole sources localized near the precession chambers, due to the contamination of the apparatus by small ferromagnetic impurities.

False EDM and phantom modes
To discuss more complicated field non-uniformities, we describe the field by the generalized gradients G l,m as defined in (29). With this formalism we can calculate the Top/Bottom gradient where L l are geometric coefficients. Modes with m = 0 do not contribute to the Top/Bottom gradient because the chamber is symmetric by rotation around the magnetic-field axis. Modes with even values of l are also absent because the top chamber is the mirror image of the bottom chamber with respect to the plane z = 0. An explicit calculation for the cubic and fifth-order modes gives the geometric coefficients There are axially symmetric field configurations, i.e. linear combinations of m = 0 modes, which are invisible in the double-chamber because they satisfy G TB = 0. We call these field configurations phantom modes. We define the basis of phantom modes of odd degree aś and similarly for all odd modeś The normalization of the phantom modes of odd degree are chosen such that In particular, for the phantom modes of degrees 3 and 5: The even modes Π 2,0 , Π 4,0 are also phantom in the sense previously defined, but they do not produce a false EDM and will not be discussed further. The odd phantom modes are of particular interest because they generate a false EDM without generating a Top/Bottom gradient. Specifically, a field configuration of the type generates a false EDM through Eq. (64), Obviously, the contribution proportional to G TB will be removed by the extrapolation to G TB = 0, but the contribution proportional to the phantom gradient,Ǵ =Ǵ 3 + G 5 + · · · , will remain. In Fig. 10 we show the B z field configuration corresponding to the phantom modes of order 3 and order 5. Our strategy to control the phantom modes is to use a combination of online and offline measurements, the former being more adequate for the low-order modes and the latter more appropriate for the high-order modes.
The online measurement of the field will be provided by an array of cesium magnetometers, which will be able to extract the gradients G l,m up to order l = 5. In particular the array will provide, online, a measurement ofǴ 3 = L 2 3 c 3 G 3,0 that will be used to correct for the corresponding systematic effect. As a guide to the design of the magnetometer array, we set the requirement that the error on the correction for the cubic phantom mode must be lower than 3 × 10 −28 e cm. This corresponds to an accuracy of δǴ 3 < 20 fT/cm.
The offline measurement will be performed by a mechanical mapping device. During the mapping the inner parts of the vacuum vessel, including the precession chambers, will be removed. This imposes a requirement on the reproducibility of the field configuration (it needs to be identical during the mapping and during the data-taking), and also a requirement on the accuracy of the magnetic-field mapper. As a design guide we set the requirement that the error on the correction for the fifth-order phantom modeǴ 5 = L 4 5 c 5 G 5,0 must be lower than 3 × 10 −28 e cm. This corresponds to an accuracy of δǴ 5 < 20 fT/cm. The requirements related to the control of the high-order gradients are summarized below in Tables 3 and 4. Note that the requirements on δǴ 3 and δǴ 5 concern the magnetic-field measurement and not the magnetic-field generation. Table 4 Summary of the requirements for the magnetic-field measurement (B-meas), magnetic-field generation (B-gen) and electric-field generation (E-gen) for the n2EDM design

False EDM and magnetic-dipole sources
Contamination of the inner parts of the apparatus by small ferromagnetic impurities generate a second important type of magnetic-field nonuniformity. Here we evaluate the induced systematic effect, and specify the tolerated level of contamination. A small magnetic impurity can be described as a magnetic dipole m. Such a dipole located at distance r d is a source of a dipolar magnetic field of the form B d (r) = (μ 0 /4π)(3(m·u)u−m)/|r−r d | 3 , with u = (r−r d )/|r−r d | representing the unit vector pointing from the dipole position. This will induce a false EDM d false n←Hg given by Eq. (64). In addition, the dipole source will generate a Top/Bottom gradient G TB measured by the mercury co-magnetometers, and will also affect the cubic phantom gradientǴ 3,meas extracted from the readings of the cesium magnetometers. However, the measured correction d false meas =h |γ n γ Hg |R 2 8c 2 G TB +Ǵ 3,meas will imperfectly estimate the actual false EDM given by Eq. (83), becauseǴ 3,meas will be shifted from the true valué G 3 and also because the higher-order gradientsǴ 5 ,Ǵ 7 , . . . generated by the dipole are not corrected for. A thorough numerical study of the influence of dipole strength and location was conducted, by considering a given dipole placed at different locations in the experimental volume outside the precession chambers and calculating the residual effect d false n←Hg − d false meas . The valueǴ 3,meas was calculated by considering the field produced by the dipole at the position of each magnetometer (see Sect. 5.4.3 for a description of the designed optimized positions of the magnetometers) and performing the harmonic fit to cubic order (up to l = 3). A sample of the results can be seen in Fig. 11, and corresponds to the top half of the y = 0 cm plane of the experiment. It shows the dipole strength |m| that produces a residual effect of 3 × 10 −29 e cm, the chosen maximum tolerated contribution for a single dipole. We allow for the presence of a maximum of 100 impurities with random and uncorrelated direction, such that the total systematic effect will be √ 100 times the contribution of one individual dipole, i.e. 3 × 10 −28 e cm (see Table 3).
The regions of the apparatus that are most sensitive to the presence of magnetic contamination are the outside of the insulating rings and the immediate proximity of each magnetometer. At these locations the critical dipole strength, i.e. the maximum tolerated dipole strength to meet the requirement for the contribution for individual dipole, was found to be 5 nA m 2 . This dipole strength corresponds to an iron dust particle of diameter ≈ 20 µm magnetized to saturation. It would produce a field of approximately 1 pT at 10 cm distance. Other locations are less sensitive but must still be protected against magnetic contamination. In fact all components of the apparatus inside the magnetic shield must be magnetically scanned to exclude dipoles larger than specified. For example, the vacuum tank (represented as a horizontal black line at z = 65 cm in Fig. 11) must be carefully quality controlled such that dipoles larger than 500 nA m 2 are excluded.

The magic-field option to cancel the false EDM
We have argued that the significant gain in statistical sensitivity in n2EDM will be obtained by the use of a large double chamber. In the described design the diameter of the chambers will be 80 cm, while the vacuum vessel is designed to host a chamber as large as 100 cm for a future phase of the experiment. This is made possible by the very large magnetically shielded room, with inner dimensions of almost 3 × 3 × 3 m 3 . The enlargement of the chambers, as compared to the 47 cm diameter single-chamber of the previous nEDM apparatus, comes at the price of an increase in the systematic effect due to the mercury motional false EDM. This can be clearly seen from Eq. (64). As discussed, controlling the effect induced by the phantom modes brings about a number of challenges: (i) the cesium magnetometers must reach the required accuracy to measure at least the cubic phantom mode online, (ii) the higher-order modes must be reproducible enough to be able to measure these modes offline, (iii) magnetic contamination must be kept at a very low level.
These challenges, and the associated risks for the measurement, prevail if the mercury co-magnetometer operates in the low field regime, as it is the case in the design with B 0 = 1 µT. There is an alternative possibility that can considerably relax the constraints on the measurement of field nonuniformities. It consists of increasing the B 0 field to a value that cancels the mercury false EDM [51]. We recall that the false neutron EDM inherited from the mercury is where C(τ ) is the correlation function and ω = γ Hg B 0 . The correlation function C(τ ) can be calculated with a Monte Carlo simulation of the thermal motion of mercury atoms in the chamber. In Fig. 12 we show the result for the false EDM as a function of the magnitude of the B 0 field. It is possible to which cancel the effect of the respective phantom modes. The magic fields for the different modes are very close. This makes the magic option attractive because it allows substantial reduction of the effect of several modes at the same time.
The magic-field upgrade option consists of setting the magnetic field to B 0 = 10.5 µT. This will suppress the effect of the fifth order phantom mode completely and will also reduce the effect of the cubic phantom mode by a factor of 30. The magic field is a factor of ten higher than that of the baseline design, and it therefore increases the difficulty of producing a stable and uniform field by an order of magnitude. It should be noted that the requirements of the field uniformity and stability concern the absolute rather than relative values. The n2EDM apparatus is designed to allow operation of the apparatus at the magic field and slightly above, after first running in the baseline configuration.

Other frequency shifts
In addition to the electric and magnetic terms, there are a number of other known shifts of either the neutron or the mercury precession frequencies that correspondingly affect the R ratio: Below we discuss each individual contribution.

Effects of AC fields during the precession: δ AC
Any transverse AC magnetic field during the precession generates a frequency shift for the neutrons and mercury atoms. In addition to the AC field seen by the particles moving in a static but non-uniform field (already taken into account by the term δ T ) as well as the fluctuating motional E×v/c 2 field (already taken into account by the terms δ false EDM and δ Quad ), the other known possible source of AC fields are (i) ripples in the voltage generated by the HV source [14]; (ii) the Johnson-Nyquist noise generated by the metallic parts, in particular by the electrodes [52] . These were found to be very small effects and will not be discussed in detail here.

The effect of Earth's rotation: δ Earth
Since the precession frequencies of mercury and neutron spins are measured in the Earth's rotating frame, the frequencies are shifted from the pure Larmor frequency in the magnetic field [53]. One can derive the following expression for the associated shift of R: where f Earth = 11.6 µHz is the Earth's rotation frequency, f n = 29.2 Hz and f Hg = 7.6 Hz are the neutron and mercury precession frequencies in a field of B 0 = 1 µT, and θ = 42 • is the angle between the direction of B 0 and the rotation axis of the Earth. In the previous formula the -sign corresponds to B 0 pointing upwards and the + sign corresponds to B 0 pointing downwards. The shift is large enough to be resolved in principle with a single data cycle (although in fact measurements are needed with both directions of the B 0 , so two cycles are required), provided the other shifts are constant.
A direct systematic effect could arise in principle if electric-field reversals cause a tilt of the magnetic axis relative to the Earth's rotation axis. However, in the doublechamber design this direct systematic effect could arise only in the case of different tilts in the top and bottom chamber (see Eq. (28)). Such a magnetic tilt is necessarily associated with a gradient of the longitudinal field, and the requirement set on the control of the gradients in Eq. (35) guarantees that the direct systematic effect due to the Earth's rotation will be negligible.

The mercury light shift: δ light
This term corresponds to a shift of the mercury precession frequency proportional to the intensity of the UV probe light. This small effect should be taken into account in the design of the mercury co-magnetometer (in particular, good monitoring of the light intensity must be foreseen) but does not impose stringent requirements on the magnetic field generation or magnetic field measurement.

The effect of the mercury pulse: δ pulse
The mercury pulse is generated while the neutrons are already present in the chamber. Therefore, the neutron spins are affected by the mercury pulse: they will be slightly tilted before the first neutron pulse is applied. In turn, this could shift the measured Ramsey resonance frequency. This effect must be taken into account when designing the generation of the mercury pulse. The frequency shift can be reduced by adjusting the duration, phase, and shape of the mercury pulse. Care will be taken to avoid indirect cross-talk with the high-voltage polarity. However, this effect does not impose stringent requirements on the magnetic field generation or magnetic field measurement.

The pseudomagnetic field generated by polarized mercury: δ psmag
Due to the spin-dependent nuclear interaction between the neutron and the mercury-199 nucleus, quantified by the incoherent scattering length b i ( 199 Hg) = ±15.5 fm [54], the UCNs precessing in the polarized mercury medium are exposed to a pseudo-magnetic field [55] where m n is the neutron mass, n Hg is the number density of atoms in the precession chamber and P is the mercury polarization. The pseudo-magnetic field is much larger than the genuine magnetic dipolar field generated by the polarized mercury atoms. The mercury polarization normally precesses in the transverse plane, but it could have a residual static longitudinal component P in the case of an imperfect π/2 pulse. In this case, a shift of the neutron frequency arises that corresponds to a relative shift of the R ratio of This small effect will be taken into account in the design of the mercury magnetometer, in particular the control of the mercury pulse, but it does not impose stringent requirements on the magnetic field generation or magnetic field measurement.

Summary of the requirements
In summary, we have described the known sources of systematic effects and discussed how to address them in the n2EDM experiment. The apparatus is designed to keep the total systematic error below 6 × 10 −28 e cm. The error contributions are expected to be distributed according to the budget shown in Table 3. The dominant contributions to this budget originate from the mercury false EDM effect, which could be reduced by operating the apparatus at the magic value of the magnetic field in a future upgrade. Through consideration of the statistical and systematic errors we have derived the basic requirements on the perfor-  Table 4 the requirements specifically related to magnetic field generation and measurement. These requirements constitute the basis for the technical design of the core systems of the n2EDM apparatus, which are described in the next section.

The core systems of the n2EDM apparatus
In this section we give an overview of the n2EDM baseline design. Figure 13 shows the layout of the apparatus positioned in the experimental area south of the UCN source at PSI. We describe the core n2EDM systems responsible for UCN transport and storage, as well as those for the required magnetic field environment and its control.

UCN precession chambers
The two UCN precession chambers lie at the heart of the experiment. They consist of three electrodes separated by two insulator rings, stacked vertically as shown in Fig. 14.
The precession chambers are cylindrical in shape, of height 12 cm and inner diameter of 80 cm, with a design that will allow an upgrade to 100 cm. The diameter is increased in comparison to the previous nEDM experiment in order to increase the number of stored neutrons, while the (unchanged) height results from a compromise between the electric field strength and the number of stored neutrons. The dimensions and shape are based on the experience with the previous apparatus and are scaled to the largest possible diameter, currently limited by raw material size and machining capacities.
The upper and lower chambers are separated by the central HV electrode, which is supplied with ±180 kV. The insulator rings separating the electrodes have a wall thickness of 2 cm. The design of the electrodes is driven by minimizing UCN losses, optimizing the storage behavior for polarized UCNs and polarized Hg atoms, and withstanding high electric fields (see Sect. 5.1.2).
The storage of UCNs requires surfaces to have a high neutron optical potential. We use diamond-like carbon (DLC) [56][57][58][59][60][61], with a measured optical potential V DLC ≈ 230 neV, as the electrode coating. For the insulator-ring coating it is planned to use deuterated polystyrene (dPS) [34], with V dPS ≈ 160 neV, or else a coating based on similar deuterated polymers.
The precession chamber stack will be placed inside the vacuum vessel, which is itself manufactured from aluminum with a usable internal volume of 1.6 × 1.6 × 1.2m 3 . The size of the magnetically sensitive area is significantly larger than in any previous or ongoing EDM experiment. This imposes serious challenges in order to ensure a stable and uniform magnetic field environment (see Sects. 5.2-5.4).

Electric field generation
The system of electrodes both confines the UCN precession volumes and provides the electric field in the n2EDM experiment. The central electrode will be connected via a feedthrough in the vacuum tank to the HV power supply, which will provide ±180 kV. The two outer electrodes will be grounded. The optimisation of the electrode design is essential for achieving the highest electric field within the precession chamber, which increases the sensitivity to the neutron EDM. The optimisation process was performed with COM-SOL [62], a finite element simulation software that allows one to build complex geometries of different materials and to simulate the resulting fields. The only requirement for the HV system is to provide a stable and uniform 15 kV/cm electric field, but there are several additional constraints on the design of electrodes.
-The Cs magnetometer arrays are mounted on the outer surfaces of the ground electrodes. The array has components that are sensitive to electric fields, and exposure must be minimized. -Sharp edges can trigger field emission, limiting the maximum achievable electric field. In particular, the vacuum tank has a structured inside surface so the electric field should be close to zero there. -The overall height of the entire precession chamber stack, including the components mounted on the outer surfaces -namely the UCN shutters, mercury polarization volumes and Cs magnetometer arrays -must fit in the available space. In total, this means an upper limit of 400 mm from the outer surface of one ground electrode to that of the other. The maximum potential difference attained in the previous nEDM experiment was ±200 kV. Using a COMSOL simulation with the nEDM geometry the maximum electric field at any point was found to be 30 kV/cm, which provided a limit for the highest acceptable field in the n2EDM design.
In Fig. 15 the optimized electrode geometry is illustrated. The different parameters of the geometry, listed in the legend, were varied independently of one another. Particular care was taken during the optimization process to control the electric field strength at the locations indicated by the arrows.
To meet the electric field goal, the thickness of the HV electrode was set to 6 cm to give a large enough radius on the electrode corona. The diameter of the HV electrode was found to be optimal at 100 cm to separate the influence of the electric field generated by the corona radius and the presence of the window needed for the UV light beam of the Hg magnetometer.
The thickness of the ground electrode was determined by the need for moderate radii around the UCN shutter hole (see Fig. 15), the groove for the insulator ring, and the corona, while still staying within the available space constraints. It was optimized to be 3 cm. The insulator ring groove depth is limited by the available material thickness to 1.5 cm.
A grounded cage of discrete aluminum rods surrounds the central electrodes and insulator in order to minimize the electric fields outside the region of the electrode stack. Several concepts were investigated: an assembly of rings, a fully enclosed shell, or a hybrid of the two designs. Performing COMSOL simulations of the various designs determined that they were all similar in terms of electric field containment. A fully enclosed shell, however, would have caused severe attenuation of the π/2-flip Ramsey pulses, and therefore a hollow-ring open-cage design was chosen. This also minimises weight, simplifies the design and installation, and allows better vacuum performance. The simulations opti-mised the shape and position of the rings while taking into account the need to allow the shell to be split into two halves for mechanical mounting and to have a large enough gap between each ring for effective vacuum pumping and penetration of the Ramsey-pulse fields.

UCN transport
The n2EDM apparatus is set up at Beamport South of the PSI UCN source. The position of the UCN chambers and the guiding of the UCNs from the UCN source to the chambers was optimized using the MCUCN code [28].
The UCNs first traverse the open beamport shutter, located just after the superconducting magnet (see Fig. 16). Then the UCN guide splits smoothly into two separate tubes, guiding the UCNs towards the two precession chambers through the UCN switch -a major component of the UCN transport system. The switch is located between the superconducting magnet and the MSR, and can operate in filling and counting configurations (see insert in Fig. 16). This is achieved by two movable UCN guides, one for each precession chamber. The UCNs first fill the precession chambers (filling configuration). The chambers are then closed by UCN plugs connected to two shutters: one on the top of the upper chamber, the other below the lower chamber. When emptying the precession chamber, the switch connects the same UCN guides used during filling to the spin-sensitive detection system (counting configuration). The third (test) mode of the switch permits the guiding of UCNs directly from the source to the detectors in order to monitor the UCN source performance.
The switch design was based on the common theme of maximizing the transmission efficiency. This resulted in stringent specifications such as the necessity to maintain the same total cross section for UCNs throughout their path in the apparatus, the optimization of the number of bends and the maximization of their radius of curvature, and the minimization of gaps between guides as far as reasonably possible with a target of 0.1 mm.
The UCN guides are made of glass tubes with an inside diameter of 130 mm and a NiMo coating with ultralow surface roughness [17]. The manufacturing of the UCN guides follows the process developed and successfully employed during the construction of the PSI UCN source [63]. The same process was used to produce the guides of the nEDM apparatus, where UCN transmissions above 97% per meter were achieved.

UCN spin-sensitive detection
At the end of the precession time, UCNs stored in the upper and lower precession chambers are released and directed towards two identical spin-sensitive counters. There, UCNs Fig. 16 Scheme of the beamline outside the MSR. The switch with movable UCN guides can operate in three modes: when UCNs are filling the precession chambers (filling configuration); when UCNs from the precession chambers are directed towards the two simultaneous spinsensitive detectors (counting configuration); and a third (test) mode of the switch (not shown here) that permits guiding of UCNs directly from the source to the detectors in order to monitor the UCN source performance are counted as a function of their spin state, behind distinct simultaneous spin analysers [64].
A UCN may be detected either in a spin-up state (spin parallel to the main magnetic field) or in a spin-down state (spin antiparallel to the main magnetic field). In order to detect simultaneously UCN of both spin states, a custom device consisting of two vertical arms, each arm being dedicated to the analysis of one spin state, has been designed and built. The first element of the device splits the UCN guide into two arms (see the Fig. 16 for the detailed geometry). Each arm consists of an adiabatic spin-flipper (ASF), an analyzing foil and a UCN counter (see Fig. 17). The adiabatic spin-flipper consists of a shielded RF coil installed upstream of the foil. Its operating principle is described in [65]. Spin-up UCNs are counted in the arm where the ASF is on, and spin-down UCNs in the arm where the ASF is off. The role of each arm is regularly reversed in order to minimize systematic effects. Ultracold neutrons entering the wrong arm with respect to their polarization (around 50% of the incoming UCNs) are reflected on the foil, and obtain a second chance to be detected in the correct arm. The internal shape of the unit is specifically designed to guide the reflected UCNs from one arm to the other and hence to improve the efficiency of the spin analysis.
The spin analysis itself is performed by transmission through (or reflection from) an iron foil magnetized to saturation (B sat ≈ 2 T ) and located below the ASF. Ultracold neutrons are able to cross the foil if their kinetic energy associated with motion perpendicular to the foil (E ⊥ ) is larger than where V Fe is the Fermi potential of iron, μ n is the neutron magnetic moment, and B sat the magnetic induction inside the iron layer. The ± sign reflects the spin dependency of the magnetic interaction and stands for the spin-up and spindown components, respectively. Numerical estimates performed with the Fermi potential of the iron foil (V Fe = 210 neV) and the magnetic potential energy (μ n B sat = 120 neV) show that UCNs with energy E ⊥ < 90 neV are reflected on the foil whatever their spin state while UCNs with E ⊥ > 330 neV are transmitted through the foil. Between 90 neV and 330 neV the spin analysis (discrimination) is operational: spin-down UCNs are able to cross the foil while spin-up UCNs are reflected. Finally, the number of UCNs of a given spin state is counted with the counter installed below the foil.
It is important to emphasize that the height between the precession chambers and the spin analyzing foils is a critical parameter. The maximum kinetic energy of UCNs exiting the precession chambers is given by the Fermi potential of the insulator ring coating, V D P S = 165 neV, as shown in Fig. 5. As a result, the height difference between the precession chambers and the spin analyzing foils should not exceed 165 cm in order to prevent UCN exceeding 330 neV -the maximum analyzable kinetic energy of the UCNs.

UCN counter
The UCN counter is a fast gaseous detector [66]. The neutron detection is based on scintillation occurring in a gas mixture of 3 He and CF 4 . Neutrons are captured by 3 He nuclei through the reaction and the emitted proton and triton cause scintillation of the CF 4 molecules. The scintillation decay time is only about 10 ns [67], which provides a high count-rate capability up to a few 10 6 counts/s. The scintillation light is detected by three photomultiplier tubes working in coincidence. The partial 3 He gas pressure required to fully stop the UCN beam is low, between 10 and 20 mbar. The gas mixture is completed with CF 4 , and the detector is sealed. In order to reduce the probability of gamma interaction on CF 4 molecules as well as UCN upscattering, the partial CF 4 gas pressure is reduced to P(CF 4 )= 400 mbar.

Magnetic field shielding
A magnetically stable and uniform field is mandatory in order to exploit fully the statistical reach of the experiment. This is achieved by means of passive and active magnetic shielding, which are illustrated in Fig. 18. Passive magnetic shielding is provided by a large cubic magnetically shielded room (MSR). Its performance in the low frequency range (< 5Hz) is improved by the active magnetic shield (AMS), which consists of a system of actively controlled coils. The AMS is mounted on a grid around the MSR, and it compensates external magnetic field changes at the outermost mu-metal layer of the MSR.

Passive magnetic shield
The MSR, which was built in partnership with the company VAC, 2 provides the magnetic environment for the central part of the experiment. It suppresses external, quasi-static fields by roughly five orders of magnitude: a quasistatic shielding factor of better than 70,000 at 0.01 Hz was specified. After degaussing, the innermost central space was required to have a residual magnetic field smaller than 0.5 nT and a magnetic field gradient of less than 0.3 nT/m. The MSR design is based on the magnetic shielding requirements alongside the need to house the n2EDM apparatus in an optimal fashion. It incorporates six cubic layers of mu-metal and one additional layer of aluminum for radiofrequency shielding.
The MSR is composed of two cubic-shaped nested mumetal rooms, referred to as "inner" and "outer". The overall outer dimensions are given by a footprint of about 5.2 m × 5.2 m, as indicated in Fig. 19, and a height of 4.8 m. It has a total weight of about 50 tons.
The outer room has a two-layer mu-metal wall as well as an 8 mm thick aluminum layer that serves as an eddycurrent shield. The inner room consists of a four-layer mumetal shield, where the innermost layer is constructed from a specially selected high-permeability metal. It is a cube with inner dimensions of 293 cm on each axis. A small but accessible intermediate space between the inner and the outer rooms creates a useful and moderately magnetically shielded space close to the central apparatus. There, sensitive electronics for signal amplification, shaping and measurement may be located, e.g. pre-amplifiers for magnetometers, or precisioncurrent sources. All parts of the inner cabin were tested for magnetic impurities at PTB's BMSR-2 facility [68].
Each layer of the MSR is equipped with a separate set of degaussing coils. The ability to degauss each layer in this manner helps to provide uniform residual magnetic fields.
An air-conditioned thermal enclosure maintains the outer MSR at a temperature stable to 1 • C, and the innermost magnetically shielded room together with the apparatus has a temperature stability of better than 0.1 • C. This prevents thermal gradients across the MSR or temperature changes that would otherwise lead to magnetic-field changes through thermal expansion of materials and/or thermal currents.
The position of the MSR was chosen so as to allow for a straight path for UCNs from the source in order to minimize transport distance and losses.

Active magnetic shield
The n2EDM experiment is located in the vicinity of other facilities generating variable magnetic fields of similar strength to the Earth's own field. Our experiment therefore experiences a magnetically noisy environment, subject to changes in the ambient magnetic field of up to tens of µT on timescales from minutes to hours. In order to realize the required magnetic field conditions in the inner part of n2EDM, shielding from external magnetic field changes is of key importance.
The stability of the magnetic field within the MSR is directly dependant on the stability of the field around the MSR. There are two complementary mechanisms for this. First, attenuation of external field fluctuations before they affect the MSR will improve the overall shielding factor multiplicatively. Second, avoiding changes in the magnetization of the outer passive shielding layers eliminates long-term drifts of the magnetic field inside the MSR.
In order to provide stable magnetic-field conditions around the MSR, the Active Magnetic Shielding (AMS) system was designed. It consists of a system of actively controlled coils.
Before the n2EDM construction, the magnetic field in the empty experimental area was mapped in 3D several times with different combinations of nearby superconducting magnets from other research installations switched on or off. It was found that the external field can be described with a precision of approximately 1 µT using a set of eight harmonic polynomials: three homogeneous components with five firstorder gradients were able to match the reproducibility of the measurement. The measured field values were up to 50 µT in each spatial direction, and the gradients were up to 5 µ T/m in each of the five linear components, thus specifying the required field strength for each component needed fully to compensate the large external field changes. The 1 µT field mapping accuracy was chosen as a target for the fieldcompensation accuracy.
The space available for the placement of coils is limited, being approximately 8 m in each dimension. A complex coil geometry is required to produce the desired compensating field. Additionally, coil elements cannot be placed at arbitrary locations due to conflicts with other parts of the apparatus as well as other practical considerations. An algorithm was developed to allow the design of geometry-confined coils that would produce arbitrary field configurations [69]. This allows the placing of current-carrying wires along a predetermined but not completely uniform grid that is mounted on the inside of the thermal shell around the MSR (see Fig. 18).

Magnetic field generation
Ramsey's method of oscillating fields requires polarized UCNs, a static B 0 field and two RF field pulses. The UCN polarization is achieved with a 5 T superconducting solenoid. The static field is mainly generated by a single large coil (the "B 0 coil") and its coupling to the innermost layer of the shield. An array of 56 independent correcting coils is used to tune the field to the required level of uniformity. Seven coils produce specific gradients that play an important role in the measurement procedure. Finally, the RF pulses of the Ramsey cycle are generated by RF coils installed inside the vacuum tank.

B 0 field generation
A B 0 field of 1 µT is produced by a vertical cubic solenoid complemented with two sets of seven horizontal loops symmetrically located on the top and the bottom. These end-cap loops help to suppress the field nonuniformities induced by the finite size of the magnet. The coil is fixed on a cubic support outside the vacuum tank, located at about 10 cm from the innermost mu-metal layer of the shield (Fig. 20). On one side, a large rotating door of size of 2 m × 2 m allows access to the central part of the experiment. The field produced by the B 0 coil and its coupling to the innermost layer of the shield was simulated with the COM-SOL software package. For a current of 12 mA through the B 0 coil the magnitude of the field at the center is about 1 µT, with approximately one third arising from the magnetization of the innermost mu-metal layer. The B 0 field is expected to increase a few percent after equilibration (degaussing within a non-zero surrounding and/or inner field). The field variations around the central value B(0) have been estimated by computing ΔB(r) = |B(r) − B(0)|. The variations, shown in Fig. 21, do not exceed 100 pT in a large volume that includes the precession chambers. The observed nonuniformities come from the openings that are present in the MSR walls as well as from a recess of the MSR door with respect to its surrounding wall.
From the simulated field maps it is also possible to estimate the field uniformity σ (B z ) in the region of the precession chambers. The achieved uniformity, σ (B z ) = 16 pT, is well below the requirement of 170 pT (see Sect. 3.4). The requirement is also fulfilled when the magnetic field is increased to the "magic" value of 10 µ T.
Such a high degree of uniformity is very sensitive to the reproducibility of the equilibration, and also to imperfections in the shielding material due to the construction from single sheets and the coupling of the B 0 field with the innermost shielding layer. Mechanical alignment is also critical; for instance, a vertical misalignment of one millimeter between the entire B 0 coil and the MSR triples the field nonuniformities as compared to the ideal symmetric case. While the B 0 coil will be installed with great care, unavoidable imperfections will remain. In order to suppress the induced nonuniformities a set of 56 independent rectangular trim coils is used. They are fixed on the same cubic support as the B 0 coil, with nine or ten coils per side. These can produce all generic field gradients up to the 5th order.
With a B 0 field of 1 µT, a stability of a few dozen fT on the timescale of a minute is required to achieve an efficient operation of the Hg co-magnetometer (see Sect. 5.4.1). The coil is therefore powered by an ultra-stable current source with a relative stability of a few ×10 −8 .

Generation of specific gradients
To control the magnetic-field gradient during data taking, as well as to study various systematic effects, seven additional field and gradient coils are mounted to the B 0 coil support.
A constant offset value for the three field components can be generated by three independent coils, with the underlying uniform B z component being produced by the B 0 coil. The linear gradients of the B z component, ∂ B z /∂ x, ∂ B z /∂ y, and ∂ B z /∂z, can also be generated. Besides the optimisation of α (see Sect. 3.4), these are used to monitor and/or control in situ the positioning of every Cs magnetometer at the mm level (see Sect. 5.4.2). The field measured by each magnetometer probes their position in the three directions. The ∂ B z /∂z field is also used to perform the vertical tuning of the B z component in order to fulfill the top/bottom matching condition (see Sect. 3.4). The power supply of the ∂ z B z coil allows variation in the vertical linear gradient with a resolution of 0.01 pT/cm. Finally, it is important to control the gradients responsible for the most significant systematic effect, the motional EDM. Therefore, in addition to the ∂ B z /∂z gradient, two other gradients that are of particular interest, G 2,0 and G 3,0 , are produced by two additional independent coils.

RF field generation
Rotating fields perpendicular to the B 0 field are used at the beginning and end of the Ramsey cycles to flip the spins of the UCNs and of the Hg atoms into and out of the horizontal plane. These fields, of frequencies ∼ 30 Hz and ∼ 8 Hz respectively, are generated by the eight RF coils: four along the x axis and four along the y axis. The coils are located inside rather than outside the vacuum tank because of the pronounced damping that would be caused by the thick aluminum walls. Finite-Element Method simulations using ANSYS [70] were performed to study the impact of the electrodes and other conductive components close to the coils, and to optimize the setup. The simulated spatial homogeneity inside the precession chamber for the UCN pulse is σ RF < 120 pT, well below the 170 pT upper limit requirement (see Eq. (21)).

UCN spin transport
The 5 T superconducting magnet (SCM) acts as an almost perfect polarizer (P > 99%), producing an axial (horizontal) polarization. The transport of the UCN spin from the SCM to the precession chambers has two parts: outside the MSR, the SCM fringe field is sufficiently large to fulfil the adiabatic transport condition. At the MSR, the field is rotated from axial (horizontal) to transverse (vertical) and is adapted to the B 0 field strength between the shield entrance and the inner cabin of the MSR.

Magnetometry concept
Statistical and systematic uncertainties in a neutron EDM experiment depend on the homogeneity and the stability of the main magnetic field B 0 , in which the neutrons precess. The overall goal of the magnetometry systems in the n2EDM experiment is to ensure that all magnetic-field-related uncertainties are small compared to the fundamental statistical uncertainty given by the UCN counting. The two major magnetometry systems are the Hg co-magnetometer and an array of Cs magnetometers.
The magnetic-field information provided by the magnetometers of n2EDM is used in three sequential phases: before, during, and after the actual measurement. In an initial phase, before the neutron measurements start, information about the magnetic field has to be acquired in order to provide a magnetic environment that allows for long neutron precession times. Magnetic-field inhomogeneities increase the neutron's depolarization rate and thus lead to a smaller visibility α, which in turn decreases the statistical sensitivity (see Eq. (5)). Since it is impossible to correct for a faster loss of neutron spin polarization after the measurement, the B 0 field must be sufficiently tuned for a high visibility α. We plan to use a magnetic-field mapper to study the distribution of the field inside the MSR in dedicated measurements once per year, usually during the accelerator shutdown period. We will also employ the array of Cs magnetometers (see Sect. 5.4.3) to fine-tune the field homogeneity during UCN data taking after each change of the magnetic-field polarity. This concept proved to be successful in our previous nEDM experiment and routinely provided neutron spin relaxation times of more than 1200 s [18].
During the data taking with neutrons, magnetic-field information is essential in order to keep the neutrons in a magnetic resonance condition. Ramsey's method provides a unique sensitivity to the Larmor precession frequency only if the final measurement of the neutron spin is on the steep slope of the interference pattern. In order to stay at these positions, it is necessary to correct for drifts of the magnetic field by adjusting the rf-pulse frequency or the relative phase between first and second pulse. In the previous experiment the field value measured in the previous Ramsey cycle using the Hg co-magnetometer (see Sect. 5.4.2) was used to compute the frequency of the Ramsey pulses. In n2EDM we will use the magnetic-field values deduced from the two Hg magnetometers to stabilize the working points. To achieve that, two parameters need to be controlled, for example the ∂ B z /∂z gradient and the frequency of the Ramsey pulses. We plan to keep the parameters that influence the working points static during a Ramsey cycle. They are chosen before the cycle starts based on the information from the previous Ramsey cycle. A dynamic compensation that uses information gained during the current cycle to update those parameters will only be considered if EDM sensitivity is lost in significant amounts due to drifting working points.
Last but not least, the entire time resolved, synchronously recorded information on the magnetic field will be used in the offline analysis to correct for the effect of magnetic-field fluctuations on the nEDM result. All magnetometer systems are involved in this process. The Hg co-magnetometer provides the primary magnetic reference measurement for the neutrons that helps us to distinguish changes in the neutron spin precession frequency due to magnetic-field changes or due to a possible EDM. A second magnetic reference is provided by the Cs magnetometers that surround the two neutron volumes. All magnetometers will be used to determine magnetic-field gradients that cause systematic errors in the nEDM measurement.

Hg magnetometry
The n2EDM Hg magnetometry will follow the same operation principle as the original Hg co-magnetometer used in our previous experiment and introduced by the RAL/Sussex collaboration [27]. Atomic vapor of 199 Hg is polarized by optical pumping in a polarization cell placed on each of the ground electrodes of the precession chamber stack. The vapor in the polarization cell enters through a small valve into the precession chambers once they are filled with UCN. The application of a π/2 pulse starts the precession of the 199 Hg spins in the same volume as the neutrons. During the precession time, a photodetector records the power of a beam of resonant light traversing the chamber, which is modulated at the Larmor frequency by the interaction of the probe beam with precessing Hg atoms.
The sensitivity requirement per cycle of 25 fT (0.03 ppm at 1 µT) was already demonstrated for a 180 s precession time with our previous apparatus as part of our Hg R&D program [71]. This was made possible by replacing the Hg dischargelamps used so far for the probe beam by a tunable UV laser. The analysis only uses data during two analysis windows at the beginning and the end of the signal. While the first window is always 20 s long the length of the second window (and correspondingly the amount of data used) can be varied. Figure 22 shows that statistical uncertainties are smaller than the required 25 fT for most combinations of Hg T 2 time and window length. Even stricter requirements, which might be necessary for a potential upgrade of n2EDM, can be fulfilled if the same performance as in our former experiment with T 2 times around 100 s can be achieved. Our experience shows clearly that long T 2 times of the Hg atoms can only be achieved if the precession chambers are periodically discharge cleaned.

Cs magnetometry
Cesium magnetometers were introduced to the nEDM experiments as auxiliary magnetometers in order to monitor the main magnetic field and its gradients. We plan to mount a set of such magnetometers in close vicinity to the neutron precession volume (see Fig. 14). The sensors of choice are optically pumped magnetometers (OPM) that detect the spin precession of Cs atoms and so gain an optical signal that is modulated at the Larmor frequency [72]. The basic sensor principle has been known for more than 50 years [73] and was initially studied using discharge lamps as light sources. Since affordable lasers for the required near-infrared wave- Fig. 22 Statistical magnetometer uncertainty based on a signal/noise measurement using laser light to polarize and probe the Hg atoms. The values are given in fT as a function of the Hg spin depolarization time (T 2 ) and the length of the signal windows used for the analysis lengths have become available, this measurement principle has gained a renewed interest that has led to the development of many different OPM variants [74]. The OPMs in previous nEDM experiments [18,75] used a mode of operation, called the M x mode, that is sensitive to the magnitude of the magnetic field.
In past experiments [18] it was realized that the accuracy of the Cs sensors is the most critical factor limiting the usefulness of the measurements. Accurate sensor readings are necessary in order to extract information about the field gradients, which have to be known on an absolute scale. As a consequence our research and development efforts in Cs magnetometry has for several years focused on sensor stability and accuracy. We have developed highly stable vector magnetometers [76] and magnetically silent (all optical) magnetometers [77]. These designs are based on a pulsed approach that allows us to monitor the free-spin precession, in contrast to the M x mode which is based on a continuously driven magnetic resonance. The free precession has significant advantages for the sensor accuracy, since it avoids a whole class of systematic effects. There is, however, a class of systematic errors related to the complex atomic spin structure that is present in all tested magnetometer schemes. The shift is significantly smaller if the magnetometer is operated with linearly polarized light, which creates and detects atomic spin alignment, in contrast to circularly polarized light, which interacts with atomic spin orientation. The offset is further suppressed if the light is propagating parallel to the magnetic field, since there is no first-order dependence on misalignment in this geometry. A prototype of a scalar magnetometer that combines the features mentioned above has been realized, showing a statistical uncertainty of 1 pT/Hz 1/2 . This will be sufficient to meet the requirements of n2EDM.
In n2EDM we plan to mount an array of 114 Cs sensors above and below the two ground electrodes. The ability to extract all relevant gradients from the measurements of the Cs sensors depends largely on the placement of the sensors. Such placement must minimise the effects of the uncertainty of their position and field readings, and is a non-trivial task. For this reason, a genetic algorithm was developed to output optimised coordinates of the CsM array. Its fitness function includes all G l,0 gradients up to l = 7 weighted appropriately. These positions optimize the extraction of all gradient components responsible for systematic shifts in the neutron EDM and thus facilitate the correction of EDM results based on spatially resolved magnetic-field measurements. This optimized set of positions has the advantage that the correction is significantly less dependent on the accuracy of the Cs sensor readings and on the errors in their position. Figure 23 shows the remaining error in the most important gradient, G 3,0 , after the correction with the Cs array as a function of placement accuracy. The light green area indicates the goal necessary for the projected initial performance of n2EDM. The curves show simulation results with an assumed magnetic measurement accuracy ranging from 0 pT (perfectly accurate) to 10 pT. Our goal is to achieve a geometrical placement accuracy of ±0.5 mm, which leads to virtually no increase in extraction uncertainty of the gradient. Our goal for the magnetometric accuracy is 5 pT, which would give us a certain headroom for later upgrades of n2EDM. These goals, necessary for corrections to the neutron EDM measurements, are by far the most stringent requirements for the Cs magnetometer array. Requirements deduced from other types of measurements for which the CsM array will be used, like the homogenization of the magnetic field in order to avoid gradient-induced depolarization of neutrons, is thus automatically fulfilled if the simulated performance is achieved.
Since accuracy is so important, we plan to evaluate individually the accuracy of each Cs sensor in the array. For that purpose a calibration setup is currently being installed in the magnetic shield of the previous singe-chamber spectrometer at PSI. The setup consists of a rotating platform that can accommodate up to seven Cs sensors and a reference magnetometer based on 3 He [78]. The setup permits the comparison of the reading of each of the Cs sensors and of the 3 He magnetometer to calibrate every Cs sensor that will be deployed.

Mapper
An automated magnetic-field mapper will be used for the coil system commissioning and its cartography as well as for offline control of high-order gradients and searches for magnetic contamination within the apparatus. These measurements require an empty vacuum vessel in which to install the mapper, and will be performed once per year during the accelerator shutdown period. Such a mapper apparatus has already been in use in the previous nEDM experiment. Although the design has evolved substantially over the years, the concept remains the same: a remote motion system allows movement of a magnetometer inside a large volume of interest.
The sensor, usually a three-axis low-noise fluxgate, will explore a cylinder of 80 cm diameter and 90 cm height, thus covering the majority of the vacuum vessel's inner volume (see Fig. 24).
The fluxgate can also be turned along the ρ axis in π/2 steps to determine the overall DC offset of each single fluxgate for absolute field measurements with < 200 pT accuracy. Every part of the robot mounted inside the MSR is made of non-magnetic material (e.g. PEEK, POM and ceramics) and, in order to avoid Johnson noise, there are no metallic parts close to the magnetometer. The motorization block will be located outside, below the MSR, and is composed of three motors that are coupled to encoders for relative positioning of the magnetometer along the ρ, ϕ and z axes with a respective resolution of around 100 µm, 2 mrad and 5 µm. The absolute position of the mapper will be determined after each installation and before each dismounting using photogrammetry, with an accuracy on the order of 100 µm. The combination of the relative and absolute sensor position knowledge is well within the requirements needed to extract the fifth-order phantom modeǴ 5 detailed in Sect. 4.
A typical map acquisition lasts a few hours for a few thousand measurement points, and therefore several magnetic field configurations can be measured in a single day. The complete analysis routine described in [79] will be used to extract the magnetic field gradients within a few seconds once the measurement sequence is complete.

Summary and conclusions
We presented details of the new n2EDM apparatus being developed and built by the international nEDM collaboration based at the ultracold neutron source at PSI, Switzerland, with a view to significantly improving the sensitivity of the ongoing search for an electric dipole moment of the neutron. The concept employed is based upon a roomtemperature measurement of the spin-precession frequency of stored ultracold neutrons, using Ramsey's method of separated oscillatory fields in combination with an atomic mercury co-magnetometer. This principle lies behind the most successful measurement that has been made to date.
The concepts and requirements for the development of the new components, which are based on our experience with the previous apparatus, have been presented in detail. The expected increase in statistical sensitivity of a single Ramsey cycle for the chosen new design is stated. Advances in our understanding of systematic effects have been elaborated, and from these are derived the planned strategies to keep such effects under control.
The technical design of the core components is complete, and construction is ongoing. The various components developed by the collaborating institutions are gradually arriving at PSI for integration into the new apparatus. It has been demonstrated that a sensitivity of 1 × 10 −27 e cm can be reached after 500 days of data taking. Possible future modifications are expected to lead to a sensitivity well within the 10 −28 e cm range.