Nanoscale Vector Magnetic Sensing with Current‐Driven Stochastic Nanomagnet

Detection of vector magnetic fields at nanoscale dimensions is critical in applications ranging from basic material science and fundamental physics to information storage and medical diagnostics. So far, nanoscale vector magnetic field sensing is achieved solely by exploiting a single nitrogen‐vacancy (NV) center in a diamond, by evaluating the Zeeman splitting of NV spin qubits by using the technique of an optically‐detected magnetic resonance. This protocol requires a complex optical setup and expensive detection systems to detect the photoluminescence light, which may limit miniaturization and scalability. Here, a simple approach with all‐electric operation to sensing a vector magnetic field at 200 × 200 nm2 dimensions is experimentally demonstrated, by monitoring a stochastic nanomagnet's transition probability from a metastable state, excited by a driving current due to spin‐orbit torque, to a settled state.


Introduction
Sensitive physical measurements have played a pivotal role in the development of modern science and technology.

DOI: 10.1002/aelm.202300753
In particular, the detection of vectorial magnetic fields with high sensitivity and nanoscale spatial resolution is critically important in fundamental studies ranging from physics and material sciences to biology, as well as in the development of new applications in spintronics and quantum technology. [1,2]o date, nanoscale vector magnetometers have been realized by exploiting a single nitrogen-vacancy (NV) center to reconstruct the vectorial components of an AC/DC magnetic field.However, these techniques are all based on using the optically detected magnetic resonance (ODMR) technique with the requirement of applying microwaves sequentially or simultaneously. [3,4]The requirement of microwave control brings the possibility of spurious harmonics within the measurement and hinders applications in areas where it is inherently difficult to achieve such control or where the application of microwaves is prohibitively invasive.Microwave also provides engineering and technological hurdles for high-level integration.On the other hand, these optically read magnetometers require a complex optical setup and bulky photon detector to detect the photoluminescence light.Therefore, the main challenge for practical applications of such existing NV-based sensing techniques remains their miniaturization and integration into compact devices. [5]hereby, there is a need for a single nanoscale device that can detect a vectoral magnetic field with extremely high spatial resolution.
A single spintronic device can implement the detection of 3D magnetic field by spin-orbit torque (SOT) driven domain wall propagation or nucleation, [6][7][8][9] which offers advantages such as excellent magnetic sensitivity, complementary metal-oxidesemiconductor (CMOS) process compatibility, and all-electric operating environment at room temperature.However, the microscale devices cannot be unrestrictedly scaled down to nanometers owing to the requirement of the multi-domain structure or Hall device with two arms.[12][13] In this work, we exploit SOTinduced probabilistic magnetization switching to demonstrate a compact and simple approach for detecting nanoscale vector magnetic field, with a 200 × 200 nm 2 nanomagnet composed of heavy metal/ferromagnet (HM/FM) heterostructure.b) Energy level structure of the bistate nanomagnet with PMA under zero field.The energies for being in the upward and downward magnetized states (M z = ±1) are the same (E = 0).If the magnet is stimulated by a driving current, then the magnetization will be excited from the stable state to the metastable state (M z = 0) with an energy level of E b .Once the current is turned off (J x = 0), the magnetization will return to the up or down state with equal probability.c) Energy level structure of the nanomagnet under a field of +H z .The energies of the up and down states are split by E z and −E z , respectively.After the driving current is turned off, the magnetization will be more likely to relax to the state with lower energy, resulting in P up > P dn .d,e) H z,eff produced by SOT when the current and the colinear field are along d) x-direction and e) y-direction.f) Diagram of the approach for sensing an OOP field.Under a certain OOP magnetic field, a batch of current pulses is applied to the device to count the state numbers and thus calculate the corresponding probability (P up ).During each current pulse event, a high driving current is followed by a small reading current to drive the magnet to the metastable state and detect the relaxed magnetization state.

Sensing Principle and Experimental Setup
A single-domain nanomagnet with perpendicular magnetic anisotropy (PMA) sitting immediately on a Ta layer is the basic field probing element of the proposed sensor, as illustrated in Figure 1a.In this configuration, the anomalous Hall resistance R AHE is proportional to the out-of-plane (OOP) magnetization, according to the anomalous Hall effect (AHE), and thus one can probe the magnetization state by measuring the R AHE .As a result of the spin Hall effect of Ta or Rashba effect in the Ta/CoFeB/MgO heterostructure, the magnetization of the nanomagnet can be controlled by the charge current flowing in the HM layer via SOT. [14,15][18] Additionally, after relaxation, from a macrospin perspective, the magnetization state will be found in the lower energy state with higher probability, where the probability of being in a state with energy E is proportional to exp(−E/k B T) with k B the Boltzmann constant and T the temperature, as given by Boltzmann statistics [19,20] or deduced by the Arrhenius-Néel law [21] (see Section S1, Supporting Information for more details).Note that the degenerated energy level of the stable state (M z = ±1) is assumed to be the ground state (E = 0) without any effective magnetic field (Figure 1b).
However, the energy landscape would be modified by a magnetic field (H) through the Zeeman energy splitting of the two stable ground states, which is expressed as −μ 0 VM s (M•H), where μ 0 is the permeability of free space, V is the volume of an individual magnetic entity, M s is the saturation magnetization, and M is the unit vector of the magnetization. [22]Considering an external field H along the +z-direction, +H z , the Zeeman energy is E z = −μ 0 VM s H z , and thus, the energies of the M z = +1 and −1 states shift by +E z and −E z , respectively, as shown in Figure 1c.Unless otherwise stated, a positive/negative sign represents the up/down direction, respectively, for both H z and M z .Therefore, upon removal of the driving current, the magnetization relaxes to M z = +1 with a probability of P up ∝ exp(−E z /k B T), while the probability of orienting in the down state P dn is proportional to exp(+E z /k B T), under the +H z .Since P up + P dn = 1, it is inferred that Note that, once the exponent |2E z /k B T| <1, according to firstorder Taylor approximation or piecewise linear approximation, [23] P up can be deduced as: which is a linear function of H z .This linear relationship between P up and H z enables the detection of H z by monitoring the probability of a relaxed state.Simply, according to Equation ( 2), without H, the magnet would reorient itself to either "up" or "down" state with an equal probability of 50%.This stochastic switching feature has been confirmed and used for nanomagnetic logic and true random number generators in previous work. [17,18]esides H z , a z-component effective field H z,eff generated by the IP current with a collinear magnetic field through SOT can also determine P up , making it feasible to detect an IP field with the proposed sensor.H z,eff is written as a function of the current density along the x-(or y-) direction J x(y) and the normalized magnetization m x(y) caused by its corresponding collinear magnetic field H x(y) : where ℏ is the reduced Planck constant, e is the electron charge, t is the thickness of the CoFeB layer and  SH is the spin Hall angle of the Ta layer. [6,16]The IP field H x (H y ) is utilized to orient the magnetization to achieve an IP component m x(y) and then generate H z,eff , as depicted in Figure 1d (Figure 1e).Thus, for IP field detection, based on Equation (3), two conclusions can be drawn.First, for a given amplitude of J x (J y ), H z,eff depends on H x (H y ), whereas the direction of H z,eff is determined by the current polarity.Therefore, P up would vary with H x (H y ) under a given collinear IP current through the generated H z,eff , and the variation tendencies are opposite for different current polarities.Second, H x (or H y ) cannot produce H z,eff if there is solely the transverse current J y (or J x ).This indicates that P up is invariable with the IP field under a transverse current.On the other hand, for OOP field sensing, an IP current can only excite the magnet into the metastable state (high energy level) without changing the Zeeman energy, and thus P up/dn would vary linearly with H z under the applied IP current, where the variation tendency is independent of current polarity.Noting that the magnetic field sensing scheme, using superparamagnetic films with stochastic characteristics, has been proposed in Refs [9,24] , by monitoring the field-dependent average magnetization of superparamagnetic elements with multidomain structure.Still, such schemes can only detect the magnetic field at microscale-spatial resolution.
We carried out the proof-of-principle experiments with a nanomagnet comprised of Ta (10 nm)/CoFeB (1 nm)/MgO (2 nm)/Ta (2 nm) (from the bottom) heterostructure, to describe the feasibil-ity of vector magnetic field sensing based on probabilistic nanomagnet and evaluate the performance (detectable field and resolution limit) of such a sensor.The detailed magnetic and transport properties of the device are shown in Section S2 (Supporting Information).The CoFeB with PMA can be driven to M z = 0 state if an IP current flows through a resistive bar made of tantalum that can exert strong SOT.The measurement sequence is illustrated in Figure 1f.Here, the magnitude and the duration of the driving current are J d = 12 MA cm −2 and 0.2s, respectively.After relaxation, a reading current of J r = 0.5 MA cm −2 is used to measure the R AHE and thus detect the magnetization state.The J r is capable of flowing in either the x-direction or the y-direction, abbreviated as J r,x, and J r,y , respectively.In our experiments, J r was aligned with the J d .The state probability is collected by repeating this measurement.The current-induced stochastic switching of the device is shown in Figure S3 (Supporting Information), and the magnetic entity volume V is estimated to be ≈4000 nm 3 (see Section S3, Supporting Information for more details).If we count the number of up states as N up in N pulse event cycles, then P up is equal to N up /N.Meanwhile, our method can detect not only DC fields but also AC fields (Section S4, Supporting Information).

The 1D Magnetic Field Sensing
For the experimental implementation of vector magnetic field sensing, we start with the detection of a one-dimensional magnetic field.Here, we apply a driving current pulse 500 times to count the up-state probability (P up ) at a given magnetic field.When the driving current pulse is applied along the x-direction (J d,x ), whether positive or negative, as discussed above, P up linearly increases with increasing H z from −19 to 8 Oe (or from −8 to 19 Oe), and the two cases have almost the same slope for the P up -H z curves (Figure 2a).In contrast, P up shows the opposite variation tendencies with H x for different polarities of J d,x (Figure 2b).Under J d,x = −12 MA cm −2 , P up linearly decreases with H x within the range of −60 to +20 Oe, while under J d,x = +12 MA cm −2 , P up linearly increases with H x .Moreover, P up remains constant with H y varying from −20 to 20 Oe under J d,x , regardless of the polarity, as no H z,eff is induced by H y , which cannot tilt the magnetization toward the x-direction (Figure 2c).It is worth noting that settled up/down probabilities are unequal at H = 0 Oe, and thereby an asymmetric linear range for P up versus H (x, y, or z) is presented, which may be associated with the presence of a bias field in the above unoptimized experimental devices (Section S5, Supporting Information).Such nonequality and asymmetry could be improved or corrected in real applications by optimizing film deposition and device fabrication, introducing a magnetic field to balance the bias field, or calibrating the sensor system.Overall, P up is found to be sensitive to H x and H z , but insensitive to H y when J d,x is applied.
Similarly, P up is sensitive to H y and H z , but insensitive to H x when J d,y is applied (Figure 2d-f).These experimental results not only show the operation principle of 1D magnetic field sensing but also further verify the theoretical expectations described in the previous section that there are different relations between the variation tendency of the relaxed state probability and the current polarity.Next, we will investigate whether these differences enable the distinction of the contributions of the IP and OOP fields.In other words, we aim to determine whether three components (H x , H y, and H z ) of the magnetic field can be detected by characterizing the relaxed state probability variation, for reconstructing a vector magnetic field with one single nanomagnet.

The 3D Magnetic Field Sensing
If a 3D magnetic field H = (H x , H y , H z ) is applied to the device, then two P up values under positive and negative J x can be measured: P up (+J d,x ) and P up (−J d,x ).According to the different current-direction-dependent tendencies of the P up -H z curves shown in Figure 2a, the two collected P up values can be processed with an additional operation to eliminate the H x contribution.Therefore, the net probability contributed only by the H z ponent is shown in Figure 3a is expressed as: By performing a subtraction operation to eliminate the H z contribution, we can obtain the net probability contributed only by H x (Figure 3b): Here, we add a compensation value of 0.5 to the subtraction result to ensure that P up (H x ) is in the range from 0 to 1.
Likewise, if the driving current is applied along the y-direction, then the net probability contributed only by H y can be evaluated as (Figure 3c): Note that P(H z ) can also be calculated as: and the P(H z ) values calculated from Equations ( 4) and ( 7) are expected to be the same.Therefore, the relationships between the net probability (P(H x ), P(H y ), and P(H z )) and the corresponding magnetic field components (H x , H y , and H z ) can be identified from 1D measurements, which is similar to our previous work. [16]Once the net probability components are obtained using Equations (4-7), the magnitude of the corresponding magnetic field components can be read out according to Figure 3a-c, and thus implement 3D magnetic field sensing.The linear range of the magnetic field sensor is ≈−8 to +8 Oe for H z , −60 to +20 Oe for H x , and −40 to +28 Oe for H y , as shown in Figure 3. Generally speaking, the maximum detectable field for H z is related to the saturated field of the nanomagnet with the assistance of SOT.In contrast, the maximum detectable IP field is expected to be determined by the field required to induce deterministic switching, corresponding to 100% one-state probability, under the driving current through SOT.On the other hand, the magnitude range of the detected vector field should be limited by the smallest detecting range of the three components of a vector field, i.e., ±8 Oe here.As beyond such range, to accurately evaluate the magnetic-state probability, the higher-order terms of the Taylor approximation should be taken into account.This incurs that it is impossible to obtain the net probability contributed by only one component of vectorial magnetic field, by the addition or subtraction of state probabilities caused by applying current in the opposite direction (see Section S6, Supporting Information for more details).

Performance of the Sensor
Next, based on the results shown in Figure 3, we evaluate the performances of the demonstrated nanoscale 3D magnetic field sensor, such as sensitivity, linearity, field resolution, and spatial resolution.Sensitivity is the response of the device to the field change and is given by the relation S = ΔP/ΔH.Here, the sensitivities are calculated to be 1.02, 1.09, and 3.43%/Oe for H x , H y , and H z , respectively.The sensitivity could be improved at lower temperatures, as discussed in Section S7 (Supporting Information).Another specification of the sensor, to measure the maximum deviation of the sensor output from the fitted straight line, is the linearity error (ΔP max ).Normally, it is expressed as a percentage of the full-scale value: ΔP max /P FS × 100%, where P FS is the full-scale output within the linear range. [6]According to the results shown in Figure 3, the linearity errors of our sensor within the linear range are 4.9%, 4.9%, and 4.7% for H x , H y, and H z , respectively.Here, ΔP max , along with the sensitivity, is also used to evaluate the minimum detectable field (H min = ΔP max /S) for H x , H y , and H z , given by 3.9, 3.4, and 0.7Oe, respectively.Furthermore, the linearity error can be further improved by increasing the number of pulse events.Figure 4 shows P up as a function of H x under different numbers of pulse events (N = 200, 500, and 1000) with J d,x = +12 MA cm −2 .ΔP max and the linearity error decrease with increasing number of pulse events and reach 2.37% and 3.1%, respectively, when N = 1000 (Figure 4c).
Generally, for all trials, the distribution of the actual P up after N pulsing events, at a given field with expected up-state probabilityP E up , would obey binomial distribution (BD) with the standard deviation  =

√
NP E up (1 − P E up )∕N. [25]It indicates that P up is extremely likely (≈95.4%) to fall intoP E up ± 2, and hence the utmost of sensor linearity error can be roughly estimated as 2, which reaches a maximum 1∕

√
Nwhen P E up = 0.5 for a fixed N, but decreases with the increase of N. Figure 4d plots ΔP max as a function of N and the fitting with the 1∕

√
N curve (soft red line).It is seen that ΔP max is close to 1∕ √ N, though the former is less than the latter when N is greater than 800.Consequently, the minimum detectable magnetic field H min would be ΔP max ∕S =1∕S √ N. Accordingly, μ 0 H min is expected to be as low as 1 μT, which is the magnitude of the magnetic field produced by the spin of a single electron at a distance of 10 nm, when N = 7.5 × 10 7 , 5.6 × 10 7 and 0.3 × 10 7 for the x-, y-, and z-directions, respectively.Especially, the N for the zdirection is in the same order as the number of pulse events used in NV measurements. [26]Furthermore, inspired by the NVbased sensors, [26,27] we deduce the field resolution  as the product of μ 0 H min and the square root of measurement time, i.e. =  0 H min √ NT 0 , where T 0 is the time of each current cycle.The long cycle period (T 0 = 0.3 s) used in our conceptual experiments leads to a large  (4.8, 4.2, and 0.8 mT Hz −1/2 for the x-, y-, and z-directions, respectively, at N = 500).T 0 could reach 2 ns for real applications, [28] and consequently, the resolution would theoretically be improved to 390, 340, and 65 nT Hz −1/2 .
Additionally, we expect that the spatial resolution can be developed by further scaling down the nanomagnet size (seeing Section S8, Supporting Information).Although a smaller magnetic body volume V will decrease the energy barrier, it has been demonstrated to tune the switching probability of low-barrier nanomagnets, such as Δ = K u V/k B T = 9, where K u is magnetic anisotropy constant, by both OOP magnetic fields and IP fields. [10,11]In other words, the proposed sensor could keep working even with such low-barrier magnets for detecting both OOP fields and IP fields, giving us an opportunity to promote the spatial resolution of the sensor to less than 10 nm (see Section S2, Supporting Information for more details).Also, scaling down the size of the nanomagnet would reduce the driving current and thus power consumption.It indicates this sensing technique is to allow the sensor to be scalable, which is crucial for nanoscale magnetic detection and imaging with high spatial resolution.For future real applications, the proposed sensor with Hall bar structure could be developed into a magnetic tunnel junction (MTJ) structure that would have more advantages, for example, a larger readable resistance ratio due to the TMR effect. [29]In the future, to implement simultaneous magnetic imaging over a wide field of view such as μm or mm order, an MTJ array could be designed with a shared driving path to enhance the in imaging the spatial magnetic field. [30]Although individual MTJs are separated from each other, it would be possible to obtain continuous spatial field imaging with two layers of interleaved sensors, by making use of the advanced technique of 3D stacking of MTJs (Section S8, Supporting Information).When compared to the quantum vector magnetometers such as single NV-based sensors, [3,4] our approach is expected to be comparable to theirs in the field resolution and the spatial resolution (see Section S9, Supporting Information).More importantly, our technique has advantages such as one single device structure with all-electric operations and great potential for miniaturiza-tion and scalability.These properties will allow us to develop a simple and compact sensor system for detecting vector magnetic fields at nanoscale dimensions.

Conclusion
In summary, this work proposes and demonstrates an all-electric approach to sensing a vector magnetic field at nanoscale dimension with a probabilistic nanomagnet driven by SOT.The proofof-concept experiments present a 200 × 200 nm 2 nanomagnet that can detect the H x , H y , and H z components with sensitivities of 1.02% Oe −1 , 1.09% Oe −1 , and 3.43% Oe −1 , respectively, by extracting statistics from 500 pulse events for each field measurement.With a further increase in pulse events, the resolution is expected to be improved (to less than 1 μT, if N is in the order of 10 6 ).For ultrahigh spatial resolution, the nanomagnet can be scaled down to several nanometers with a low barrier energy, which would also be beneficial for low power consumption.Moreover, with the same nanomagnet, the demonstrated possibility of sensing nanoscale magnetic fields or an electrical current in combination with the observed memory and stochastic or probabilistic computing capabilities [17,18,31,32] opens a bright new world of nanospintronics for integrated sensing, memory, and computing functions.

Experimental Section
Sample Preparation: Magnetron sputtering was used to deposit a film structure of Ta(10 nm)/CoFeB(1 nm)/MgO(2 nm)/Ta(2 nm) on a thermally oxidized Si substrate at room temperature.The film was then processed into the Hall-bar structure by electron beam lithography (EBL) and argon-ion milling (AIM).The Hall bars contained the entire thin film stack, with the region outside the Hall bars etched down to the insulating Si substrate.EBL and AIM were used to define the current channel and the detection channel.The widths of the two channels were designed to be 1 μm.

Figure 1 .
Figure 1.Schematic visualization of the bilayer nanomagnet sensing principle.a) Device structure along with the schematic of the measurement setup (top) and the SEM image of the nanomagnet (bottom).The current is applied along the x-direction while the Hall voltage is detected in the y-direction.b)Energy level structure of the bistate nanomagnet with PMA under zero field.The energies for being in the upward and downward magnetized states (M z = ±1) are the same (E = 0).If the magnet is stimulated by a driving current, then the magnetization will be excited from the stable state to the metastable state (M z = 0) with an energy level of E b .Once the current is turned off (J x = 0), the magnetization will return to the up or down state with equal probability.c) Energy level structure of the nanomagnet under a field of +H z .The energies of the up and down states are split by E z and −E z , respectively.After the driving current is turned off, the magnetization will be more likely to relax to the state with lower energy, resulting in P up > P dn .d,e) H z,eff produced by SOT when the current and the colinear field are along d) x-direction and e) y-direction.f) Diagram of the approach for sensing an OOP field.Under a certain OOP magnetic field, a batch of current pulses is applied to the device to count the state numbers and thus calculate the corresponding probability (P up ).During each current pulse event, a high driving current is followed by a small reading current to drive the magnet to the metastable state and detect the relaxed magnetization state.

Figure 2 .
Figure 2. One-dimensional magnetic field sensing.a-c) Probability of the settled state being the upstate, P up , as a function of the magnetic field along the a) z-direction, b) x-direction,and c) y-direction when a driving current pulse of 12 MA cm −2 with a duration of 200 ms is applied along the ±xdirection.d-f) P up as a function of the magnetic field along the d) z-direction, e) x-direction, and f) y-direction when the driving current is applied along the ±y-direction.The dashed lines are the linear fits to the experimental data.Each displayed measurement data point is a statistical result from 500 pulse events.

Figure 3 .
Figure 3. Net probability contributed by H z , H x, and H y .a) Net probability P(H z ) as a function of H z , where the P up (J d,x = +12 MA cm −2 ) and P up (J d,x = −12 MA cm −2 ) values under different H z ranging from −8 to 8 Oe are processed with an addition operation to obtain P(H z ).b) Net probability P(H x ) as a function of H x from −60 to 20 Oe, as obtained by a subtraction operation to eliminate the contribution of H z .c) The net probability component P(H y ) as a function of H y in the range of −40 to +28 Oe, as obtained by a subtraction operation using the two values of P up (J d,y = +12 MA cm −2 ) and P up (J d,y = −12 MA cm −2 .The solid lines are best fit to the corresponding experimental data points.

Figure 4 .
Figure 4. Effect of the number of pulse events on the linearity of P up -H x curves under J d,x = +12 MA cm −2 .a-c) P up -H x curves with pulse event numbers of a) N = 200, b) 500, and c) 1000.The cyan lines are the best fit for the experimental data points.d) Linearity (cyan circles) as a function of pulse event number along with the 1∕ √ Ncurve (soft red line).
A 10 nm thick hard mask (Ti) with sizes of 200 × 200 nm 2 was grown at the center of the Hall bars by EBL and deposited by electron beam evaporation.AIM was also used to etch the stack outside the dot's region down to the bottom Ta layer.The dots therefore comprised Ta (10 nm)/CoFeB (1 nm)/MgO (2 nm)/Ta (2 nm), and the regions of the Hall bar outside the dots were etched down to the bottom Ta layer.Electrical Measurements: For the anomalous Hall resistance measurements, a d.c.current source (Keithley model 6221) was used to apply currents and a nanovoltmeter (Keithley model 2182A) to measure the Hall voltage.A high current of 1.2 mA (12 MA cm −2) with a duration of 0.2 s was used to excite the nanomagnet mentioned in the main text.A constant low current of 50 μA (0.5 MA cm −2 ) was applied to read out the AHE resistance.The external magnetic field was generated by a Helmholtz coil driven by a power supply (Model EM5 & Model P7050, East Changing Technologies, Inc. Beijing).