Abstract
Conventional computers operate deterministically using strings of zeros and ones called bits to represent information in binary code. Despite the evolution of conventional computers into sophisticated machines, there are many classes of problems that they cannot efficiently address, including inference, invertible logic, sampling and optimization, leading to considerable interest in alternative computing schemes. Quantum computing, which uses qubits to represent a superposition of 0 and 1, is expected to perform these tasks efficiently1,2,3. However, decoherence and the current requirement for cryogenic operation4, as well as the limited many-body interactions that can be implemented, pose considerable challenges. Probabilistic computing1,5,6,7 is another unconventional computation scheme that shares similar concepts with quantum computing but is not limited by the above challenges. The key role is played by a probabilistic bit (a p-bit)—a robust, classical entity fluctuating in time between 0 and 1, which interacts with other p-bits in the same system using principles inspired by neural networks8. Here we present a proof-of-concept experiment for probabilistic computing using spintronics technology, and demonstrate integer factorization, an illustrative example of the optimization class of problems addressed by adiabatic9 and gated2 quantum computing. Nanoscale magnetic tunnel junctions showing stochastic behaviour are developed by modifying market-ready magnetoresistive random-access memory technology10,11 and are used to implement three-terminal p-bits that operate at room temperature. The p-bits are electrically connected to form a functional asynchronous network, to which a modified adiabatic quantum computing algorithm that implements three- and four-body interactions is applied. Factorization of integers up to 945 is demonstrated with this rudimentary asynchronous probabilistic computer using eight correlated p-bits, and the results show good agreement with theoretical predictions, thus providing a potentially scalable hardware approach to the difficult problems of optimization and sampling.
This is a preview of subscription content, access via your institution
Relevant articles
Open Access articles citing this article.
-
High-throughput design of perpendicular magnetic anisotropy at quaternary Heusler and MgO interfaces
npj Computational Materials Open Access 13 July 2023
-
Accelerated quantum Monte Carlo with probabilistic computers
Communications Physics Open Access 27 April 2023
-
Unconventional computing based on magnetic tunnel junction
Applied Physics A Open Access 03 March 2023
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$29.99 / 30 days
cancel any time
Subscribe to this journal
Receive 51 print issues and online access
$199.00 per year
only $3.90 per issue
Rent or buy this article
Prices vary by article type
from$1.95
to$39.95
Prices may be subject to local taxes which are calculated during checkout



Data availability
The datasets generated and analysed during this study are available from the corresponding authors on reasonable request.
References
Feynman, R. P. Simulating physics with computers. Int. J. Theor. Phys. 21, 467–488 (1982).
Shor, P. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26, 1484–1509 (1997).
Vandersypen, L. M. K. et al. Experimental realization of Shor’s quantum factoring algorithm using nuclear magnetic resonance. Nature 414, 883–887 (2001).
Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018).
Kirkpatrick, S., Gelatt, C. D. & Vecchi, M. P. Optimization by simulated annealing. Science 220, 671–680 (1983).
Geman, S. & Geman, D. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Trans. Pattern Anal. Mach. Intell. 6, 721–741 (1984).
Sutton. B., Camsari, K. Y., Behtash, B.-A. & Datta, S. Intrinsic optimization using stochastic nanomagnets. Sci. Rep. 7, 44370 (2017).
Camsari, K. Y., Faria, R., Sutton, B. M. & Datta, S. Stochastic p-bits for invertible logic. Phys. Rev. X 7, 031014 (2017).
Albash, T. & Lidar, D. A. Adiabatic quantum computation. Rev. Mod. Phys. 90, 015002 (2018).
Ikeda, S. et al. A perpendicular anisotropy CoFeB–MgO magnetic tunnel junction. Nat. Mater. 9, 721–724 (2010).
Kent, A. D. & Worledge, D. C. A new spin on magnetic memories. Nat. Nanotechnol. 10, 187–191 (2015).
Peng, X. et al. Quantum adiabatic algorithm for factorization and its experimental implementation. Phys. Rev. Lett. 101, 220405 (2008).
Biamonte, J. Nonperturbative k-body to two-body commuting conversion Hamiltonians and embedding problem instances into Ising spins. Phys. Rev. A 77, 052331 (2008).
Jiang, S., Britt, K. A., Humble, T. S. & Kais, S. Quantum annealing for prime factorization. Sci. Rep. 8, 17667 (2018).
Ackley, D. H., Hinton, G. E. & Seinowski, T. J. A learning algorithm for Boltzmann machines. Cogn. Sci. 9, 147–169 (1985).
Camsari, K. Y., Salahuddin, S. & Datta, S. Implementing p-bits with embedded MTJ. IEEE Electron Device Lett. 38, 1767–1770 (2017).
Fukushima, A. et al. Spin dice: a scalable truly random number generator based on spintronics. Appl. Phys. Express 7, 083001 (2014).
Mizrahi, A. et al. Neural-like computing with populations of superparamagnetic basis functions. Nat. Commun. 9, 1533 (2018).
Julliere, M. Tunneling between ferromagnetic films. Phys. Lett. A 54, 225–226 (1975).
Brown, W. F. Thermal fluctuations of a single-domain particle. Phys. Rev. 130, 1677–1686 (1963).
Chaves-O’Flynn, G. D., Wolf, G., Sun, J. Z. & Kent, A. D. Thermal stability of magnetic states in circular thin-film nanomagnets with large perpendicular magnetic anisotropy. Phys. Rev. Appl. 4, 024010 (2015).
Slonczewski, J. C. Current-driven excitation of magnetic multilayers. J. Magn. Magn. Mater. 159, L1–L7 (1996).
Berger, L. Emission of spin waves by a magnetic multilayer traversed by a current. Phys. Rev. B 54, 9353–9358 (1996).
Brataas, A., Kent, A. D. & Ohno, H. Current-induced torques in magnetic materials. Nat. Mater. 11, 372–381 (2012).
Pervaiz, A. Z., Ghantasala, L. A., Camsari, K. Y. & Datta, S. Hardware emulation of stochastic p-bits for invertible logic. Sci. Rep. 7, 10994 (2017).
Camsari, K. Y., Chowdhury, S. & Datta, S. Scaled quantum circuits emulated with room temperature p-bits. Preprint at https://arxiv.org/abs/1810.07144 2018).
Kleinjung, T. et al. in Advances in Cryptology – CRYPTO 2010 (ed. Rabin, T.) 333–350 (Springer, 2010).
Lee, Y. K. et al. Embedded STT-MRAM in 28-nm FDSOI logic process for industrial MCU/IoT application. In 2018 IEEE Symposium on VLSI Technology 181–182 (IEEE, 2018).
Roberts, G. O. & Sahu, S. K. Updating schemes, correlation structure, blocking and parametrization for the Gibbs sampler. J. R. Soc. Ser. B 59, 291–317 (1997).
Endo, M. et al. Electric field effects on thickness-dependent magnetic anisotropy of sputtered MgO/CoFeB/Ta structures. Appl. Phys. Lett. 96, 212503 (2010).
Enobio, E. C. I., Bersweiler, M., Sato, H., Fukami, S. & Ohno, H. Evaluation of energy barrier of CoFeB/MgO magnetic tunnel junctions with perpendicular easy axis using retention time measurement. Jpn. J. Appl. Phys. 57, 04FN08 (2018).
Lucas, A. Ising formulations of many NP problems. Front. Phys. 2, 5 (2014).
Xu, N. et al. Quantum factorization of 143 on a dipolar-coupling nuclear magnetic resonance system. Phys. Rev. Lett. 108, 130501 (2012).
Burges, C. J. C. Factoring As Optimization. Report No. MSR-TR-2002-83 (Microsoft Research Lab, 2002).
Henelius, P. & Girvin, S. A statistical mechanics approach to the factorization problem. Preprint at https://arxiv.org/abs/1102.1296 (2011).
Dridi, R. & Alghassi, H. Prime factorization using quantum annealing and computational algebraic geometry. Sci. Rep. 7, 43048 (2017); erratum 7, 44963 (2017).
Pervaiz, A. Z., Sutton, B. M., Ghantasala, L. A. & Camsari, K. Y. Weighted p-bits for FPGA implementation of probabilistic circuits. IEEE Trans. Neural Netw. Learn. Syst. 30, 1920–1926 (2018).
Zand, R., Camsari, K. Y., Datta, S. & Demara, R. F. Composable probabilistic inference networks using MRAM-based stochastic neurons. ACM J. Emerg. Technol. 15, 17 (2019).
Mathew, S. K. et al. μRNG: a 300–950 mV, 323 Gbps/W all-digital full-entropy true random number generator in 14 nm FinFET CMOS. IEEE J. Solid-State Circuits 51, 1695–1704 (2016).
Zhao, W. & Yu, C. New generation of predictive technology model for sub-45 nm early design exploration. IEEE Trans. Electron Dev. 53, 2816–2823 (2006).
Datta, D. et al. Voltage asymmetry of spin-transfer torques. IEEE Trans. Nanotechnol. 11, 261–272 (2012).
Park, C. et al. Low RA magnetic junction arrays in conjunction with low switching current and high breakdown voltage for STT-MRAM at 10 nm and beyond. In 2018 IEEE Symposium on VLSI Technology 185–186 (IEEE, 2018).
Acknowledgements
We thank H. Sato, M. Bersweiler, T. Hirata, H. Iwanuma, K. Goto, C. Igarashi, I. Morita, R. Ono and M. Musya for technical support. We thank O. Hassan and S. Chowdhury for their help with the Methods sections comparing CMOS alternatives and quantum computing, respectively. A portion of this work was supported by ImPACT Program of CSTI, JSPS KAKENHI grant numbers 17H06093 and 19J12206, Cooperative Research Projects of RIEC, and ASCENT, one of six centres in JUMP, an SRC program sponsored by DARPA. W.A.B. acknowledges JST-OPERA.
Author information
Authors and Affiliations
Contributions
S.F., K.Y.C., H.O. and S.D. planned the study. W.A.B. and S.F. prepared and characterized the MTJ devices. A.Z.P., K.Y.C. and S.D. developed the algorithm and experimental setup. A.Z.P. and K.Y.C. conducted factorization experiment and collected results. All authors contributed to the writing of the manuscript. All authors discussed the results.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Peer review information Nature thanks Kyung-Jin Lee, Dmitri Nikonov and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Extended data figures and tables
Extended Data Fig. 1 p-bit construction.
a, A diagram of the ideal response of a stochastic MTJ as used in this work and the parameters used to characterize the MTJ. b, The measured drain current IDS as a function of VIN of a 2N7000 NMOS transistor used in our p-bit demonstration.
Extended Data Fig. 2 Block diagram of an asynchronous p-circuit.
A microcontroller reads the outputs voltages VOUT of all p-bits and computes the synaptic weights, which are then converted to the analogue input voltages VIN for each p-bit, using a DAC that communicates with the microcontroller.
Extended Data Fig. 3 Experimentally observed time snapshots.
a–c, Experimentally observed time snapshots of the four p-bits used to factorize 35 (a, b). These snapshots are combined to create x and y (c), which fluctuate between 7 × 5 and 5 × 7.
Extended Data Fig. 4 Calibrating the experimental system.
Calibrating a reference state using synaptic weights. a, The experimentally observed time-averaged output of six p-bits versus applied inputs (which are misaligned). b, The output is corrected using synaptic biases leading to the reference state shown. Each data point in a and b are taken as an average over a time window of 15 s with 2,000 or more sampling points.
Extended Data Fig. 5 Comparison between the MTJ- and CMOS-based energy per random bit and cell area.
a, An MTJ-based p-bit simulated with the stochastic LLG model (s-LLG, dotted box). b, A 32-bit LFSR. The look-up table (LUT) and the digital comparator of the CMOS p-bit are not included in the comparison. INV, inverter; DFF, D-type flip flop.
Extended Data Fig. 6 Computing with p-bits versus AQC.
a, A representation of how an array of six Ising spins in a qubit array can be replicated with an array of p-bits. b, A comparison of both approaches for factoring 161 = 23 × 7. For a system of six Ising spins, there are 64 states. At higher magnetic fields (ΓX = 0.5) both systems are ‘disordered’ and the correct peak is not pronounced. At lower magnetic field (ΓX = 0.1) the correct peaks emerge with a high probability. The states (yi, xi) have been converted to binary variables si from the bipolar variables mi by defining si = (mi + 1)/2 and the states [y2 y1 x4 x3 x2 x1] are expressed in decimal on the x axis.
Extended Data Fig. 7 Simulation versus experiment.
a–d, We simulate the ideal experiment when all p-bits are perfectly aligned (a), using an idealized p-bit model which produces the results shown in c. Each data point is taken as an average over a time window of 15 s with 2,000 or more sampling points. The presence of device variations leads to a non-ideal system of misaligned p-bits (b), which is corrected using synaptic biases, allowing the experiment to approach the correct results (d). The time-averaged statistics in b are collected over a time window of 15 s with 2,000 or more sampling points.
Extended Data Fig. 8 Simulation of variations of τN.
The τ of six p-bits is varied from a minimum value of τΝ to a maximum value of 4τΝ. Variations between p-bits do not affect system operation providing that τinter = τN.
Extended Data Fig. 9 Simulations of variations of MTJ parameters.
a–c, The variation of MTJ parameters results in the misalignment of the average responses of the p-bits (a), which results in a biased reference state (b). When such a system is used for factorizing 161 the observed results are incorrect (c). d–f, The shifts in the average responses are corrected using synaptic biases (d), which correct the reference state (e) and factorization results (f).
Extended Data Fig. 10 Invertible AND gate operation.
a, b, Time snapshot for the direct mode of operation when the inputs x2 and x1 have both been pinned to 1 (a); the statistics collected for 60 s (b). c, d, Time snapshot for the p-bits operating the AND gate in inverted mode when the output y1 is pinned to 0 (c); the statistics collected for 60 s (d). e, f, Time snapshot for the p-bits operating the AND gate in floating mode (e); the statistics collected for 60 s (f). All statistics shown are collected over a time window of 60 s with 2,000 or more sampling points.
Rights and permissions
About this article
Cite this article
Borders, W.A., Pervaiz, A.Z., Fukami, S. et al. Integer factorization using stochastic magnetic tunnel junctions. Nature 573, 390–393 (2019). https://doi.org/10.1038/s41586-019-1557-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s41586-019-1557-9
This article is cited by
-
In-memory factorization of holographic perceptual representations
Nature Nanotechnology (2023)
-
CMOS-compatible ising machines built using bistable latches coupled through ferroelectric transistor arrays
Scientific Reports (2023)
-
Accelerated quantum Monte Carlo with probabilistic computers
Communications Physics (2023)
-
Observation of distinct phase transitions in a nonlinear optical Ising machine
Communications Physics (2023)
-
High-throughput design of perpendicular magnetic anisotropy at quaternary Heusler and MgO interfaces
npj Computational Materials (2023)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.