WorksPhysics and Astronomy
Nanoscale three-dimensional magnetic sensing with a probabilistic nanomagnet driven by spin-orbit torque
Abstract
Detection of vector magnetic fields at nanoscale dimensions is critical in applications ranging from basic material science, to medical diagnostic. Meanwhile, an all-electric operation is of great significance for achieving a simple and compact sensing system. Here, we propose and experimentally demonstrate a simple approach to sensing a vector magnetic field at nanoscale dimensions, by monitoring a probabilistic nanomagnet's transition probability from a metastable state, excited by a driving current due to SOT, to a settled state. We achieve sensitivities for Hx, Hy, and Hz of 1.02%/Oe, 1.09%/Oe and 3.43%/Oe, respectively, with a 200 x 200 nm^2 nanomagnet. The minimum detectable field is dependent on the driving pulse events N, and is expected to be as low as 1 uT if N = 3 x 10^6.
Main Text: Sensitive physical measurements have played a pivotal role in the development of modern science and technology. In particular, detection of vectorial magnetic fields with high sensitivity and nanoscale spatial resolution is critical 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). Consequently, over the past few decades, various advanced magnetic field sensors have been developed, including scanning Hall probe microscopy (3), nanoscale superconducting interference devices (4, 5), magnetic resonance force microscopy (6, 7), giant magnetoresistance, tunnelling magnetoresistance (TMR) (8-10), and nitrogen vacancy (NV) center in single-crystal diamond (11-13) to achieve nanometer resolution. Unfortunately, such technologies can solely measure the magnitude of the component of magnetic field that lies along its sensitive axis. One conventional method for measuring a vector field is to use three magnetic sensors (or NV ensembles) with their sensing directions along the three coordinate axes (, , and ), which degrades the spatial resolution (14-16).
Recently, single NV have been proposed as a magnetic vectorial detecting system to provide the nanoscale spatial resolution, but such a system requires precisely fabricating a single crystal diamond with an NV center as well as additional lasers and microwave excitation, which limit the practical applications and scalability of the approach (17, 18). On the other hand, a single spintronic device can implement the detection of three-dimensional (3D) magnetic field by the spin-orbit torque (SOT), which offers advantages such as excellent magnetic sensitivity, fast measurement, complementary metal-oxide-semiconductor (CMOS) process compatibility, and all-electric operating environment at room temperature (19, 20). However, the device size cannot be unrestricted scaled down to maintain the multidomain structure. Therefore, there is a need for a single spin-dependent device that can detect a vectoral magnetic field with extremely high spatial resolution.
Meanwhile, if a nanomagnet, composed of heavy metal (HM)/ferromagnet (FM) heterostructure such as Ta/CoFeB/MgO, has perpendicular magnetic anisotropy (PMA), SOT induced by an in-plane (IP) current flowing in the HM (Ta) layer can drive the magnetization of nanomagnet to probabilistically switch, and the switching probability is dependent on the applied IP magnetic fields (21, 22). These results indicate it may be feasible to detect a 2D and even 3D magnetic field, through monitoring the switching probability of the nanomagnet. To be specific, under a current pulse, the magnetization of the nanomagnet (such as CoFeB) can be excited from a stable state (‘up’ or ‘down’ state, named ) to a metastable state (in-plane state, named ) via SOT (22-24). When the magnetization relaxes to a stable state once the current pulse is turned off, the transition probability from to differs depending on the Zeeman splitting of , under an external or effective magnetic field along the out-of-plane () direction (25-27). The IP ( or ) components of the magnetic field together with the collinear current can generate and modulate the -direction effective field due to SOT, and the sign of this field depends on the current polarity (24). This phenomenon enables the IP and OOP components to be distinguished with alternating current pulse directions ( or ) (19). In this work, we demonstrate that such a compact and simple approach is indeed possible for nanoscale vector magnetic field detecting, with a probabilistic nanomagnet composed of HM/FM heterostructure, driven by SOT.
Sensing principle and experimental setup
A single domain nanomagnet with 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 is proportional to the out-of-plane magnetization, according to the anomalous Hall effect (AHE), and thus one can probe the magnetization state by measuring the . As a result of the spin Hall effect of Ta or Rashba effect in the Ta/CoFeB/MgO heterostructure, the magnetization of nanomagnet can be controlled by charge current flowing in the HM layer via SOT (28, 29). The in-plane torque, if strong enough, can bring nanomagnet’s magnetization to the metastable state () at an energy level of (energy barrier) (22-24). Additionally, after relax, 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 is proportional to with the Boltzmann constant and the temperature, as given by Boltzmann statistics (30, 31) or deduced by the Arrhenius-Néel law (25) (see Supplementary Section 1 for more details). Note that the degenerated energy level of stable state () is assumed to be ground state () without any effective magnetic field (Figure 1B).

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 -direction while the Hall voltage is detected in the -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 () are the same (). If the magnet is stimulated by a driving current, then the magnetization will be excited from the stable state to the metastable state () with an energy level of . Once the current is turned off (), the magnetization will return to the up or down state with equal probability. (C) Energy level structure of the nanomagnet under a field of . The energies of the up and down states are split by and , respectively. After the driving current is turned off, the magnetization will be more likely to relax to the state with lower energy, resulting in . (D and E) produced by SOT when the current and the colinear field are along -direction (D) and -direction (E). (F) Diagram of the approach for sensing an OOP field. Under a certain OOP magnetic field, a batch of current pulses are applied to the device along the -direction to count the state numbers and thus calculate the corresponding probability (). 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.
However, the energy landscape would be modified by an magnetic field () through the Zeeman energy splitting of the two stable ground states, which is expressed as , where is the permeability of free space, is the volume of an individual magnetic entity, is the saturation magnetization, and is the unit vector of the magnetization (32). Considering an external field along the -direction, , the Zeeman energy is , and thus, the energies of the and states shift by and , respectively, as shown in Figure 1C. Unless otherwise stated, a positive/negative sign represents the up/down direction, respectively, for both and . Therefore, upon removal of the driving current, the magnetization relaxes to with a probability of , while the probability of orienting in the down state is proportional to , under the . Since , it is inferred that
Note that, once the exponent , according to the piecewise linear approximation (33), can be deduced as:
which is a linear function of . This linear relationship between and enables the detection of by monitoring the probability of a relaxed state. Simply, according to equation (1), without , the magnet would reorient itself to either ‘up’ or ‘down’ state with the equal probability of 50%. This stochastic switching feature has been confirmed and used for nanomagnetic logic and true random number generators in previous work (22, 23).
Besides , a -component effective field generated by the IP current with a collinear magnetic field through SOT can also determine , making it feasible to detect an IP field with the proposed sensor. is written as a function of the current density along the - (or -) direction and the normalized magnetization caused by its corresponding collinear magnetic field (19, 24):
where is the reduced Planck constant, is the electron charge, is the thickness of the CoFeB layer and is the spin Hall angle of the Ta layer. The IP field () is utilized to orient the magnetization to achieve an IP component and then generate , as depicted in Figure 1D (Figure 1E). Thus, for IP field detection, based on equation (2), two conclusions can be drawn. First, for a given amplitude of (), depends on (), whereas the direction of is determined by the current polarity. Therefore, would vary with () under a given collinear IP current through the generated , and the variation tendencies are opposite for different current polarities. Second, (or ) cannot produce if there is solely the transverse current (or ). This indicates that 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 metastable state (high energy level) without changing the Zeeman energy, and thus would vary linearly with under the applied IP current, where the variation tendency is independent of current polarity.
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 feasibility 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 Supplementary Section 2. The CoFeB with PMA can be driven to state if an IP current flowing 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 12 MA/cm and 0.2s, respectively. After relaxation, a reading current of 0.5 MA/cm is used to measure the and thus detect the magnetization state. The state probability is collected by repeating this measurement. For example, if we count the number of up states as in pulse event cycles, then is equal to . Therefore, our method can detect not only DC fields but also AC fields. The maximum frequency of a detectable AC field is expected to be inversely proportional to the total measurement time and could reach over 1 kHz (Supplementary Section 3).
One-dimensional magnetic field sensing
For experimental implementation of vector magnetic field sensing, we start from the detection of a one-dimensional magnetic field. Here, we apply a driving current pulse 500 times to count the up-state probability () at a given magnetic field. When the current pulse is applied along the -direction (), whether positive or negative, as discussed above, linearly increases with increasing from to 8 Oe (or from to 19 Oe), and the two cases have almost the same slope for the - curves (Figure 2A). In contrast, shows the opposite variation tendencies with for different polarities of (Figure 2B). Under MA/cm, linearly decreases with within the range of to Oe, while under MA/cm, linearly increases with . Moreover, remains constant with varying from to 20 Oe under , regardless of the polarity, as no is induced by , which cannot tilt the magnetization towards the -direction (Figure 2C). It is worth noting that settled up/down probabilities is unequal at Oe, and thereby existing an asymmetric linear range for vs. , which may be associated with the presence of a bias field in the above unoptimized experimental devices (Supplementary Section 4). Such nonequality and asymmetry could be improved or corrected in real applications by optimizing film deposition and device fabrication, or introducing a magnetic field to balance the bias field, or calibrating the sensor system. Overall, is found to be sensitive to and , but insensitive to when is applied.

Figure 2. One-dimensional magnetic field sensing. (A to C) Probability of the settled state being the up state, , as a function of the magnetic field along the -direction (A), -direction (B), and -direction (C) when a driving current pulse of 12 MA/cm/200 ms is applied along the -direction. (D to F) as a function of magnetic field along the -direction (D), -direction (E), and -direction (F) when the current is applied along the -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.
Similarly, is sensitive to and , but insensitive to when is applied (Figure 2D-F). These experimental results not only show the operation principle of one-dimensional 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 distinction of the contributions of the IP and OOP fields. In other words, we aim to determine whether three components (, and ) of the magnetic field can be detected by characterizing the relaxed state probability variation, for reconstructing vector magnetic field with one single nanomagnet.
Three-dimensional magnetic field sensing
If a 3D magnetic field is applied to the device, then two values under positive and negative can be measured: and . According to the different current-direction-dependent tendencies of the – curves shown in Figure 2, the two collected values can be processed with an addition operation to eliminate the contribution. Therefore, the net probability contributed only by the component is shown in Figure 3A and is expressed as:
Figure 3. Net probability contributed by , and . (A) Net probability as a function of , where the MA/cm and MA/cm values under different ranging from to Oe are processed with an addition operation to obtain . (B) Net probability as a function of from to Oe, as obtained by a subtraction operation to eliminate the contribution of . (C) The net probability component as a function of in the range of to Oe, as obtained by a subtraction operation using the two values of MA/cm and MA/cm. The solid lines are best fit to the corresponding experimental data points.
By performing a subtraction operation to eliminate the contribution, we can obtain the net probability contributed only by (Figure 3B):
Here, we add a compensation value of 0.5 to the subtraction result to ensure that 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 can be evaluated as (Figure 3C):
Note that can also be calculated as:
and the values calculated from equations (3) and (6) are expected to be the same.
Therefore, the relationships between the net probability (, , and ) and the corresponding magnetic field components (, , and ) can be identified from 1D measurements, which is similar as our previous work (19). Once the net probability components are obtained using equations from (2) to (5), the magnitude of the corresponding magnetic field components can be read out according to Figure 3A-C, and thus implementing 3D magnetic field sensing. The linear range of the magnetic field sensor is approximately to Oe for , to Oe for , and to Oe for , as shown in Figure 3. General speaking, the maximum detectable field for is related to the saturated field of the nanomagnet with the assistance by 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.
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 . Here, the sensitivities are calculated to be 1.02%/Oe, 1.09%/Oe and 3.43%/Oe for , , and , respectively. Other specification of the sensor, to measure the maximum deviation of the sensor output from the fitted straight line, is the linearity error (). Normally, it is expressed as a percentage of the full-scale value: , where is the full-scale output within the linear range (19). According to the results shown in Figure 3, the linearity errors of our sensor within the linear range is 4.9%, 4.9% and 4.7% for , and , respectively. Here, , along with the sensitivity, is also used to evaluate the minimum detectable field () for , , and , given by 3.9, 3.4, and 0.7 Oe, respectively. Furthermore, the linearity error can be further improved by increasing the number of pulse events. Figure 4 show as a function of under different numbers of pulse events (, 500 and 1000) with MA/cm. and the linearity error decrease with increasing number of pulse events and reach 2.37% and 3.1%, respectively, when (Figure 4C).

Figure 4. Effect of the number of pulse events on the linearity of - curves under MA/cm. (A to C) - curves with pulse event numbers of (A), 500 (B), and 1000 (C). The cyan lines are the best fit to the experimental data points. (D) Linearity (cyan circles) as a function of pulse event number along with the curve (soft red line).
Generally, for all trials, the distribution of the actual after pulsing events, at a given field with expected up-state probability , would obey binomial distribution (BD) with the standard deviation (34). It indicates that is extremely likely (~95.4%) to fall into , and hence the utmost of sensor linearity error can be roughly estimated as , which reaches maximum when for a fixed , but decreases with the increase of . Figure 4D plots as a function of and the fitting with the curve (soft red line). It is seen that is closed to , though the former is less than the latter when is greater than 800.
Consequently, the minimum detectable magnetic field would be .
Accordingly, 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 , , and for the -, -, and -directions, respectively. Especially, the for the -direction is on the same order as the number of pulse events used in NV measurements (13). Furthermore, inspired by the NV based sensors (12, 13), we deduce the field resolution as the product of and the square root of measurement time, i.e. , where is the time of each current cycle. The long cycle period ( s) used in our conceptual experiments leads to a large (4.8, 4.2, and 0.8 mT/ for the -, -, and -directions, respectively, at ). could reach 30 ns for real applications (35, 36), and consequently, the resolution would theoretically be improved to 1.5, 1.3, and 0.3 μT/.
Additionally, we expect that the spatial resolution can be developed by further scaling down the nanomagnet size. Although a smaller magnetic body volume will decrease the energy barrier, it has been demonstrated to tune the switching probability of low-barrier nanomagnets, such as , where is magnetic anisotropy constant, by both OOP magnetic fields and IP fields (27, 37). 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 Supplementary Section 2 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 application, 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 (38). In 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 common driving path to enhance the efficiency in imaging the spatial magnetic field (39). 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 (Supplementary Section 5).
The field resolution and spatial resolution of our sensor are comparable to the quantum vector magnetometers such as single NV based sensors (17, 18), if the promoted read/write speed and size of our device are utilized (see Supplementary Section 6 for more details). More importantly, our technique has advantages such as one single device structures with all-electric operations. These properties will allow us to develop a simple and compact sensor system for detecting vector magnetic fields at nanoscale dimension.
Discussion and outlook
It is expected that the driving and reading of our proposed sensor device could be carried out in the same way as already used in SOT-magnetoresistive random-access memory technology (40). Moreover, nanomagnet chips can be integrated with not only electronics but also microfluidics for biomedical engineering applications (41). Finally, with the same nanomagnet, the demonstrated possibility of sensing nanoscale magnetic fields or electrical current in combination with the observed memory and stochastic or probabilistic computing capabilities (21-23) opens a bright new world of nanospintronics for integrated sensing, memory and computing functions.
Acknowledgments
Funding: This work was supported by the National Natural Science Foundation of China (NSFC Grant Nos. 62074063, 61821003, 61904060, 61904051, 51671098, and 61674062). This work was supported by National Key Research and Development Program of China (No. 2020AAA0109005), the Interdisciplinary program of Wuhan National High Magnetic Field Center (No. WHMFC202119), Huazhong University of Science and Technology, and Fund from Shenzhen Virtual University Park (No. 2021Szvup091).
Author contributions:
Conceptualization: L.Y.
Methodology: L.Y., S.Z., S.L., X.Y., X.Z.
Investigation: L.Y., S.L., S.Z., Y.X., R.L.
Visualization: S.Z., S.L., Z.C., M.S.
Funding acquisition: L.Y.
Project administration: L.Y.
Supervision: L.Y.
Writing – original draft: L.Y., S.Z., S.L.
Writing – review & editing: L.Y., S.Z., S.L., Z.G.
Competing interests: Authors declare that they have no competing interests.
Data and materials availability: All data are available in the main text or the supplementary materials and are available on request.
Supplementary Materials
Materials and Methods
Supplementary Text
Materials and Methods
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. We used EBL and AIM to define the current channel and the detection channel. The widths of the two channels are designed to be 1 m. A 10 nm thick hard mask (Ti) with sizes of were 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, we used a d.c. current source (Keithley model 6221) to apply currents and a nanovoltmeter (Keithley model 2182A) to measure the Hall voltage. A high current of mA ( MA cm) with a duration of s was used excite the nanomagnet mentioned in the main text. A constant low current of A ( MA cm) 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).
Supplementary Text 1: Deduction of the probability as a function of fields through Arrhenius-Néel law
We consider a binary nanodevice comprising of heavy metal/ferromagnet (HM/FM) bilayer with perpendicular magnetic anisotropy (PMA). As shown in Figure S1A, the up and down states () of the binary nanomagnet are separated by an energy barrier such that the stored information can be retained for a time , following Arrhenius’ law, where is the attempt time ( ns) [42], the Boltzmann constant, and the temperature. In the following text, we will deduce the probability of being in a stable state as a function of out-of-plane field by Arrhenius law and Neel-Brown model [42, 43]:

Figure S1. Energy profile of the magnetization under (A) zero field or (B) an out-of-plane .
① deduction using Arrhenius law
The energy profile would be modified by an out-of-plane (OOP) magnetic field due to the Zeeman energy , where is the permeability of free space, the saturation magnetization and the volume of individual magnetic entity [44, 45]. Then, the energies of the and state shift by and , respectively. In other words, the energy barrier from down state to up state becomes , while the energy barrier from up state to down state becomes , as illustrated in Figure S1B. As a result, the dwell times of being in down and up states become different: and . The probability of being in up state can be described as [46]
which is the same form as the equation deduced in the main text.
② deduction by Neel-Brown model
According to Neel-Brown model [42, 43], the dwell times are given by , and , where , and is the effective magnetic anisotropy field. Then, is expressed as , the same form as the equation (S1).
Magnetic and transport properties of the sensor device
Magnetic transport characterizations of the nanodevice are shown here. Figure S2A shows the - loop of the multilayer film along out-of-plane direction under room temperature by Physical Property Measurement System (PPMS). The coercivity field and the saturation magnetization of the film are around 10 Oe and 750 emu/cc, respectively. The film was then processed to a nano dot with a size of 200 nm 200 nm sitting on a Hall bar. The anomalous Hall effect (AHE) loop under a small reading current of 0.5 MA/cm (Figure S2B) shows a sharp switching of the resistance, indicating a good PMA of the device with a coercivity field of 60 Oe and an anisotropy field, , of 3000 Oe (Figure S2C). Accordingly, the anisotropy energy density is estimated as J/m. If the magnet body volume decreases to 9 nm 9 nm 1 nm, the thermal stability factor , with which the nanomagnet can keep working to sense magnetic fields. Figure S2D shows the - switching curve with external Oe, to verify the switching is mainly induced by SOT effect.

Figure S2. Magnetic and transport properties of the sensor device. (A) - loop of the multilayer film along OOP direction. (B) Deterministic switching of the magnetization induced by OOP fields . The reading current is 0.5 MA/cm. (C) AHE resistance as a function of IP fields . (D) Deterministic switching of the magnetization induced by currents with the assistance of a small IP field of 200 Oe due to SOT.
Measurement method of detecting an AC vector field
Here, we discuss the possibility for detecting of AC vector fields by the sensor. Considering a cosine magnetic field applied on the device, we can measure the AC field using the piecewise approximation method. As illustrated in Figure S3, an AC field can be approximated as several different DC fields with a duration of , which should be no shorter than the measurement time of the detection of a DC vector field, i.e. , where is the numbers of current pulse events and the time of each current pulse cycle. On the other hand, when a cosine wave is staircase approximated, the number of segments must be no less than 12 to guarantee the fidelity of the detected AC field [47]. Note that the fidelity would be higher as increasing the segment. Therefore, a frequency below can be detected with an acceptable accuracy, and the fidelity is higher at the lower frequency. Assuming , ns, then kHz, which means that the proposed sensor can detect a vector magnetic with a frequency ranging from DC to 1.39 kHz.

Figure S3. Detecting AC magnetic fields by staircase approximation. (A) A cosine field (black line) is cut into 12 segments (orange line) during each cycle. (B) A cosine field (black line) is cut into 24 segments (purple line) during each cycle. Each segment should be no shorter than the measurement time of the detection of a DC vector field, i.e. .
Calculated – curves
Figure S4 shows the net probability – curve when the current is applied along -direction, as obtained by an addition operation on the two – curves at MA/cm and MA/cm (Figure 2D of the main text). increases linearly with increasing with a sensitivity of 3.5%/Oe and a linearity error of 4.7%, which is consistent with the – curve when current is along direction (Figure 3A of the main text).

Figure S4. Net probability as a function of when the current is along the -direction.
For the two curves shown in Figure 2A of the main text, besides an addition operation, a subtraction operation can be also performed to eliminate the contribution, and then – is obtained, as shown in Figure S5A. The values does remain a constant as expected, although the constant deviates a little from the ideal value of 0.5. In the ideal situation, the probability would be 0.5 at zero field, as reported by our previous work [48]. However, the field corresponding to shifts from zero field (Figure 2 of the main text). These deviations may be caused by a bias field () within the device. The bias field also results in the asymmetries of linear ranges in Figure 3 of the main text. Taking Figure 3A as an example, an external field along direction of about 0.4 Oe can balance the and obtain a probability of 0.5, indicating Oe. Similarly, Oe and Oe are evaluated according to Figure 3B and 3C of the main text, respectively. In addition, under the existences of , the sign of the produced is opposite if the current reverses according to Equation (2) of the main text, and thus the two curves at MA/cm and MA/cm does not coincide with each other, both for Figure 2A and 2C of the main text. It means that, if the bias field is eliminated by optimizing film deposition and device fabrication, the two curves under the positive and negative currents both in Figure 2A and 2C should be entirely coincidence and the at zero field, while the two curves in Figure 2B should intersect at the point of (, ).

Figure S5. Net probability as a function of the magnetic fields along the insensitive directions.
Figs. S5A-D depict the curves of –, –, –, and –, where and are calculated with the measured in Figs. 2A-C of the main text. Therefore, by performing a subtraction operation, linearly varied with (Fig.3B of the main text) but is unchanged (~0.5) with varying (Fig. S5A) or (Fig. S5B); by performing an addition operation, changes linearly with (Fig.3A of the main text) but remains a constant close to 0.5 with changing (Fig. S5C) or (Fig. S5D). In addition, the curves of –, –, –, and – are depicted in Figs. S5E-H, where and are calculated with the measured in Figs. 2D-F of the main text. Similarly, these four curves are almost a constant about 0.5, conforming that the net probability is insensitive to the orthogonal fields.
Circuit scheme of the CMOS/sensor array
For practical applications, the proposed sensor would be developed to MTJ structure to achieve more readable resistances due to TMR effect. This single sensor can be attached to a tip of a scanning probe. However, when mapping a magnetic field distribution in space or the surface of magnetic samples, the method of scanning probe is undoubtedly inefficient. We design a MTJ sensor array located at the center of a cross bar of heavy metal layer to realize fast magnetic field mapping, as illustrated in Fig. S6A. All the MTJs share the driving path, but the resulted states, after applying one single pulse of driving current, of each MTJ are read and counted individually. To be specific, one single driving current pulse can drive all MTJs to the metastable state, and when the driving current is cut off, MTJs are read column by column activated by the WL. The total measurement time can be greatly reduced by this approach. Therefore, through sharing the driving current channel, a high-speed and high-density sensor array can be achieved.
The driving control circuits and read circuits, along with the pulse sequence of the controlled signals, are illustrated in Figure S6B and S6C, respectively. Here are the detailed working processes of the sensor array (it is assumed that 512 cycles of driving and reading current are applied to a single device for all the four current directions: , , and direction.):

Figure S6. Schematic of sensor array along with the driving and reading circuits. (A) Sensor array along with CMOS transistors. The magnet (red cube) adjacent to the heavy metal layer act as sensing units to detect the magnetic field and also constitute the free layer in the MTJ. The right panel shows the driving and reading circuits configuration for a single cell in the array. Each sensor is selected by a transistor with a bit line BL and a word line WL. The state of sensing magnet is detected by the resistance of the MTJ due to TMR effect. After applying N (512, for example) cycles of pulses to the single device, the number of high-resistance states , which is used to be calculated to get the 3D magnetic field vector, is counted by a counter along with a comparator. (B) Schematic of the sensor array along with the detailed driving control circuits and read circuits. (C) Pulse sequence of the controlled signals including clock signal for driving CLKD and reading CLKR, the output signals of the 11-bit counter A,B, and the reset signal of counter CLR. It is assumed that 512 cycles of driving and reading current are applied to a single device for all the four directions: +X, −X, +Y and −Y direction. (D) A compact sensor configuration for magnetic field measurements with high spatial resolution, where two layers of interleaved sensors measure the magnetic field simultaneously without missing any area in the plane.
The control signals consist of a clock signal for driving (CLKD) and a reading CLKR, where the falling of CLKD is followed by the rising of CLKR during each cycle. In order to change the current direction after every 512 pulses of CLKD are applied, we add a 11-bit counter, of which the input is the CLKD and the output signals of Q10-Q8 are also acting as control signals parameterized as A-C, respectively, along with a driving control circuits, as illustrated in the left panel of Figure S6B. In addition, the reset signal of counter CLR is determined by the falling of signal C.
According to the driving control circuits, the driving current direction is determined by the levels of both A and B, as summarized in Table S1.
| Signal A | Signal B | Current direction |
| 0 | 0 | +X → −X |
| 0 | 1 | −X → +X |
| 1 | 0 | −Y → +Y |
| 1 | 1 | +Y → −Y |
Table S1. driving current direction determined by signal A and B.
After each driving pulse is applied, a reading current pulse is enabled by the signal CLKR. The MTJ state is detected by a comparator with a reference voltage, and then the number of high-resistance states is counted by a counter. After applying cycles of pulses to the single device, will be transformed to (, , or ) if the driving current flows along (, , or ) direction, which is used to be calculated to get the 3D magnetic field vector.
However, this array has many spaces between each two adjacent magnets which cause a missing signal of the detected spatial magnetic fields. We further develop the array by the 3D stacking technology, as illustrated in Figure S6D. The HM layer is sandwiched between the two groups of stacks, ensuring that the two layers of interleaved sensors implement the simultaneous magnetic imaging of a spatial magnetic field over a wide-field of view such as mm order.
Performance comparison between our sensor and other types of sensors
In Table S2, we compare key data for our sensor with state-of-the-art magnetic field sensing technologies including nanoscale graphene-based Hall sensor, scanning superconducting quantum interference device (SQUID) technology, and nitrogen/silicon vacancy (NV/SiV) based sensors. As shown in Table S2, although the 1D magnetic field sensors such as Hall sensor (row 2), scanning SQUID (row 3) and single NV based 1D sensor (row 4) show slightly better spatial resolutions (column 3), the size of our sensor (200 nm, here) is capable to be further scaled down to sub-10 nm. On the other hand, these magnetic field sensors (rows 2-4) can solely measure the magnitude of the component of magnetic field that lies along its sensitive axis.
| Technology | Measured field | Sensor head size (nm) | Field resolution | Measurement method |
| Graphene-based Hall sensor [49] | 1D, DC | 85 nm | 59 μT/ | Hall effect |
| Scanning SQUID [50] | 1D, DC | 150 nm | 76 nT/ | Josephson effect and flux quantization |
| Sensor | Dimension, DC/AC | Spatial resolution | Sensitivity | Method |
| Single NV [51] | 1D, DC/AC | 10–20 nm | (ac); (dc); | Optically detected magnetic-resonance (ODMR) |
| Ensemble of NVs [52] | 3D, DC | 2 mm; 2 mm; | (; ; ;) | ODMR of an ensemble of NV centers along four crystallographic orientations |
| Ensemble of NVs [53] | 3D, AC | NA; 4 mm; 4 mm; 0.5 mm; | (; ; ;) | ODMR of an ensemble of NV centers along four crystallographic orientations |
| Single NV [54] | 3D, DC | 10–20 nm*; 10–20 nm*; 10–20 nm*; | (); (); | Ramsey interferometry and quantum lock-in detection with an ancillary nuclear spin under the assistance of magnetic fields |
| Single NV [55] | 3D, AC | 10–20 nm*; 10–20 nm*; 10–20 nm*; | ; ; ; | Rotating-frame Rabi magnetometry |
| Single SiV [56] | 3D, DC | NA; | ; ; | ODMR with reference fields |
| This work (single nanomagnet) | 3D, DC/AC | ; ; 1; | ; ; ; () ; ; ; (assuming ) | Repeating driving and reading current pulses |
Table S2. Performance comparison between our sensor and other types of magnetic field sensors.
The distribution of NV orientations (typically in NV ensembles) along multiple crystallographic axes in diamond has been explored to measure vector fields (rows 5 and 6), and can reach excellent field resolutions, but nanoscale resolution is difficult to achieve in such ensemble-based sensors. When compared with the single NV based 3D magnetic sensor technology (rows 7 and 8), the field resolution and spatial resolution of our sensor are comparable to them, if the optimized read/driving speed of ns and device size of 9 nm are utilized. Finally, the field resolution of the single SiV 3D sensor (row 9) is not as good as our technology in the optimized case. More importantly, when compared to the NV/SiV based techniques, the measurement method of our sensor is much simpler thanks to no requirement of magnetic field, microwave, or optical equipment.
Note: NA: Not applicable
*: The exact sizes are not available from the articles, but are referred to other works [51, 57].
**: The sizes of our nanomagnet as expected could be promoted to (Supplementary Text 2).
References and Notes
References
- [42]W. F. Brown, Physical Review 130, 1677-1686 (1963).
- [43]W. Rippard, R. Heindl, M. Pufall, S. Russek, A. Kos, Phys. Rev. B 84, 064439 (2011).
- [44]D. Bhowmik, L. You, S. Salahuddin, Nat. Nanotechnol. 9, 59-63 (2014).
- [45]S. Chikazumi, S. Chikazumi, C. D. Graham, Physics of ferromagnetism. (Oxford University Press, 1997).DOI
- [46]J. Cai et al., Phys. Rev. Appl. 11, 034015 (2019).
- [47]E. Popov, M. Nevière, B. Gralak, G. Tayeb, J. Opt. Soc. Am. A 19, 33-42 (2002).
- [48]H. Chen et al., in 2018 IEEE International Electron Devices Meeting. (IEEE, 2018), pp. 36.35.31-36.35.34.
- [49]D. Collomb, P. Li, S. J. Bending, Scientific Reports 9, 14424 (2019).
- [50]Y. P. Pan et al., Superconductor Science and Technology 34, 115011 (2021).
- [51]J. M. Taylor et al., Nat. Phys. 4, 810-816 (2008).
- [52]H. Clevenson et al., Appl. Phys. Lett. 112, 252406 (2018).
- [53]J. M. Schloss, J. F. Barry, M. J. Turner, R. L. Walsworth, Phys. Rev. Appl. 10, 034044 (2018).
- [54]Y.-X. Liu, A. Ajoy, P. Cappellaro, Phys. Rev. Lett. 122, 100501 (2019).
- [55]G. Wang, Y.-X. Liu, Y. Zhu, P. Cappellaro, Nano Lett. 21, 5143-5150 (2021).
- [56]M. Niethammer et al., Phys. Rev. Appl. 6, 034001 (2016).
- [57]J. R. Maze et al., Nature 455, 644-647 (2008).
