Introduction

Quantum metrology, the study of high-precision quantum-assisted measurements, has been advancing rapidly in recent years, presenting sensing and imaging capabilities down to the nanometer scale1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17. These capabilities display state-of-the-art precision in a vast variety of fields, ranging from quantum clocks18,19,20 and gravitational-radiation detectors21,22,23 to quantum-enhanced imaging24,25,26,27,28. Experiments in quantum metrology utilize the control of quantum devices down to a single-particle resolution in systems such as nitrogen-vacancy centers29,30,31,32,33,34,35,36, superconducting circuits37,38,39,40,41, Bose-Einstein condensates42,43, cold atoms44,45,46,47 and photonic systems48,49,50,51,52.

Within the field of quantum metrology, the area of quantum-assisted magnetic sensing features a diverse set of capabilities—including coherent control53,54,55,56,57,58,59, trapping60,61,62,63,64, magnetic imaging7,65,66,67,68,69,70,71,72 and quantum state tomography73,74. These capabilities have been used in a variety of systems such as neuron-activity tomography75,76, NMR-based77,78,79 and ESR-based80,81,82 quantum computing, quantum magnetometers7,29,31,32,33,34,36,39,43,45,69,75,83,84,85,86,87,88,89,90,91,92,93 and magnetic resonance imaging67,73,88,94,95,96,97,98,99,100,101,102,103,104,105. State-of-the-art magnetic microscopes enable probing of magnetic structures down to the atomic scale7,53,58,73,106,107,108.

These advancements motivate analyzing the ultimate precision limits of such measurement schemes, to help identify optimal sensing schemes for the smallest scales. The precision of magnetic measurements today is limited by classical noise. For example, superconducting quantum interference devices (SQUIDs)109,110,111,112,113,114,115,116,117,118 are eventually limited by Johnson noise119. Nevertheless, it is intriguing to look beyond current limitations and consider the fundamental limits that would arise at the most extreme conditions of measuring individual spins. At these scales, magnetic measurements become limited by the quantum interaction between the two parties: the measured (source) and measuring (probe).

The quantum nature of the measurement process raises fundamental questions regarding the ability to construct suitable measurement schemes. It is not entirely clear how to utilize the entanglement between the measuring and measured parties, and what are the intrinsic limitations on the precision of such measurements. Therefore, it would be interesting to find limits on the back action a measurement can induce on the measured party and explore the tradeoff between lowering the back action and improving the precision.

Here we present the fundamental limits of magnetic nearfield measurements, arising from no-go quantum information principles. Specifically, we show the trade-off between measurement precision and back action on the measured system governed by the theory of imperfect quantum cloning. Our work focuses on the conceptual example of magnetic force microscopes (MFMs), to show designs that achieve optimal measurement schemes. Specifically, we analyze scenarios where the source is a single spin and the probe is a general spin configuration, thus modeling an arbitrary detection probe, which can be a spin, atom, molecule, or complex solid object. We solve for the spin–spin interactions involved in the measurements, analyzing the results from the perspective of the measurement optimality using two criteria: the uncertainty of the measurement and the back action of the source. Finally, we discuss the fundamental connection between sensing and imperfect quantum cloning, presenting several consequences arising from this connection.

We find that counterintuitively, the most delicate quantum magnetic detector—a single spin-1/2 particle—is not the optimal magnetic detector. In fact, we show that better measurements are obtained by using higher spin probes, according to both the uncertainty and back-action criteria. Interestingly, classical measurements of quantum sources, as in the Stern-Gerlach apparatus, are retrieved as the classical limit of the quantum probe. Furthermore, we show how a judicious design of the source-probe interaction Hamiltonian can optimize both criteria already with spin-1 probes.

Results

Theoretical model

Our model of the magnetic measurement is inspired by the magnetic force microscope (MFM) apparatus95,97,98,99,100,101,102,104,105. A conceptual scheme is presented in Fig. 1. The measurement device is a rigid tip that consists of a fixed spin configuration (probe), attached to an elastic cantilever which is allowed to bend in the vertical direction. The measured party (source) is part of a target sample and is assumed to remain static throughout the measurement process. The spin–spin interaction between the source and probe induces two types of effects: spin-rotation of the interacting spins (source and probe), and a lateral force between the source and the probe. Since the probe is a rigid body, this force bends the cantilever, resulting in a vertical displacement of the probe. This displacement can be detected using standard laser-interferometry techniques on the bent cantilever120,121,122,123. Using the known mechanical properties of the cantilever, its bending is translated to the magnetic force exerted by the source spin.

Fig. 1: A conceptual example of a magnetic nearfield measurement system, analyzed using the principles of quantum measurements.
figure 1

A sample (gray) contains one or more spins to be measured (black cones). The measurement is performed on one of them at a time. The measurement device (tip) consists of spins attached to a vertically-bending cantilever (blue). The tip can contain a complex spin configuration, as shown in the inset on the right. Different spin configurations represent different measurement setups, which are investigated to find the optimal one. The measurement proceeds as follows: The tip is brought closed to the measured spin (source), such that it interacts with the tip’s spins (probe). The interaction exerts a force on the cantilever, yielding an (entangled) superposition of vertical displacements, each correlated to a different multi-spin state. Once the displacement of the cantilever is measured (usually with a laser interferometer120,121,122,123), the system’s state collapses to a certain cantilever displacement and multi-spin state, and its state is known from the measured value of the displacement. We define the measurement precision by how precisely the z-magnetization of the source spin is obtained from the measured displacement.

To quantitatively compare various measurement configurations, we define the objective of our magnetic measurement to sense the vertical spin component of the source, i.e., the projection of its state on the cantilevers’ axis of movement (z). This objective is inspired by applications of quantum state tomography as used in quantum computing and simulators. For the sake of simplicity, we focus our attention on the case of spin-1/2 sources and general-spin probes with different properties and initial states. Our analysis can be directly extended to higher source-spin quantum numbers and to equivalent spin observables. Note that the spin states in the manuscript are written in the spin-z basis, so we can write a general spin-1/2 source as \(\left| \psi \right\rangle = {{{\mathrm{cos}}}}\frac{\theta }{2}\left| { + \frac{1}{2}} \right\rangle + e^{i\phi }{{{\mathrm{sin}}}}\frac{\theta }{2}\left| { - \frac{1}{2}} \right\rangle\). Throughout the analysis, we assume an initially pure state of the source spin, without loss of generality; generalization to mixed states appear in the Methods section. By the act of measurement we aim to estimate its z-spin component \(\left\langle {\sigma _z} \right\rangle = \cos \theta\).

We can model the act of measurement as a von-Neumann type interaction with a measuring pointer124,125. The pointer state represents the vertical displacement of the rigid tip (cantilever and probe spins). The Hamiltonian of the system is:

$$H = \frac{{p^2}}{{2M}} + \frac{1}{2}Kz^2 + H_{{\mathop{{{\rm{int}}}}} }$$
(1)

where p and z are the z-axis momentum and position operators of the rigid tip (respectively). K and M are the vertical stiffness coefficient and mass of the cantilever (respectively). \(H_{{{{\mathrm{int}}}}} = H_{{{{\mathrm{int}}}}}\left( {z - z_0} \right)\) is the overall spin–spin interaction Hamiltonian and z0 is the vertical position of the source spin. The spin–spin interaction Hamiltonian Hint couples the source spin to the probe spins and the cantilever vertical displacement, thereby implementing the measurement.

We take the spin–spin interaction Hamiltonian without loss of generality as a sum of magnetic dipole–dipole interactions between the source spin and each of the probe spins:

$$H_{{{{\mathrm{int}}}}1,2} = \frac{{\mu _0\hbar^{2}}}{{4\pi \left| {{{{\vec{\mathbf{r}}}}}} \right|^3}}\gamma _1\gamma _2\left( {{{{\mathbf{S}}}}_1 \cdot {{{\mathbf{S}}}}_2 - 3\left( {{{{\mathbf{S}}}}_1 \cdot \widehat {{{{\vec{\mathbf r}}}}}} \right)\left( {\widehat {{{{\vec{\mathbf r}}}}} \cdot {{{\mathbf{S}}}}_2} \right)} \right)$$
(2)

where \({{{\mathbf{S}}}}_{1,2} = ( {S_{1,2}^x,S_{1,2}^y,S_{1,2}^z} )\) are the vector spin operators, γ1, γ2 the gyromagnetic ratios, \({{{\vec{\mathbf r}}}} = \left( {x,y,z} \right)\) is the relative position operator of the spins (\(\widehat {{{{\vec{\mathbf r}}}}}\) is the unit vector), μ0 is the vacuum permeability and \(\hbar\) is the reduced Planck constant. We construct the overall Hint by summation of Hamiltonians as in Eq. (2), taking into account the spatial distribution of the probe spins (assumed to be rigid), and the spins properties—gyromagnetic ratios and spin quantum numbers. We note that we also sum over interaction terms between pairs that are both inside the probe. Their relative position will not change, but their spin states can change. The overall interaction Hamiltonian is:

$${H_{\mathrm{int}} = \frac{{{\mu_{0}}{\hslash^{2}}}}{{4\pi }}{\mathop{\sum}\limits_{i,j,i \ne j}}\gamma _{i}\gamma_{j}\frac{1}{{\left| {\overrightarrow{{{\bf{r}}}} _{ij}} \right|^{3}}}\left( {{{{\mathbf{S}}}}_{i} \cdot {{{\mathbf{S}}}}_{j} - 3\left( {{{{\mathbf{S}}}}_{i} \cdot {\widehat{\overrightarrow {{{\mathbf{r}}}}}}_{ij}} \right)\left( {\widehat{\overrightarrow{{{\mathbf{r}}}} }_{ij} \cdot {{{\mathbf{S}}}}_{j}} \right)}\right).}$$
(3)

The Hamiltonian governing the measurement consists of two types of operators: the spin states Si and the cantilever’s relative vertical displacement from equilibrium zz0. Note the connection between these two degrees of freedom under this Hamiltonian: each collective spin state corresponds to a set of vertical equilibrium points, and each vertical displacement corresponds to a set of spin eigenstates.

The measurement process can be formulated as follows. The system is initialized to be in the states \(\left| {\psi _0} \right\rangle _{{{{\mathrm{source}}}}}\) for the source, \(\left| {{{\Psi }}_0} \right\rangle _{{{{\mathrm{probe}}}}}\) for the probe (generally multi-spin state), and \(\left| {z_{{{{\mathrm{init}}}}}} \right\rangle _{{{{\mathrm{pointer}}}}}\) for the pointer. Under the Hamiltonian in Eq. (1), the system evolves to the following state:

$$\left| {\psi _0} \right\rangle _{{{{\mathrm{source}}}}}\left| {{{\Psi }}_0} \right\rangle _{{{{\mathrm{probe}}}}}\left| {z_{{{{\mathrm{init}}}}}} \right\rangle _{{{{\mathrm{pointer}}}}} \to \mathop {\sum}\limits_{j,k} {\alpha _{j,k}\left| {{{\Phi }}_{{{\mathrm{j}}}}} \right\rangle _{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}\left| {z_k} \right\rangle _{{{{\mathrm{pointer}}}}}.}$$
(4)

The quantum state of the system is a superposition of joint source-probe spin-states \(\left| {{{\Phi }}_{{{\mathrm{j}}}}} \right\rangle _{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}\) and correlated pointer states \(\left| {z_k} \right\rangle _{{{{\mathrm{pointer}}}}}\), with corresponding amplitudes αj,k. Meaning that the probe becomes entangled with the source, and the pointer occupies multiple vertical displacements zk. Under the approximation of small cantilever displacements (see discussion), the states \(\left| {{{\Phi }}_{{{\mathrm{j}}}}} \right\rangle _{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}\) are the eigenstates of Hint, and therefore the coefficients αj,k have time independent absolute value. The act of measurement projects the state of the pointer into a certain vertical displacement and thus projects the source+probe spins into a certain joint state. The projection probabilities on each state depend on the overlap between the spin state and the initial state of the spins in the system, expressed through αj,k. Note that a single pointer state can correspond to several spin eigenstates due to degeneracy of Hint. The final state of the system can be written as a density matrix:

$$\rho _{{{{\mathrm{tot}}}}} = \mathop {\sum}\limits_k {\left| {z_k} \right\rangle \left\langle {z_k} \right|_{{{{\mathrm{pointer}}}}}} \left[ {\mathop {\sum}\limits_{j,j^\prime } {\alpha _{j,k}\alpha _{j^\prime ,k}^ \ast \left| {{{\Phi }}_j} \right\rangle \left\langle {{{\Phi }}_{j^\prime }} \right|_{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}} } \right].$$
(5)

Given the final state of the system, we compute the quality of the measurement using two criteria: the uncertainty of the measurement and the back action of the source. Since the uncertainty is calculated from the probability distribution of the pointer displacements and the back action is calculated from the source’s final density matrix, we can derive both from Eq. (5).

The density matrix of the spins without post-selection on the pointer state can be calculated by using partial trace on Eq. (5):

$$\rho _{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}} = {{{\mathrm{Tr}}}}_{{{{\mathrm{pointer}}}}}\left( {\rho _{{{{\mathrm{tot}}}}}} \right) = \mathop {\sum }\limits_{k,j,j^\prime } \alpha _{j,k}\alpha _{j^\prime ,k}^ \ast \left| {{{\Phi }}_j} \right\rangle \left\langle {{{\Phi }}_{j^\prime }} \right|_{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}},$$
(6)

from which we can calculate an additional partial trace and find the density matrix of the source spin following its interaction with the probe:

$$\rho _{{{{\mathrm{source}}}}} = {{{\mathrm{Tr}}}}_{{{{\mathrm{probe}}}}}\left( {\rho _{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}} \right) = \mathop {\sum }\limits_{k,j,j^\prime } \alpha _{j,k}\alpha _{j^\prime ,k}^ \ast {{{\mathrm{Tr}}}}_{{{{\mathrm{probe}}}}}\left( {\left| {{{\Phi }}_j} \right\rangle \left\langle {{{\Phi }}_{j^\prime }} \right|_{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}} \right).$$
(7)

Similarly, the density matrix of the pointer, which determines the probability of each measurement, can be calculated from Eq. (5) using a partial trace:

$$\rho _{{{{\mathrm{pointer}}}}} = {{{\mathrm{Tr}}}}_{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}\left( {\rho _{{{{\mathrm{tot}}}}}} \right) = \mathop {\sum }\limits_k p_k\left| {z_k} \right\rangle \left\langle {z_k} \right|_{{{{\mathrm{pointer}}}}},p_k = \mathop {\sum }\limits_j \left| {\alpha _{j,k}} \right|^2.$$
(8)

The back action exerted on the source is computed as one minus the similarity between the source’s final and initial states, for which we use the standard fidelity metric126:

$${{{\mathrm{back}}}}\;{{{\mathrm{action}}}} = 1 - {{{\mathcal{F}}}}_{{{{\mathrm{source}}}}} = 1 - \left\langle {\psi _0} \right|\rho _{{{{\mathrm{source}}}}}\left| {\psi _0} \right\rangle$$
(9)

To find the measurement uncertainty, which quantifies the confidence level of a one-shot measurement, we first define the measured quantity—the force bending the cantilever. The force acting on the cantilever is calculated as the z-derivative of the magnetic spin energy for each spin state \(\left| {\psi _k} \right\rangle\) that corresponds to a measured \(\left| {z_k} \right\rangle\). Mathematically, we calculate the force as

$$F_k = - \left. {\frac{d}{{dz}}\left\langle {\psi _k} \right|H\left| {\psi _k} \right\rangle } \right|_{z = z_k}.$$
(10)

The uncertainty is calculated by the variance in the force normalized by the range of possible mean results in this setup (mean-force range):

$${{{\mathrm{uncertainty}}}} = \frac{{{{{\mathrm{Var}}}}\left( F \right)}}{{{{{\mathrm{range}}}}^2\left( F \right)}},$$
(11)

where Var(F) is the variance of the force distribution and range (F) is the mean-force range across all possible initial source states. The mean-force range is a property of the measurement setup; the normalization is done to appropriately represent the ability to extract information about the source spin from a single-shot measurement: differences in the mean force are detectable only when they are larger than the standard deviation of each mean. The normalization of the variance by the mean-force range eliminates some of the dependency of the uncertainty on Hamiltonian global factors such as gyromagnetic ratio or initial source-probe distance. This dependency elimination occurs when all the spins in the system share that same properties, which appear as pre-factors in the spin–spin Hamiltonian in Eq. (3). Importantly, both criteria in Eqs. (9), (11) are dimensionless, with lower values representing better measurement setups. The minimal value of both criteria is 0; the maximal value is 1 for the back action and infinity for the uncertainty.

Figure 2 presents the back-action and uncertainty criteria as heat maps on Bloch spheres, where the location on the Bloch sphere is the initial state of the source spin. These maps help compare between different measurement setups by extracting the maximal, minimal and averaged value from each map. The maps depend on the spins of the probe, as shown by comparing a single-spin probe (Fig. 2a–d) and a double-spin probe (Fig. 2e–h). Figure 2c displays one-dimensional cuts of maps as a function of initial source z-magentization (equivalent to elevation angle in the Bloch sphere). Figure 2d depicts the procedure of calculating the uncertainty: from the distribution of force values marked by their mean and standard deviation using error bars, the variance is calculated and divided by the mean-force range squared. It is interesting to note that the classical expected values of the forces arise as the means of these quantum force distributions, as expected from the correspondence principle.

Fig. 2: Quantifying the limits of quantum measurements.
figure 2

Using the back action on the source spin and the uncertainty of its measured value. a, b Both criteria are evaluated and plotted on the Bloch spheres, with the position on the sphere denoting the initial state of the source spin. All the spins in this figure are spin-1/2 and the Bloch spheres are oriented such that their north pole represents the source state \(\left| {1/2} \right\rangle\). In each case, the position and orientation of the probe spins are marked on the shell of the spheres. The minimal, maximal, and averaged value of each map is marked on its color bar. c One-dimensional cuts of (a) and (b), as a function of the source’s initial z-magnetization, corresponding to the altitude in the sphere (cos θ). Note that these cuts represent any azimuthal angle since the maps in (a, b) are azimuthally symmetric. d The measured forces as a function of initial z-magnetization. Error bars represent the standard deviation of the quantum-measured force distribution. The mean of each error bar resembles the classical value of the force, as expected from the correspondence principle. The uncertainty is calculated based on the standard deviations and the mean-force range (marked on the right). Note the correspondence between (c) and (d): larger error bars in (d) correspond to higher uncertainty values in (c). The least (most) back action and measurement uncertainty occurs from source spins states represented at the north pole (a bit below the equator). eh Back-action (e, g) and uncertainty (f, h) maps for double-spin probes; color bars are marked with minimal, average and maximal values. All maps in (eh) have xz-plane symmetry due to similar symmetry in the probe spatial distribution, thus only the hemisphere y > 0 is shown. The differences between (e, f) and (g, h) are caused by the different orientation of the probe spin at the equator, creating a substantial increase in the average uncertainty, almost by a factor of 5.

We note how the symmetry of the maps arises from the symmetry of the probe spin distribution. This symmetry is seen in the case of a single spin in Fig. 2a, b, and in the mirror symmetry about the x-z plane throughout Fig. 2, arising from the probe spatial distribution having the same symmetry. Furthermore, the orientations of the probe spins strongly affect the map distribution and the overall quality of the measurement. Comparing Fig. 2e–h, a change in the orientation of the probe spin on the equator from radially outwards to \(\left| { + \frac{1}{2}} \right\rangle\) (i.e., up) strongly affects both maps. The uncertainty values are more strongly affected, having the average value increase almost by a factor of 5. Figure 2d shows the linear relation between the mean force and the source spin z-component, as expected for the classical limit. The standard deviation of each mean value displays the quantum nature of this measurement.

Optimization using higher spin probes

We now turn to optimizing the probe based on the uncertainty and back-action criteria. Considering standard experiments of magnetic sensing in the quantum regime, we envision the probe as a quantum system such as an atom or a molecule constrained to the cantilever (e.g., refs. 7,58,107). In principle, the probe could be described by its sub-atomic particles, e.g., as a large collection of spin-1/2 particles with complex spatial structure, yet it greatly complicates the analysis. Hence, for the results below, we take the reasonable assumption that the intra-atomic or intra-molecular distances between the spins are much smaller than the distance between the cantilever and the source, and model the probe as a single spin with a higher spin quantum number. This is justified when the energy scale of spin flips inside the probe dominates the Hamiltonian over spin flips of the source. Probes of this structure are thus modeled similarly to the single-spin setup presented in Fig. 2a, b, i.e., no inner-probe geometrical structure. Yet, although seemingly simple, this setup already provides much insight for the fundamental quantum limits of magnetic measurements, exhibiting intriguing features as a function of the spin quantum number.

Figure 3 presents the back action and uncertainty of the high spin number single-spin probes, based on derivations appearing in the Methods section. Figure 3b, c presents the average values of the back action and uncertainty, color coded by spin quantum number. Figure 3d summarizes the criteria for different spin numbers by taking m = s. Figure 3e, f present the dependence of the back action and uncertainty on the initial source z-magnetization component, for different spin numbers (again taking m = s). The limiting case of s → ∞ is plotted in black asterisks. Our results imply that higher spin quantum numbers yield better measurements, and within that, higher spin z-components yield better measurements. This conclusion is surprising, when bearing in mind the requirements of both minimal back action and minimal uncertainty. Specifically, this result comes against the classical intuition of having the smallest possible probe charge or mass for minimizing the measurement-induced back action on the source spin.

Fig. 3: Quantum measurement of a spin using higher spin probes.
figure 3

Higher spins provide a better measurement performance. a Setup schematics of a high-spin probe with total spin s and z-component m. The color legend for panels (bf) is shown on the right. b, c Back action (b) and uncertainty (c) for probes of different spin numbers and as a function of m, the probe’s spin z component. The values of the criteria are averaged over all possible initial source spin states (the entire Bloch sphere). The vertical axis in (c) was cut in the value 1 for figure clarity. d Average uncertainty vs. average back-action plots for each s (with m = s), connected in dashed black line using the theoretical formulas. Both measurement criteria are improved by using higher spins. e, f Back action (e) and uncertainty (f) for different values of s (with m = s), as a function of the initial z-magnetization of the source. Note the convergence to the Stern-Gerlach (SG) type measurement (black asterisks).

Note that within each spin quantum number, there is a strong variation of both criteria as a function of the probe’s spin z-component. This is especially true for integer-spin probes: in the case of 0-spin states, the lack of magnetic charge implies that no measurement occurs, yielding zero mean-force range and thus diverging uncertainty, yet there is still back action exerted on the source spin (although minimal), occurring due to quantum transitions of the two-particle system. This effect again demonstrates the fundamental difference between quantum and classical measurement—back action can be exerted even without any information being extracted.

It is interesting to compare the performance of this quantum-spin setup to its classical counterpart—the Stern-Gerlach apparatus (SG)—defined as a projection of the spin on its z-component by a classical magnetic field that experiences negligible back action. Markedly, our quantum measurement apparatus converges to the results of SG as s → ∞, both in average values (Fig. 3d) and in the dependence on initial source state (Fig. 3e, f). This convergence demonstrates the quantum-classical correspondence principle and implies that our measurement scheme can be seen as a quantum extension of the SG scheme. The emergence of the SG scheme raises intriguing questions about the universality of this convergence for other interaction Hamiltonians and whether it is possible to bypass the classical SG performance using a different quantum scheme. In the next part, we investigate this direction using different interaction types and show that the optimality of the SG scheme can already be achieved at lower spin values.

Optimization using generalized spin–spin interaction

We generalize our model to include additional interaction types other than magnetic dipole-dipole (Eq. (2)), e.g., exchange interaction107,127,128,129, spin quadruple interaction130 and the presence of external magnetic fields. The generalized model better captures inter-atomic and inter-molecular interactions of real atomic and molecular probes, as they are often modeled using the above-mentioned Hamiltonians to account for various electric and chemical phenomena. As an example for the richness of the interactions involved, MFMs were demonstrated to operate using exchange interaction even between non-identical atoms107,129,131. In the case of a single-spin probe (as a model for molecular probes), we optimize the measurement by a judicious choice of the source-probe interaction and the probe spin number. To this end, we apply our methods directly on a generalized set of interaction Hamiltonians and investigate how the measurement qualities from Fig. 3 depend on the interaction parameters.

As a proof of concept, we choose a generalized Hamiltonian that includes both magnetic dipole–dipole interaction with an r−3 dependence (as in Eq. (2)) and ferromagnetic exchange interaction (−S1S2) with an r−6 dependence, where r is the source-probe distance:

$$\begin{array}{ll}H_{{{{\mathrm{tot}}}}} = \alpha H_{{{{\mathrm{dipole}}}}} + \beta H_{{{{\mathrm{exchange}}}}} \equiv \alpha \left( {S_1^xS_2^x + S_1^yS_2^y - 2S_1^zS_2^z} \right) + \beta \left( { - {{{\mathbf{S}}}}_1 \cdot {{{\mathbf{S}}}}_2} \right)\\ \quad \quad = \left( {\alpha - \beta } \right)S_1^xS_2^x + \left( {\alpha - \beta } \right)S_1^yS_2^y + \left( { - 2\alpha - \beta } \right)S_1^zS_2^z.\end{array}$$
(12)

where α, β are parameters representing the effective strength of each interaction type. In realistic settings, they are functions of the source-probe initial distance and electro-chemical properties of the source and probes spins132. The ratio \(\frac{\alpha }{\beta }\) shall be denoted as the interactions ratio. As guiding examples, note that \(\frac{\alpha }{\beta } = 1\) yields the Ising Hamiltonian \(- S_1^zS_2^z\)133 and \(\frac{\alpha }{\beta } = - \frac{1}{2}\) yields the XY Hamiltonian \(S_1^xS_2^x + S_1^yS_2^y\)127,128. Since global Hamiltonian factors do not affect the measurement uncertainty and back action, we investigate this Hamiltonian as a function of \(\frac{\alpha }{\beta }\) and probe spin numbers. Hence, the result of the optimization we seek is triplets of values: \(\frac{\alpha }{\beta }\) and the probe’s state |s, m〉, which together optimize the measurement uncertainty and back action.

Figure 4 shows how the parameters of the interaction Hamiltonian determine the behavior of the measurement setup. Interestingly, the uncertainty and back action can both be optimized simultaneously by combining an exchange interaction and a dipole-dipole interaction. Spin-1/2 probes reach our best-achieved uncertainty value of \(\frac{1}{6}\) by taking \(\frac{\alpha }{\beta } = 2\), while the back action remains constant as a function of \(\frac{\alpha }{\beta }\) and is not optimized. Nonetheless, both the back action and uncertainty can be simultaneously optimized at larger spin values, reaching the optimal values of both criteria for \(\frac{\alpha }{\beta } = {1}\). The optimized values occur when m = s, achieved already at spin-1 particles. As a comparison, when the Hamiltonian is made solely of dipole-dipole interactions \(\Big( {\frac{\alpha }{\beta } \to \infty } \Big)\), this optimal value is reached only in the limit s → ∞. The optimal Hamiltonian reads \(H_{{{{\mathrm{int}}}}} = - S_1^zS_2^z\), which resembles the Ising model133. An additional effect displayed in Fig. 4b is the divergence of the uncertainty for negative values of \(\frac{\alpha }{\beta }\), occuring for all spin values. This effect matches the limit of m = 0 probes in Fig. 3, and occurs due to the vanishing mean-force range, as evident from Eq. (11).

Fig. 4: Optimization of the quantum measurements by designing the source-probe interaction Hamiltonian.
figure 4

a An exchange interaction can optimize the measurement. The source-probe interaction Hamiltonian is a sum of dipolar and exchange interactions with strengths α and β (respectively), see Eq. (12). The coefficients α, β depend differently on the source-probe distance and have different coupling constants, thus their desired values are obtained by judicious design of a probe with certain electro-chemical properties, appropriate spin numbers s, m and by varying the source-distance r. b, c Results of numerical simulations: uncertainty (b) and back action (c) as a function of the interaction ratio \(\frac{\alpha }{\beta }\), for different spin numbers s, m (see legend in (a)). Varying the source-probe interaction relative to solely dipolar interaction can improve the quantum measurement for any spin value: spin-1/2 (blue) yields optimal uncertainty for \(\frac{\alpha }{\beta } = 2\), yet with the same suboptimal back action as in the dipolar case. Higher spin values (e.g., spin-1 in red and spin-3/2 in purple) yield fully optimal values of back action and uncertainty for \(\frac{\alpha }{\beta } = 1\), marked in green. This enables optimal measurement already with spin-1 particles without the need for higher spin values as seen in Fig. 3. For a given value of s, higher m values are still favorable in both criteria, similarly to Fig. 3. Note the divergence of the uncertainties in the region \(- 1 \le \frac{\alpha }{\beta } \le - \frac{1}{2}\), marked in (b) by gray dashed lines. The exact value of \(\frac{\alpha }{\beta }\) that yields a divergence depends on the spin values. This divergence occurs due to vanishing mean-force range, as in Fig. 3 for m = 0.

The analysis above can be applied for other types of interactions, including with external magentic fields, and even including molecular anisotropy130. Different Hamiltonians could be relevant in determining the optimal properties for the probe, depending on experimnetal parameters such as the charateristic source-probe distance (affecting each interaction type differently) and the atomic/molecular properties of the source (yielding different interaction effects). Generalizing the source-probe interaction, one can write the interaction Hamiltonian:

$$H_{{{{\mathrm{int}}}}} = {{{\mathbf{S}}}}_1A\left( {{{{\mathbf{S}}}}_2} \right)^T$$
(13)

where S1,2 are the vector spin operators, T denotes matrix transpose, and A is the 3-by-3 interaction tensor. For example, a dipolar interaction uses \(A_{{{{\mathrm{dipolar}}}}} \propto {{{\mathrm{diag}}}}\left( {1,1, - 2} \right)\) and an exchange interaction uses \(A_{{{{\mathrm{exchange}}}}} \propto {{{\mathrm{diag}}}}\left( {1,1,1} \right)\). The eigenvalues of A determine the nature of the interaction130. The A interaction tensor can be further investigated to improve upon our result, potentially yielding an optimal measurement already at spin-1/2 probes rather than spin-1. In a similar way, additional terms can be added to the Hamiltonian, such as Zeeman terms (proportional to S1,2) and spin anisotropy (proportional to \({{{\mathbf{S}}}}_{1,2}^2\) or \({{{\mathbf{S}}}}_{1,2}^{z\quad 2}\)).

Possible generalizations of our approach

Our formalism can be further generalized in several different directions. One generalization is of the uncertainty measure defined in Eq. (11). The present one has the advantage of simplicity, especially for operations such as averaging and minimizing. Other options include the error-propagation-based uncertainty, replacing the denominator of Eq. (11) by a partial derivative or gradient of observable by the source initial state parameters: \(\frac{{\partial \left\langle {\sigma _z} \right\rangle _{{{{\mathrm{measured}}}}}}}{{\partial \theta _{{{{\mathrm{source}}}}}}}\). In case the derivative is constant, this definition coincides with Eq. (11). Additional options could be using the classical or quantum Fisher information1,17. The quantum Fisher information can be applied on different options, such as the joint pure state of the entire system or the reduced mixed state of the probe. The main subtlety here is the existence of decoherence during the measurement process as experienced by the probe. Additionally, the quantum Fisher information could yield additional uncertainty bounds using the quantum Cramér-Rao bound1,134. We leave this intriguing direction for future work.

A second generalization that can be made in our model is of the pointer (Eq. 4 and subsequent derivation), and specifically the vertical motion of the cantilever. In our formalism, we describe the cantilever using a single vertical displacement z with a corresponding quantum state \(\left| z \right\rangle _{{{{\mathrm{pointer}}}}}\), neglecting the inherent width in z. The width is related to the wavefunction of the pointer as a quantum harmonic oscillator, whose spatial representation can be written as \(\varphi \left( {z - z_k} \right)\), where zk is the equilibrium due to the spin interaction. One may take φ(zzk) to be a Gaussian function as the ground state of the oscillator; its width would be manifested as an intrinsic quantum noise in the process of reading the cantilever state and inferring the spin–spin force from it. In this work, we assumed ideal cantilever-reading process, yet improvements in this realistically-imperfect process should be of great value in our model of measurement, as they might reduce measurement noise that could obscure our quantum optimization effect. Two types of possible improvements to the reading process are based on squeezed states. First, one can prepare the cantilever initial state φ to be squeezed in the z-direction, reducing its inherent quantum width, hence reducing the shot noise of measuring the cantilever displacement135. Second, one can prepare the light that is used for measuring the cantilever displacement to be squeezed. This squeezed light has reduced fluctuations in a chosen quadrature (amplitude or phase), and has been proven to enhance measurement accuracy in a variety of setups136,137,138,139. Note that these improvements are complementary to our quantum optimization analysis, as they are related only to the cantilever-reading process and not the spin properties and interaction.

A third generalization of our model can address the small displacement approximation. This approximation is a first-order perturbation of the spin–spin interaction on the cantilever harmonic movement, and is used to neglect the change in the spin–spin eigenstates due to the cantilever vertical displacement. This change occurs when the probe spins are arranged in a non-trivial geometrical structure, such that the cantilever displacement changes the relative distance of each probe spin to the source spin (\({{{\vec{\mathbf r}}}}_{ij}\) in Eq. (3)), which changes the spin–spin Hamiltonian of Eq. (3). Consequently, the first-order approximation is valid under the assumption that the probe-source distance is much larger than the length scale of the probe, and their ratio serves as the small parameter for this approximation. Note that this assumption is similar to the assumption we used to treat the higher spin probe of Fig. 3. Another independent condition that enables this approximation is a large spring constant / large mass of the cantilever. Both options reduce linear effects, but also impairs the overall sensitivity. Further note that this assumption must be relaxed in order to include exotic cantilever quantum states such as cat states. Going beyond the first-order approximation (as in ref. 140) to a second-order approach can be done by incorporating the cantilever vertical displacement into the spin–spin eigenstates as a first-order correction. This correction will only affect the back action, but higher-order corrections could affect the uncertainty as well. An additional way to relax the small displacement assumption is to assume adiabatic changes in the cantilever vertical position compared to the timescale of the spin-state dynamics. The adiabatic changes could be incorporated into the spin–spin interaction, possibly without a perturbation theory.

A fourth generalization to our model is taking into account additional spins nearby the measured spin. In the picture portrayed in Fig. 1, the measured spin could be one of many to measure, and there might be a need to take this crowded environment into account. As a guiding example, there are some works (e.g., ref. 141) that investigate the possibility of using a single spin probe for characterization of the dynamics, interaction type and dimensionality of a many-body spin state in which it is included. To proceed in this direction, there are two possible generalizations: when a nearby spin interacts solely with the measured spin, or interact with the probe spins as well. In the former case, the measured spin is part of a larger (possibly many-body) entangled state, in which case each spin by itself possess a mixed state. The measurement of such mixed state is modeled exactly as described in the Methods section, and very similarly to measurement of a pure state. In the latter case, a nearby spin can act as a weak perturbation on the cantilever, splitting each force-reading into 2n+1 values, with n being the number of measured spins in the sample, and with possible degeneracy in the forces. The case of n = 1 is described in the Methods section. To first order, the splitting is not likely to increase the measurement uncertainty, which is mainly influenced by the large separation between cantilever states. However, the additional perturbation could alter the states of the probe spins and cantilever in a way that alters the back action of the source. Furthermore, the additional spins in the sample might be close enough to the measured spin to prevent perturbative analysis, in which case measurement of a multi-spin simultaneous measurement must be considered.

Discussion

A key conclusion from Figs. 3, 4 is that increasing the spin quantum number of the probe generally improves the measurement, both in the back-action and uncertainty criteria. Still, Fig. 4 displays that both criteria can be optimized for smaller spin values (all m = s > 1/2) in case of dipolar and exchange interaction with equal strengths \(\big( {\frac{\alpha }{\beta } = 1} \big)\). Even then, increasing s is beneficial for a lower sensitivity in the interaction ratio \(\frac{\alpha }{\beta }\), as seen graphically by the curvature of both Fig. 4a, b near \(\frac{\alpha }{\beta } = 1\). Physically, this means that higher spin values permit larger deviations from \(\frac{\alpha }{\beta } = 1\) for which the measurement quality remains relatively good. The deviation from the optimal ratio \(\frac{\alpha }{\beta } = 1\) could stem from, e.g., setting an improper cantilever vertical equilibrium position above the source.

The result that increasing the probe’s spin number optimizes the measurement may seem surprising given that the source spin is spin-1/2, the most delicate spin possible. Classical intuition for measurement in electro- or magneto-statics is that in classical cases, the best measurement is achieved using a test charge or test magnet, which are defined as probe particles that do not influence the field source. However, in our case, the quantum nature of the probe and source forces them to affect each other. An explanation for the measurement optimality at s → ∞ is that this limit resembles the asymmetry present in quantum metrology: where one party is quantum and the other is classical and does not change during the interaction.

A fundamental aspect of our work is the connection to the theory of imperfect quantum cloning142,143,144,145,146,147,148,149,150,151,152,153,154,155. This connection can be utilized to gain a broader perspective on our framework using concepts from quantum information. The source-probe-cantilever system corresponds to a cloned-clone-machine system, respectively. This correspondence is in the sense that the information transfer from the source to the probe and the cantilever (cloning) is analogous to the information transfer from the cloned to the clone and the cloning machine. The theory of imperfect cloning can explain our results and find theoretical bounds on the back action and on the uncertainty of our proposed measurements.

As a simple example, the no-cloning theorem142 forbids creating a perfect clone without changing the state of the clone; analogously, any precise measurement should include a non-zero back action, and vice versa144,148,154,155. Yet the theory of imperfect cloning goes beyond this no-go theorem: There is a substantial amount of works that classify cloning machines and bound their accuracy and back action, which we can use to bound the performance of our spin–spin measurements setups. One important example is the universal and optimal cloning machine by Buzek and Hilary149, which present a lower bound on the average back action of cloning a spin-1/2 particle; they showed this lower bound to be 1/6. Later works extended this result to a general number of cloned/clone spins or higher Hilbert space dimensions145,147,150,151,152, and cloning in specific cases, e.g., phase-covariant cloning, where the cloned is assumed to be on the equator of the Bloch sphere156,157,158. Experimental works have obtained and verified these bounds in various physical settings and cloning interactions159,160,161,162,163,164.

Let us further develop the cloning-measurement correspondence in our case. The scheme that measures a single spin-1/2 source using a single spin-s corresponds to a 1 → M cloning machine that clones a single spin-1/2 to a total of M spin-1/2 particles, prepared in advance in the probe with a total angular momentum spin state s. The correspondence is expressed both in the mathematical formulation of the interaction and in its physical origin: every spin-s probe (e.g., containing a single Nickel atom), is composed of many spin-1/2 particles (electrons, protons and neutrons), in a joint state that yields a higher spin value due to addition of angular momentum; all of the probe’s spins interact with the source spin, yielding the above-mentioned 1 → M cloning machine.

The optimal 1 → M machine was introduced in ref. 150 as an extension of the optimal 1 → 2 machine introduced in ref. 149. Interestingly, the optimal machine in the M → ∞ limit and our machine in the s → ∞ limit are identical, and resemble the SG apparatus. Our setup yields this optimal machine already at s = 1 with the appropriate interaction, as shown in Fig. 4. In the absence of this optimization, our setup clones sub-optimally. The optimal machine has a state-dependent cloning fidelity, as it perfectly clones the states on the poles of the Bloch sphere, and transforms the states on the equator to a completely mixed state. Further note that the SG scheme is known as the best state estimation scheme given a single copy of a spin state146, demonstrating the equivalence between state estimation and cloning to a clone’s Hilbert space of a diverging size.

Continuing this line of thought, we believe that one can take inspiration from optimal cloning machines in the conceptual design of future measurement devices, when such devices approach the ultimate sensitivity limited by the foundations of quantum information theory. Specifically, this means taking the definition of the cloning process and finding probes and interaction Hamiltonian whose eigenstates obey this definition. As an example, one can take the 1 → 2 universal machine from ref. 149, and write it as a measurement in the notations of Eq. (4):

$$\left| { + \frac{1}{2}} \right\rangle \left| { + \frac{1}{2}} \right\rangle \left| {z_0} \right\rangle \to a\left| { + \frac{1}{2}} \right\rangle \left| { + \frac{1}{2}} \right\rangle \left| {z_1} \right\rangle + b\left| {{{\Psi }}^ + } \right\rangle \left| {z_2} \right\rangle$$
(14)
$$\left| { - \frac{1}{2}} \right\rangle \left| { + \frac{1}{2}} \right\rangle \left| {z_0} \right\rangle \to a\left| { - \frac{1}{2}} \right\rangle \left| { - \frac{1}{2}} \right\rangle \left| {z_2} \right\rangle + b\left| {{{\Psi }}^ + } \right\rangle \left| {z_1} \right\rangle$$
(15)

where \(\big| {{{\Psi }}^ \pm } \big\rangle = \frac{1}{{\sqrt 2 }}\big( {\big| { + \frac{1}{2}, - \frac{1}{2}} \big\rangle \pm \big| { - \frac{1}{2}, + \frac{1}{2}} \big\rangle } \Big)\) are the common Bell states. The case \(a,b = \sqrt {\frac{2}{3}} ,\sqrt {\frac{1}{3}}\) corresponds to ref. 149 and the case a, b = 1,0 corresponds to the Wootters-Zurek cloning machine142,149. Using this notation helps identifying the relevant interaction Hamiltonian for each cloning process. It remains to be seen which specific physical Hamiltonian can implement each of these cases and their generalizations. Another interesting machine to mention is the optimal phase-covariant machine156,157,158, which has some similarities in structure to our spin-1/2 probe case. This machine clones states on the equator with optimal fidelity.

Looking forward, our formalism can be applied to a wide range of scenarios, for example, finding which probe spin configuration best measures a high spin source. In this case, other interactions can be taken into account, such as quadruple-quadrupole interaction that stems from anisotropic electrostatic distributions of higher spin atoms. Our framework could also be extended to more complex observables, such as simultaneous measurements of non-commuting variables, or multi-spin observables of entangled sources. It would also be of interest to extend our methods for treating multiple-shot measurements and see how the uncertainty and back action behave as the number of shots increases. There is much more to pursue in analyzing the tradeoff between uncertainty and back action144,148,154,155,165,166,167,168.

We expect more advanced fully analytical formulas to be obtainable for the back action and uncertainty as a function of the spatial spin distribution, possibly using a magnetic multipole expansion. Another important prospect worth-pursuing is the usage of more exotic probes, such as spin-squeezed probes169,170,171 or entangled probes172,173,174, which are known to improve measurements in quantum metrology applications. This direction should be studied in light of cloning theory, where the cloning machine would now be of the form NM145,150 and is related to similar concepts in quantum state estimation146,153,175.

To conclude, we developed a framework to quantify and optimize magnetic nearfield measurement schemes at their ultimate limit of sensitivity, which arises from fundamental principles of quantum information. To exemplify this framework, we analyzed both analytically and numerically different measurement setups of the z-magnetization of a single spin. We quantified these measurements based on the back action they exert on the source spin and their uncertainty, finding fully analytical expressions for an arbitrary-spin-size probe. Our results display a quantum-to-classical transition as the spin size increases, converging into a Stern-Gerlach-type measurement. Furthermore, we showed how shaping the interaction Hamiltonian can achieve an optimal performance already at low spin numbers. Looking at the bigger picture, we expect the study of quantum cloning and its relation to measurement to further provide bounds and insights pertaining to fundamental measurement processes in many other physical systems.

Methods

Generalization to an initially mixed source spin state

The source spin might initially possess a mixed state, for example in the case of measuring a single spin out of a larger group. In this case, Eqs. (59) must be slightly modified as follows. We first define the initial source density matrix ρ0

$$\rho _0 = \mathop {\sum }\limits_n p_0^n\left| {\psi _0^n} \right\rangle \left\langle {\psi _0^n} \right|,$$
(16)

where \(p_0^n\) are real number between 0 and 1 and \(\left| {\psi _0^n} \right\rangle\) are pure spin states, possibly orthogonal. This representation may not be unique, but is written in this form to keep the formulation general. All the subsequent states from Eqs. (58) are modified to also include the incoherent summation over n, which signifies a state that originates from a measurement that starts from a source spin pure state \(\left| {\psi _0^n} \right\rangle\). As an example, the final total density matrix from Eq. (5) is now re-written as

$$\rho _{{{{\mathrm{tot}}}}} = \mathop {\sum }\limits_n p_0^n\rho _{{{{\mathrm{tot}}}}}^n = \mathop {\sum }\limits_n p_0^n\mathop {\sum }\limits_k \left| {z_k^n} \right\rangle \left\langle {z_k^n} \right|_{{{{\mathrm{pointer}}}}}\left[ {\mathop {\sum }\limits_{j,j^\prime } \alpha _{j,k}^n\alpha _{j^\prime ,k}^{n\quad \ast }\left| {{{\Phi }}_j^n} \right\rangle \left\langle {{{\Phi }}_{j^\prime }^n} \right|_{{{{\mathrm{source}}}} + {{{\mathrm{probe}}}}}} \right],$$
(17)

and Eqs. (68) are modified accordingly. The \(\rho _{{{{\mathrm{tot}}}}}^n\) is the final total density matrix originating from the state \(\left| {\psi _0^n} \right\rangle\), taken from Eq. (5). The back action from Eq. (9) must use the proper fidelity measured between mixed states, which we still take as the standard one126

$${{{\mathrm{back}}}}\;{{{\mathrm{action}}}} = 1 - {{{\mathcal{F}}}}_{{{{\mathrm{source}}}}} = 1 - {{{\mathrm{tr}}}}\left( {\sqrt {\sqrt {\rho _0} \rho _{{{{\mathrm{source}}}}}\sqrt {\rho _0} } } \right),$$
(18)

where tr is the trace operator. All subsequent calculations can be carried out from here similarly to the pure-state case.

Calculation for a probe of spin-1/2

The single-spin setup can be solved analytically for any spin quantum number. We first provide a full solution to the spin-1/2 case to illustrate our methodology, and then generalize our results for an arbitrary spin number. The geometrical setup is identical to the one depicted in Fig. 2a, b, and the results of our theoretical calculations agree with our numerical simulations. Based on Eq. (2), the Hamiltonian reads

$$H = - \frac{{\mu _0\hbar^{2}}}{{4\pi r_{12}^3}}\gamma _1\gamma _2\left( { - S_1^xS_2^x - S_1^yS_2^y + 2S_1^zS_2^z} \right).$$
(19)

In order to use Eqs. (48), we write the spectral decomposition of H up to its pre-factors from Eq. (19) as

$$H \propto - \frac{1}{2} \cdot \left| {\frac{1}{2},\frac{1}{2}} \right\rangle \left\langle {\frac{1}{2},\frac{1}{2}} \right| - \frac{1}{2} \cdot \left| { - \frac{1}{2}, - \frac{1}{2}} \right\rangle \left\langle { - \frac{1}{2}, - \frac{1}{2}} \right| + 0 \cdot \left| {{{\Psi }}^ + } \right\rangle \left\langle {{{\Psi }}^ + } \right| + 1 \cdot \left| {{{\Psi }}^ - } \right\rangle \left\langle {{{\Psi }}^ - } \right|,$$
(20)

where \(\left| {{{\Psi }}^ \pm } \right\rangle = \frac{1}{{\sqrt 2 }}\left( {\left| {\frac{1}{2}, - \frac{1}{2}} \right\rangle \pm \left| { - \frac{1}{2},\frac{1}{2}} \right\rangle } \right)\) are the common Bell states. For clarity, the probe- and source-spin states are written together in the same vector (in this order), and the probe/source notations are omitted.

Let us now compute the back action and uncertainty for an initial source state \(\left| {\psi _0} \right\rangle = \cos \frac{\theta }{2}\left| { - \frac{1}{2}} \right\rangle + e^{i\phi }{{{\mathrm{sin}}}}\frac{\theta }{2}\left| {\frac{1}{2}} \right\rangle\), where \(\theta \in \left[ {0,\pi } \right]\) and \(\phi \in \left[ { - \pi ,\pi } \right]\) are the elevation and azimuth angles (respectively) in the Bloch sphere. We take the probe state to be \(\left| { - \frac{1}{2}} \right\rangle\); this choice characterizes the measurement setup but does not change the final values of the criteria in the spin-1/2 case, due to rotational symmetry. Writing the state of the system in the notations of Eq. (4), we obtain

$$\left| {\psi _0} \right\rangle \left| 0 \right\rangle \left| {z_0} \right\rangle \to {{{\mathrm{cos}}}}\frac{\theta }{2}\left| {\frac{1}{2},\frac{1}{2}} \right\rangle \left| { - \frac{1}{2}} \right\rangle + \frac{1}{{\sqrt 2 }}e^{i\phi }\sin \frac{\theta }{2}\left( {\left| {{{\Psi }}^ + } \right\rangle \left| 0 \right\rangle + \left| {{{\Psi }}^ - } \right\rangle \left| 1 \right\rangle } \right).$$
(21)

In the notations of Eq. (4), \(\left| {z_{1,2,3}} \right\rangle = \left| { - \frac{1}{2}} \right\rangle ,\left| 0 \right\rangle ,\left| 1 \right\rangle\) and \(\alpha _{11} = \cos \frac{\theta }{2}\), \(\alpha _{32} = \alpha _{43} = \frac{1}{{\sqrt 2 }}e^{i\phi }\sin \frac{\theta }{2}\). Using Eq. (7) for the source final state, we obtain \(\rho _{{{{\mathrm{source}}}}} = \cos ^2\frac{\theta }{2}\left| {\frac{1}{2}} \right\rangle \left\langle {\frac{1}{2}} \right| + \sin ^2\frac{\theta }{2} \cdot \frac{1}{2}{\Bbb I}\), and thus the back action is:

$${{{\mathrm{back}}}}\;{{{\mathrm{action}}}} = 1 - {{{\mathrm{cos}}}}^4\frac{\theta }{2} - \frac{1}{2}{{{\mathrm{sin}}}}^2\frac{\theta }{2},$$
(22)

yielding a minimal value of 0 (θ = 0), maximal value of \(\frac{9}{{16}}\left( {\theta = \frac{{2\pi }}{3}} \right)\) and averaged value of \(\frac{5}{{12}}\).

For the uncertainty, we calculate the force of each eigenstate by its derivative with respect to z. For the case of a single-spin probe of any spin quantum number, the energy E depends on inter-spin distance z as \(E\sim \frac{1}{{z^3}}\), and thus the forces F scale as \(F = - \frac{d}{{dz}}E\sim - \frac{3}{{r^4}}\sim - \frac{3}{r}E\). Therefore, the set of forces equals the set of energies up to a constant, which cancels in the uncertainty calculation. The probabilities corresponding to the eigenenergies \(- \frac{1}{2},0,1\) are \({{{\mathrm{cos}}}}^2\frac{\theta }{2},\frac{1}{2}{{{\mathrm{sin}}}}^2\frac{\theta }{2},\frac{1}{2}{{{\mathrm{sin}}}}^2\frac{\theta }{2}\), respectively. The mean of the force distribution is cos θ, exactly as classical calculations predict. The variance is \({{{\mathrm{sin}}}}^2\frac{\theta }{2} + {{{\mathrm{sin}}}}^2\theta\), and the mean-force range is \(\frac{9}{2}\). Using the definition of the uncertainty (Eq. (11)), Eq. (23) yields

$${{{\mathrm{uncertainty}}}} = \frac{{{{{\mathrm{sin}}}}^2\frac{\theta }{2} + {{{\mathrm{sin}}}}^2\theta }}{4},$$
(23)

with minimal value of 0 (θ = 0), maximal value of \(\frac{{25}}{{48}}\left( {{{{\mathrm{cos}}}}\theta = - \frac{1}{4}} \right)\) and averaged value of \(\frac{7}{{24}}\). Note that all of the spin-1/2 results above are consistent with Fig. 2 that displays uncertainty and back-action maps for a spin-1/2 probe.

Calculation for a probe of arbitrary spin s

We now generalize our results to higher spin quantum numbers. We denote the total spin of the probe by s. The Hamiltonian remains the same, with S2 being the spin-s operators. In this case, the probe’s initial state can be one of \(\left| { - s} \right\rangle ,\left| { - s + 1} \right\rangle , \ldots ,\left| s \right\rangle\), each yielding different values of back action and uncertainty, which we now explore. By using total spin conservation, the eigenstates and eigenvalues of the Hamiltonian, \(\left| {{{\Phi }}_m} \right\rangle ,\lambda _m\), are obtained

$$\left| {{{\Phi }}_m^ \pm } \right\rangle = \left\{ {\begin{array}{*{20}{r}} \hfill {\left| { \pm s, \pm \frac{1}{2}} \right\rangle ,} & \hfill {m = s}\\ \hfill {\alpha _m^ \pm \left| {m,\frac{1}{2}} \right\rangle + \beta _m^ \pm \left| {m + 1, - \frac{1}{2}} \right\rangle ,} & \hfill { - s \le m < s}\end{array}} \right.$$
(24)
$$\lambda _m^ \pm = \left\{ {\begin{array}{*{20}{r}} \hfill { - s,} & \hfill {m = s}\\ \hfill {\frac{{1 \mp \sqrt {\left( {2m + 1} \right)^2 + \left| {\left\langle m \right|S_2^ + \left| {m + 1} \right\rangle } \right|^2} }}{2},} & \hfill { - s \le m < s}\end{array}} \right.$$
(25)

where \(S_2^ +\) is the raising operator for the probe spin. It holds that

$$\left\langle m \right|S_2^ + \left| {m + 1} \right\rangle = \sqrt {s\left( {s + 1} \right) - m\left( {m + 1} \right)} ,$$
(26)
$$- \frac{{\beta _m^ \pm }}{{\alpha _m^ \pm }} = \frac{{2m + 1}}{{\left\langle m \right|S_2^ + \left| {m + 1} \right\rangle }} \pm \sqrt {\left( {\frac{{2m + 1}}{{\left\langle m \right|S_2^ + \left| {m + 1} \right\rangle }}} \right)^2 + 1} ,$$
(27)
$$\frac{1}{{\left( {\alpha _m^ \pm \beta _m^ \pm } \right)^2}} = 4\left( {\left( {\frac{{2m + 1}}{{\left\langle m \right|S_2^ + \left| {m + 1} \right\rangle }}} \right)^2 + 1} \right),$$
(28)
$$\left( {\alpha _m^ - ,\beta _m^ - } \right) = \left( { - \beta _m^ + ,\alpha _m^ + } \right).$$
(29)

where Eqs. (2628) are obtained from algebraic manipulations on the eigenvalue problem, and Eq. (29) from eigenvector orthogonality.

Using the spectral decomposition of the Hamiltonian, we calculate the uncertainty and back action for a specific initial source state of angles θ, ϕ, as before. The probe initial state is |m〉 for \(\left| m \right| \le s\). In this case, we note two important remarks. First, the forces are simply −3 times the energies, as in the spin-1/2 case. Second, there is a strong degeneracy in this system: almost every eigenvalue has multiplicity of two, since the eigenvalue expression is symmetric under the exchange \(m \leftrightarrow - m - 1\) for \(- s \le m \le s - 1\). The only exception is the eigenvalues of \(m = \frac{1}{2}\), each appearing only once. Fortunately, this strong degeneracy only affects the back-action calculation for m = 0, since only this case features non-zero overlaps of the system state with two degenerate eigenstates. Therefore, we first treat the case of m ≠ 0 and then m = 0.

Given m ≠ 0, the system is initially at the state \(\left| m\right\rangle \left| {\psi_{0}} \right\rangle\), which overlaps with the eigenstates \(\big|{{{\Psi }}_{j}^{\pm} } \big\rangle = \alpha_{j}^{\pm} \big| {j,\frac{1}{2}} \big\rangle + \beta_{j}^{\pm} \big| {j + 1, - \frac{1}{2}} \big\rangle\) for j = m − 1, m (two eigenstates for each j), and with \(\left| { \pm s, \pm \frac{1}{2}} \right\rangle\) if m = ±s. We assume without loss of generality that m > 0, since symmetry arguments force both criteria to be even functions of m. Therefore, for 0 < m < s, there are four relevant non-degenerate eigenstates, \(\left| {{{\Psi }}_{m-1}^{+} } \right\rangle ,\left| {{{\Psi }}_{m-1}^{-}} \right\rangle ,\left| {{{\Psi }}_{m}^{+} } \right\rangle ,\left| {{{\Psi}}_{m}^{-} } \right\rangle\), for which the overlaps with the initial system state are \({\beta}_{m - 1}^{+} \cos \frac{\theta}{2},{\beta}_{m - 1}^{-}{\rm{cos}} \frac{\theta }{2},\alpha_{m}^{+} e^{i\phi }\sin \frac{\theta}{2},\alpha_{m}^{-} e^{i\phi }\sin \frac{\theta }{2}\). The back action in this case is \(\frac{1}{2}{\rm{sin}}^{2}\theta + 2{\rm{cos}} \theta \left({\rm{cos}}^{2}\frac{\theta}{2}\left(\alpha_{m-1}^{+}\beta_{m - 1}^{+}\right)^{2} - {\rm{sin}}^{2}\frac{\theta}{2}\left(\alpha_{m}^{+}\beta_{m}^{+}\right)^{2}\right)\), and its average is \(\frac{1}{3}( {( {\alpha _{m - 1}^ + \beta _{m - 1}^ + } )^2 + ( {\alpha _m^ + \beta _m^ + } )^2 + 1} )\).

For m = s, there are only three eigenstates: \(\left| {{{\Psi }}_{s - 1}^ + } \right\rangle ,\left| {{{\Psi }}_{s - 1}^ - } \right\rangle ,\left| {s,\frac{1}{2}} \right\rangle\), with the corresponding overlaps \(\beta _{s - 1}^ + \cos \frac{\theta }{2},\beta _{s - 1}^ - \cos \frac{\theta }{2},e^{i\phi }\sin \frac{\theta }{2}\). A similar calculation yields back action of \(\frac{1}{2}\sin ^2\theta - 2\left( {\alpha _{s - 1}^ + \beta _{s - 1}^ + } \right)^2\sin ^2\frac{\theta }{2}\cos \theta\), with average \(\frac{1}{3}( {( {\alpha _{s - 1}^ + \beta _{s - 1}^ + } )^2 + 1} )\), where \(\left( {\alpha _{s - 1}^ + \beta _{s - 1}^ + } \right)^2 = \frac{1}{2}\frac{s}{{4s^2 - 2s + 1}}\).

The case m = 0 deserves special treatment and yields peculiar results. In this case, there are two doubly-degenerate eigenstates that have non-zero overlap with the initial spins state: \(\left| {{{\Psi }}_{ - 1}^ + } \right\rangle ,\left| {{{\Psi }}_{ - 1}^ - } \right\rangle ,\left| {{{\Psi }}_0^ + } \right\rangle ,\left| {{{\Psi }}_0^ - } \right\rangle\), where the degeneracy is among the pairs \(| {{{\Psi }}_{ - 1,0}^ + } \rangle\) and \(| {{{\Psi }}_{ - 1,0}^ - } \rangle\), for which \(\left( {\alpha _{ - 1}^ \pm ,\beta _{ - 1}^ \pm } \right) = \left( {\beta _0^ \pm ,\alpha _0^ \pm } \right)\). Therefore, the final source state is \(\rho_{\mathrm{source}} = \left(\alpha_0^{+2} + \beta_0^{ + 2}\right)\left|\psi_{0} \right\rangle \left\langle \psi_{0} \right| + \left(1 - \left(\alpha_0^{ + 2} + \beta_0^{ + 2} \right) \right)\left(\sin ^{2}\frac{\theta }{2}\left| - \frac{1}{2} \right\rangle \left\langle - \frac{1}{2} \left| + \cos^{2}\frac{\theta }{2}\right|\frac{1}{2} \right\rangle \left\langle \frac{1}{2} \right| \right)\), yielding back action of \(\left( {\alpha _0^ + \beta _0^ + } \right)^2\left( {2 - \sin ^2\theta } \right),\frac{1}{{\left( {\alpha _0^ + \beta _0^ + } \right)^2}} = 1 + \frac{1}{{s^2 + s}}\), with average of \(\frac{4}{3}\left( {\alpha _0^ + \beta _0^ + } \right)^2\). Note that for a given s, the back action for m = 0 is minimal, yet this measurement setup does not extract any information, as discussed below.

For the uncertainty, we first calculate the mean force using the force values and probabilities. Interestingly, in all cases, the mean force equals the classical value \(m\cos \theta\). The variance equals \(\frac{1}{4}\left( {s\left( {s + 1} \right) + 3m^2 + m\cos \theta - 4m^2\cos ^2\theta } \right)\), with average value of \(\frac{1}{4}\left( {s\left( {s + 1} \right) + \frac{5}{3}m^2} \right)\). After normalizing by the mean-force range, the uncertainty reads \(\frac{1}{{16}}\left[ {\frac{{s\left( {s + 1} \right)}}{{m^2}} + \frac{5}{3}} \right]\). Note the −mm symmetry, as well as the monotonous decrease as a function of s (for m = s) and as a function of m (for a given s). Additionally, note the limit \(\to \frac{1}{6}\) for m = s → ∞. Finally, note the divergence at m = 0. This divergence stems from the vanishing mean-force range, implying that the measurement in this case gives zero information. This fact is quite intuitive, since m = 0 implies no magnetic interaction, implying no measurement.