Noisy distributed sensing in the Bayesian regime

We consider non-local sensing of scalar signals with specific spatial dependence in the Bayesian regime. We design schemes that allow one to achieve optimal scaling and are immune to noise sources with a different spatial dependence than the signal. This is achieved by using a sensor array of spatially separated sensors and constructing a multi-dimensional decoherence free subspace. While in the Fisher regime with sharp prior and multiple measurements only the spectral range $\Delta$ is important, in single-shot sensing with broad prior the number of available energy levels $L$ is crucial. We study the influence of $L$ and $\Delta$ also in intermediate scenarios, and show that these quantities can be optimized separately in our setting. This provides us with a flexible scheme that can be adapted to different situations, and is by construction insensitive to given noise sources.


I. INTRODUCTION
Quantum sensing or quantum metrology [1][2][3] is one of the most promising applications of an upcoming quantum technology. Measuring quantities with ever higher precision lies at the heart of most natural sciences, and accordingly high precision measurements are a tool of uttermost importance. Quantum devices offer in principle a quadratic scaling advantage in the number of sensors, and have hence been studied in detail in recent years. Whenever some unknown signal or function should be sensed using multiple sensors, one is typically faced with a situation that the sensors are at different positions. This is the case for trapped ions [4][5][6] as well as for arrays of superconducting qubits, quantum dots or nitrogen-vacancy centers [7,8]. Furthermore, with the rapid developments in quantum networks, even arrays of such quantum sensors distributed over large distances are into reach. Since a single quantum system or qubit is already a quantum sensor, any such arrangement of multiple qubits corresponds to a quantum sensor network [5][6][7][8][9][10]. These networks can be used to measure non-local properties such as field gradients or spatial Fourier coefficients [11][12][13][14], or to increase the precision of atomic clocks, interferometers and telescope networks [15][16][17][18][19][20]. While the spatial distribution of sensors is irrelevant for signals without spatial dependence (as often considered in metrological scenarios), this is a crucial asset in the sensing of signals with certain spatial correlations.
In this paper we study the sensing of scalar, spatial dependent signals and show that one can indeed make use of such spatial correlations. By choosing appropriate quantum states of the sensors, one can make the sensor array sensitive only to a particular signal with a specific spatial dependence. This allows one to lock in to any signal of choice and measure only this signal. In this way, one can construct decoherence free subspaces for arbitrary given noise sources [8,17,[21][22][23][24][25][26][27] and overcome the known vulnerability of metrological schemes under noise [21,22,[28][29][30][31]. Such a decoherence free subspace (DFS) in quantum computation or standard quantum metrology is typically thought of to be available only in very specific situations, mainly when there is some correlated or restricted kind of noise. For noise source with a known spatial dependence one can essentially always construct such a DFS. The only requirement is that the spatial dependences of the signal to be sensed, and the one of the noise source are different. In any such case, one can find sensor states that are insensitive to a single or even multiple noise sources, while still being sensitive to the signal [14]. In fact, a sensor array of N + 1 sensors allows one to be insensitive to N noise sources with different spatial dependences, and sense one specific signal. Notice that this insensitivity only refers to noise sources with different spatial dependence, but clearly a fluctuating constant noise field still jeopardizes the sensing of an constant signal field. However, e.g. in situations with different sources and decaying field strength with certain distance dependence r −α -which is a rather typical situation an many physical set-ups-, these fields are linearly independent whenever they are located at different positions and sampled on fixed sensor positions using such a sensor network. Hence a DFS and lock-in to a specific signal can be constructed. This holds true under generic conditions, and the existence of a DFS is thus typical and not exceptional.
In [14] such a sensing scheme was introduced and analyzed in the so-called Fisher regime, where the parameter ϕ to be sensed is already approximately know, and multiple repetitions of the same experiment are considered. In this case the optimal state for sensing is given by a GHZ-type state, in the noiseless case just a superposition of two eigenstates of the signal Hamiltonian or genera-torĜ with minimal and maximal eigenvalue respectively. The achievable accuracy is given by the quantum Fisher information (QFI) [32][33][34]. In a scenario with multiple noise sources, a two-dimensional DFS that contains two states with different eigenvalues and a certain spectral distance ∆ can be generically constructed, and hence the above mentioned features can be achieved. This ensures that Heisenberg scaling, i.e. a quadratic enhancement over the best classical protocol, can be obtained even in the presence of additional noise sources. The situation is different in the so called Bayesian regime where the unknown parameter is specified by a (broad) probability distribution and only a single or few measurements can be performed. In this case, it is known that multiple states with different eigenvalues w.r.t. the signal Hamiltonian are required to achieve Heisenberg scaling [35][36][37]. Therefore, not only the spectral range ∆ but also the number of different eigenvalues L covered by a probe state are important for quantum metrology in the Bayesian regime, as we will further investigate in this paper.
In quantum sensor networks, it is often possible to maximize either the spectral range or the number of levels of a generator, by e.g. placing the sensors at appropriate positions, but not both simultaneously. Thus, it is important to know how ∆ and L will influence the precision for different scenarios as we will discuss in this paper. Moreover, not the total number L is important in noisy scenarios but the effective number of levels within the decoherence-free subspace. For a single-shot scenario, i.e. when considering only a single run of preparing a probe state, letting it evolve and then measure the resulting state, the number of available levels L is the crucial quantity as long as the measurement time can be freely chosen and is not considered to be a resource. The longer the evolution time, the larger the required number of levels. However, the spectral range ∆ enters in the required evolution time, as the strength of the signal is proportional to ∆. Hence of a fixed time, both ∆ and L are important. In this paper, we will introduce different methods to create a large number of linear spaced levels within the decoherence-free subspace. We introduce different methods with a different trade-off between increasing the number of effective levels L within the decoherence-free subspace and the maximal achievable spectral range ∆. Depending on the exact situations, as discussed in the first part of this paper, we can than choose a corresponding method to either maximally increase L, ∆, or to share the provided resources to increase both simultaneously.
The main results of this paper can be summarized as follows: (i) We analyze the effect of number of levels L and spectral range ∆ for Bayesian metrology with flat prior. (ii) We provide a general way to construct multi-dimensional decoherence free subspaces with quantum sensor networks for spatially correlated scalar signals. (iii) We show how to measure specific signals with a particular spatial dependence and a given prior, being completely insensitive to noise sources with a different spatial dependence.
The paper is organized as follows: First, we introduce the setup and summarize our results from [14] in Sec. II. Then, we start our investigation by discussing different measurement scenarios in the Bayesian regime and the influence of ∆ and L on the precision in Sec. III. Consecutively, we described methods to create effective linear spectra within the decoherence free subspace by either increasing the internal degree of freedom of the sensors (Sec. IV) or by changing the position of the different sensors (Sec. V). At the end, we summarize our results in Sec. VI by comparing the different situations and methods.

II. SETTING AND BACKGROUND
In the following, we investigate methods to achieve maximal precision for estimating the unknown field strength ω of a global field B 0 (r) = ωf 0 (r) with given spatial distribution f 0 (r). For this purpose, we consider quantum sensor networks with J sensors located at positions r j . The time evolution of each local sensor is described by the local operatorẐ j equal to the sum of all Pauli-z matrices of qubits located at r j . The unknown phase ϕ 0 = ωt is generated by the global generator via the time evolution U = exp(−itωĜ 0 ). Throughout this paper, we investigate situations where additional noise sources are present. These noise sources are describe via similar generatorsĜ k with 1 ≤ k ≤ K but with different spatial distributions f k (r j ). Strictly speaking, we assume that the vectors f k = (f k (r 1 ), · · · , f k (r J )) are linear independent. The state ρ of the quantum sensor network after evolving for a time t is given by (2) As a consequence, the coherence between two spin eigenstates s = (s 1 , · · · , s J ) withẐ j |s j = s j is destroyed whenever there exists at least one k > 0 with preventing us from obtaining information about the unknown phase ϕ 0 . Thus, optimal probe state consists of a superposition of eigenstates s which are all orthogonal to {f k } for 1 ≤ k ≤ K as we have demonstrated in [14]. A priori the components s j can only take on integer multiples of 1/2 which prevents us from creating spin vectors s orthogonal to {f k } in certain cases. However, we can circumvent this restriction by adding dynamical control. Here, all spins at a corresponding site are switched at an intermediate time t j leading to effective spin components s j equal to non-integer multiples of 1/2. In general, such orthogonal spin vectors can be created whenever there exists more probes J > K than noises sources K. Optimal probe states in the Fisher regime (narrow prior, many measurements) consists of the superposition of the two effective spin eigenstates |±s which maximize the absolute value of the scalar product sf ⊥ . Here, f ⊥ denotes the component of f 0 which is orthogonal to {f k } with 1 ≤ k ≤ K. However, the total number of distinct spin eigenstates on which the probe state is supported sets a limit on the amount of information on the field strength that can be gathered by the probe in a single run [38]. Thus in the Bayesian regime also effective intermediate levels with |sf ⊥ | < max|sf ⊥ | play an important role as we will discuss in the next sections.

III. SPECTRAL RANGE VERSUS NUMBER OF LEVELS
Let us first concentrate on achievable precisions for parameter estimation in the Bayesian regime without noise. In general, the precision of the estimation of ω depends on the spectral range ∆ = Γ max − Γ min , given by the difference of the maximal and minimal eigenvalue Γ ofĜ 0 , and the number of levels L of the generatorĜ 0 . Both of them depend on the spatial distribution of the sensors. Thus, generators with linear spectrum and different spectral range and different number of levels can be achieved by rearranging the local sensors. Usually, ∆ and L cannot be maximized simultaneously. As a consequence, it is important to know how the precision scales with ∆ and L. Therefore, we will investigate this scaling for a couple of exemplary scenarios in this sections before we investigate achievable effective ∆ and L for noisy distributed sensing in the next section.

A. Single-shot estimation
We will start our investigations in the Bayesian regime where we assume flat priors and single-shot estimation. The extremal case of a flat prior is an equally distributed unkown phase ϕ = ωt with prior p(ϕ) = 1/(2π) for 0 ≤ ϕ < 2π. For this situation, Berry and Wiseman [35] determined the optimal probe state for a generator with linear spectrum. Here,ẑ k denotes the Pauli-z matrix of a single qubit. Berry and Wiseman proved that the phase ϕ can be determined with a precision of with a single shot measurement and a N -qubit state. The generatorĜ BW has a linear spectrum with L = N + 1 different eigenvalues and a spectral range of ∆ = N leading to the spectral decomposition with c = −N/2 − 1 being an irrelevant constant which we will neglect from now on.
Here, the number of levels L and the spectral range ∆ are proportional to the number of qubits N . However, this is not necessary the case for global fields B(r) with arbitrary spatial dependence f (r) and different positioning of the local sensors. Therefore, we investigate in the following how L and ∆ influence the optimal precision separately. Thus, we generalized the results of Berry and Wiseman [35] to frequency estimation and generators with rescaled linear spectrum where L and ∆ can be varied independently.
The time evolution determined by exp We assume that the frequency ω is equally distributed between 0 ≤ ω < W 0 . Letting the system evolve for leads to an equal distribution of ϕ with 0 ≤ ϕ < 2π. As a consequence, we can achieve a precision of determined by Eq. (5). As a result, only the number of levels L is important for the precision in a single shot experiment if the measurement time can be chosen appropriately. However, the time t 1 to achieve this precision scales inversely with the spectral range ∆. Therefore, maximizing the number of levels is only optimal when the interaction time t 1 can be chosen arbitrarily. However, not only the number of qubits is a resource, but in general also time, which we will investigate in the next section.

B. Multi-shot estimation
In this section, we investigate scenarios where the total interaction time T is fixed. Here, we assume that T can be split between different measurements. A basic approach would to repeat the measurement described in the previous section ν = T /t 1 times without updating the prior. Since the precision scales with 1/ν, we arrive finally at As a result, the optimal precision scales inverse with the product of the number of levels L times the spectral range ∆ of the generatorĜ 0 . A better measurement scheme would update the prior p(w) after each measurement and adapt the probe state, evolution time and measurement for each run. Assuming that the frequency distribution stays flat at each round we can now define a sequence of interaction times and widths (t k ; W k ) with and As a consequence, the total interaction time after n measurement rounds is given by Thus, the maximal number of estimation rounds is upper bounded by for a fixed interaction time T . Therefore, the maximal achievable precision is upper bounded by suggesting that in such an adaptive scheme only the spectral range has an effect on the scaling of the precision with time.
C. Single-shot, fixed time estimation In the two previous subsections, we assumed that it is possible to arbitrarily choose and split the interaction time. However, often only short interaction times are available in real world estimation problems. In addition, also preparing a good probe state and performing measurements needs time which exceeds in some cases the actual interaction time. As a consequence, there exist many scenarios where only a single-shot estimation with fixed interaction time is possible. In this case, our estimation problem falls into the regime of Bayesian frequency estimation [39,40]. For Gaussian prior distributions p(ω), the precision of the updated distribution after the measurement is given by [39] ( Here, F denotes the quantum Fisher information, W 0 the variance of the prior andρ the prior weighted density operator with matrix elements given in the eigenbasis ofĜ 0 . The optimization of the probe state is in general non-trivial and often only possible with numerical methods and iterative algorithms [39,41]. However, we can adapt some of the results of [39] by rescaling the dimensionless time parameter For tW 0 ∆ 1, all off-diagonal terms Eq. (19) survive and thus a GHZ-like probe state is optimal. In this case, the variance reduction factor is given by As a consequence, the precision is mainly determined by the spectral range ∆ alone as long as tW 0 ∆ 1. For tW 0 ∆ 1, only off-diagonal elements Eq. (19) with n ≈ m survive provided tW 0 ∆/L is of the order of unity. Then, the number of different levels is important and states similar to the Berry-Wiseman state [35] are optimal.
In the intermediate regime, states with a structure interpolating between GHZ-state and the Berry-Wiseman state are optimal. Again, we can adapt results from [39] to our situation. A fixed number of levels L in our case corresponds to a fixed number of atoms N in [39] with L = 2N . Thus, for a fixed L and 2 ≤ L ≤ 40, a ratio of 0.5 ≤ tW 0 ∆/(L − 1) ≤ 1 is optimal as can be seen from Fig. 2 in [39] suggesting that L and ∆ should be increased simultaneously in this regime if possible. However, a larger number of levels L leads always to a higher precision provided the ratio ∆/L is fixed.
For tW 0 ∆/L >> 1, no off-diagonal elements survive and phase estimation is not possible anymore. In this case, a shorter interaction time should be chosen.

IV. CREATING LINEAR SPECTRA WITH LOCAL MULTILEVEL SYSTEMS IN NOISY ENVIRONMENTS
The advantage of quantum metrology is severely limited by the influence of noise. In the worst case scenario, the advantage shrinks to a constant factor [21,22,[28][29][30][31]. However, the quadratic improvement of quantum metrology can be maintained in certain situations by using e.g. error correction or fast control [8,17,[21][22][23][24][25][26][27]. In [14], we have described how to protect global parameter estimation from noise sources with given spatial distributions by designing appropriate probe states. These states consisted of superpositions of effective energy levels of the generatorĜ 0 within a decoherence-free subspace. With these probe states, it is possible to achieve the same precision scaling as in the noiseless case.
We mainly concentrated in [14] on the Fisher regime and thus on probe states consisting of a superposition of only two orthogonal states. However, the maximal achievable precision in the Bayesian regime crucially depends on the number of levels as we have discussed in the previous section. It is in general a difficult task to find optimal probe states and precision limits in the Bayesian regime. Previous works [35,37,[39][40][41] mainly concentrated on generatorsĜ 0 with equally spaced levels. Therefore, we will also concentrate on this regime and investigate in the following methods to create effective linear spectra within the decoherence-free subspace. All previous results [35,37,[39][40][41] as well as our considerations from Sec. III can then be adopted to probe states based solely on this effective spectra.
In this section, we concentrate on methods based on a fixed number of sensor at fixed positions and variable internal degrees of freedom. In the next section, we will concentrate on methods based on sensors with fixed internal degrees of freedom but with variable positioning.

A. One-dimensional orthogonal subspace
Our goal is to determine the global phase ϕ = tω generated byĜ 0 , Eq. (1), with 0 ≤ ω ≤ W 0 without being disturbed by global phase noise generated by {Ĝ k } with 1 ≤ k ≤ K and different spatial distributions f k (r j ).
The spatial distribution of each generatorĜ k can be described by the vector f k = (f k (r 1 ), · · · , f k (r j )) T for 0 ≤ k ≤ K. In the following, we investigate a situation with one signal source and K noise sources which are linear independent meaning that their corresponding spatial vectors f k are linear independent.
The state of our sensor network can be described by time averaged spin vectors s = Ẑ t = ( Ẑ 1 t , · · · , Ẑ J t ) T (22) determined by the time averaged expectation values Ẑ j t of the local operatorsẐ j . In the following, we assume that s describe time averaged eigenstates (compare [14,37]). This means that a system in state s is at all times in an energy eigenstate, however, the eigenstate might change due to spin flips during the coherent time evolution generating the phase ϕ = ωt. The coherence between two different effective spin vectors s and r is preserved if [14] f and the effective signal strength is given by f T ⊥ (s − r). Here, f ⊥ denotes the component of the signal f 0 which is orthogonal to all noise vectors f k .
The subspace orthogonal to span{f k } with 1 ≤ k ≤ K is one dimensional if our sensor network consist of sensors with only J = K + 1 different positions. In this case, the optimal probe state consists of a superposition of spin states s parallel to f ⊥ (compare with [14]). To create non-integer multiples of 1/2, we use intermediate spin flips such that the time average of the spin is given by In the following, we investigate methods to create an effective linear spectra described by s within the decoherence-free subspace. We assume that the position of all sensors are fixed and that each sensor consists of a quantum system with n j linear spaced energy levels with energies {E m = m} and −n j /2 ≤ m ≤ n j /2. One possibility to create superpositions of effectively linear spaced levels is to use equivalent local sensors with n j = n energy levels and create the superposition state For each local system j, we time the local spin flips such that the average energy of the level m = +1/2 is given by However, a superposition state with equal level spacing and spectral range can be also achieved with less resources if n · |f j ⊥ |/f max ⊥ ≤ (n − 1) for some j. In this case, we use systems of dimension n|f j ⊥ |/f max ⊥ for each local 1. Visualization of the states of a two qubit system and their projection onto the perpendicular signal component f ⊥ (black arrow). The projections of the four spins states (±s eff , ±1/2) (red dots) lead to an equally spaced level structure optimal four quantum metrology in the Bayesian regime. The superposition of the two states (1/2, 1/2) and (−1/2, −1/2) are optimal for quantum metrology in the Fisher regime. However, their projection together with the projection of (1/2, −1/2) and (−1/2, 1/2) do not lead to equally spaced levels.
system. However, at least one system still has dimension n. We use this system as control system for controlled spin flips on all the other systems to create the effective superposition state given in Eq. (26). In general, it is also possible to create superpositions of n levels with only single qubits for each sensor. In this case, an auxiliary system with n levels which is insensitive to all fields (source and noise) is necessary to control the necessary spin flips (see [37]).

B. Multi-dimensional orthogonal subspace
There are automatically more levels available in the decoherence-free subspace if the space orthogonal to span{f k } with 1 ≤ k ≤ K is multi-dimensional. This is possible if there exist more than J > K + 1 different sensor positions. For example, in the appendix of [14], an example of a three qubit system is discussed, where all states of the form |±1/2, ±1/2, s 3 with arbitrary but fixed s 3 lie within the same decoherence-free subspace. In this case, the states |s used for the superposition probe state must not necessarily be parallel to f ⊥ . However, the projection of these states onto f ⊥ are not necessary equidistant, see for example the projection of the states |±1/2, ±1/2, s 3 onto f ⊥ as depicted in Fig. 1 (the state s 3 of the third qubit was neglected in this figure to simplify the presentation). Again, we can us dynamical controlled spin-flips to solve this problem. In this case, we decrease the spin of one of the systems from 1/2 to s eff in such a way that In this way, the projection of the states |±s eff , ±1/2 lead to linear spaced projections onto f ⊥ . To obtain more levels, it is enough to increase the number of linear spaced energy levels of one of the systems. In our example, we can get 2n "equally" spaced states within the decoherence-free subspace. This method can be generalized to higher dimensional decoherence-free subspaces.
As a result, we can generate linear multi-level spectra within the decoherence-free subspace for Bayesian parameter estimation by using well timed spin-flips. The maximal achievable spectral range ∆ as well as the number of levels L scale with the number of local energy levels n similar to the noiseless case. In addition, the dimension d = J − K of the space orthogonal to all noise sources can be also used to generate effective linear spectra by using again well timed spin-flips.

C. Arbitrary effective spectrum
We have concentrated on generating effective linear spectra w.r.t. the signal generating Hamiltonian so far, as such spectra are typically used in a Bayesian estimation scenario with flat prior distribution. However, there are many other metrological scenarios as well, and the optimal states and optimal effective energy spectra vary from case to case. Hence we also discuss a general method to obtain arbitrary effective spectra within a DFS using dynamical control. Once one has constructed a twodimensional DFS with eigenstates |v + , |v − and eigenvalues λ ± = ±∆/2 where ∆ is the spectral range, one can obtain a multi-dimensional DFS with degenerate eigenvalues by simply placing more sensors (or a higher dimensional system) at each sensor position. Similarly, adding auxiliary systems that are not taking part in the sensing process have a similar effect. We assume in the following that each eigenstate is k-fold degenerate, |v ± k = |v ± |k , with eigenvalues λ ± k = λ ± . By performing a controlledswitch between eigenstates |v + k and |v − k at appropriated times, one can generate effective eigenvaluesλ + k ,λ − k with arbitrary values 0 ≤λ + k ≤ ∆/2 and λ − k = −λ + k . This allows one to produce an arbitrary symmetric spectrum. An arbitrary asymmetric spectrum can be obtained by mixing each of the eigenstates separately with an effective zero-energy state. Notice that effective zero energy levels can be generated by using two other auxiliary levels. An alternative is to use just the positive part of the spectrum, which however results in a decrease of the spectral range by a factor of 1/2.
A similar method works to modify a given linearly spaced spectrum {±λ k }. By adding degeneries (e.g. using auxiliary states or levels that do not take part in the sensing process), one can either mix pairs of levels ±λ k with effective zero-energy states and move energy down for the two levels. Or one can also mix two different energy levels λ k1 , λ k2 , which results in moving one energy up and the other down (but also changes the spectral range eventually). In the previous section, we investigated how to create effectively linear spaced levels assuming a fixed number of sensors at fixed positions. Here, we increased the number of level L as well as the spectral range ∆ simultaneously by increasing the internal degrees of freedom of the local sensors.
However, the number of available levels L and the maximal achievable spectral range ∆ are strongly influenced by the positioning of the different sensors. Thus, we can increase L or ∆ just by varying the spatial distribution of our sensors without using additional resources such as additional qubits to increase the internal degree of freedom of the sensors. In general, increasing one will lead to a degrease of the other. Thus, the trade-off between L and ∆ need to be carefully balanced depending on the actual situation as discussed in Sec. III.
To be fully flexible, we present here different constructions to achieve states with up to exponentially many effective energy levels, at the prize of a (linearly) reduced spectral range. In contrast to Sec. IV, we now assume that each sensor is described by a single qubit. Our results can be generalized to sensor with more internal degrees of freedom by combining the methods from this section and Sec. IV.
We start by concentrating on gradient estimation with the generatorĜ with normalized positions −1/2 ≤ r j ≤ 1/2. Our goal is to determine the global phase ϕ = tω generated bŷ G 0 with 0 ≤ ω < W 0 without being disturbed by global phase noise generated bŷ In the Fisher scenario, it is optimal to place N/2 qubits at r j = ±1/2, respectively, because we achieve in this way the maximal possible spectral range of ∆ = N [12]. However, we obtain only L = N/2 different eigenvalues forĜ 0 . In the following, we discuss different spatial arrangements of our sensors to generate linear spectra with different combinations of L and ∆ which can help to optimize global parameter estimation in the Bayesian regime.

A. Linear spacing
For simplicity, we assume that the number of qubits N is even. In this case, positioning N sensors with linear spacing leads to The maximal eigenvalue Γ max is achieved if all spins with positive r j pointing up and all others down, leading to In a similar way, we find Γ min = −Γ max . Thus the spectral range is given by Similar considerations for N odd leading to the same scaling of ∆ ≈ N/4. The smallest energy change is achieved if the spins situated at r ±1 are changed. Both of these spins need to be switch simultaneously, to stay in the protected subspace from global field noise. This leads to a minimal energy change of δ = 1/(N − 1) and as a result to a maximal number of energy levels of L = ∆/δ ≈ N 2 /4. As a result, increasing the number of qubits leads to a similar scaling of the spectral range as in the Fisher regime while we get a quadratic improvement in the number of levels.

B. Exponential spacing
The maximal number of levels with equidistant spacing L = 2 N/2 is achieved if the particles are placed at where we again took into account that only states within the protected subspace are interesting. In this case, the maximal and minimal eigenvalues are given by leading to a spectral range of ∆ ≈ 2 for large N . As a consequence, the achievable spectral range ∆ is limited in this case and cannot be enhanced above a certain threshold by increasing the number of qubits. However, the precision depends only on L for single shot estimation if the interaction time t is large enough such that tW 0 ∆ 1 (see Sec. III C). In this case, it is not necessary to increase ∆ and we profit from the exponential scaling of L.

C. Arbitrary functions
The above conducted considerations can be generalized to arbitrary generatorŝ Again, our goal is to construct probe states, which are insensitive to global phase noise generated byĜ 1 = jẐ j . However, now we do not demand that the positioning of the sensors itself is linear or exponential, but the resulting field strengths f (r j ) when hopping from one sensor to another. In this way, we can generate similar level structures as in the case of gradient estimation. To achieve linear spacing, the sensors need to be placed at positions r j such that To construct a probe state which is insensitive to global field noise, we determine the component f ⊥ of f which is orthogonal to the vector f 0 = (1, · · · , 1) T describing global field noise [14]. This component is given by and is antisymmetric such that f j The largest eigenvalue ofĜ 0 is achieved if all spins for 1 ≤ j ≤ N/2 pointing down and all other up. The state with the smallest eigenvalue is obtained by flipping all spins leading to a spectral range of .
The smallest changes within the protected subspace is achieved if the two middle spins (j = N/2 and j = N/2 + 1) are switched leading to a level spacing of δ = a/(N − 1) and in total L = N 2 /4 levels similar to the case of gradient estimation with linear positioned sensors.
For arbitrary function f (r j ) it is also possible to create L = 2 N/2 equidistant levels within a decoherencefree subspace with N qubits as we will demonstrate in the following. So far, we have always used the fact that two qubits with opposite spin form a 2-dimensional decoherence-free subspace. That is, always two qubits form one logical qubit with leading toĜ Here, |± denotes a spin-eigenstate with the spin pointing up or down, respectively. To create 2 N/2 levels within the decoherence-free subspace, we need N/2 independent pairs (j, −j) of sensors with The maximal and minimal eigenvalues are then given by leading to a spectral range of ∆ ≈ 2a for large N . Finding the positions r ±j is straightforward if f is continuous and an inverse function f −1 is known (f −1 need not necessarily be unambitious). The pairs (j, −j) can be freely chosen since the function f 0 (r) describing the global noise is constant. The optimal strategy is to choose r 1 such that f (r 1 ) is equal to the maximum of f (r) within the area of allowed sensor positions and r −1 denotes the position of the minimum. All other sensor positions are then consecutively defined via As a result, we can achieve an exponential scaling for the precision of a global field with arbitrary spatial dependence f (r) in the presence of global phase noise in the Bayesian regime.

VI. CONCLUSION
In this paper, we first discussed the influence of the spectral range ∆ and the number of levels L, covered by a probe state and defined by a generatorĜ of an unknown phase ϕ = ωt, on the precision to estimate ω. The optimal precision is solely determined by the spectral range ∆ if the interaction time t between the unknown field B = ωf 0 (r) with strength ω and the sensor network is very small such that t 1/(W 0 ∆). Here, W 0 determines the width of the prior of ω. This is also the case if the interaction time can be split into multiple measurements with arbitrary small interaction times. In this case, the information gain achieved by probe states based on multilevel states is compensated by longer interaction times for each single measurement (see Eq. (9)). Thus, it is possible to either perform a few longer measurements provid-ing more information, due to a larger L, or many short measurements providing each only a single bit of information, if L = 2. However, the total amount of available information stays constant and the precision (ω − ω) 2 depends solely on the spectral range ∆.
However, we are limited in many situations to singleshot estimation due to preparation and measurement times longer than the available interaction time. Then, the number of levels L becomes more and more important as tW 0 ∆ grows.
As a consequence, it is optimal to invest the given resources, e.g. number of available qubits n, in different ways depending on the given estimation situation. Here, we also took the influence of different noise sources with given spatial distributions f k (r) into account. To generate a maximal spectral range ∆ it is optimal put as many qubits as possible at a position with maximal effective signal strength f max ⊥ . In this case, ∆ scales linear with the number of qubits at this position. However, we need at least sensors at J = K + 1 different positions if K linear independent noise sources are present. This reduces the number of qubits at this positions dramatically.
To create a large number of levels L, it is optimal to place each qubit at a different position. Depending on the spatial distribution of the sensors, we can either maximize L by sacrificing ∆. In this case, we can get an exponential scaling of L with the number of qubits n. However, ∆ will be limited by a constant in this case. In other cases, it is optimal to increase L and ∆ simultaneously as discussed in Sec. III C. In such situations, it is e.g. possible to achieve quadratic scaling of L ∼ n 2 and still linear scaling of ∆ ∼ n.