Probabilistic Spin Logic Simulator

Simulation environment and tutorial for Probabilistic Spin Logic (PSL)

Launch Tool

You must login before you can run this tool.

Version 1.0 - published on 26 Apr 2017

doi:10.4231/D3C24QP4B cite this

View All Supporting Documents



Published on


Nanomagnets used in memory and logic usually have a large barrier ~40-60 kT and require relatively large currents to switch, which limits their practical application. Magnets with smaller barriers would require smaller currents and hence less power, but the practical utility of such magnets has been limited since they do not have a stable magnetization and cannot represent a 0 or a 1. Such stochastic nanomagnets (SNM) having thermal stabilities of only a few kT, comprising a few thousand spins, provide a natural probabilistic or "p-bit" for implementing a new kind of logic.

The natural physics of SNMs mimics the mathematics of Boltzmann Machines and can provide the basis for a probabilistic spin logic (PSL) for a wide variety of low power computing applications. To illustrate the power and versatility of PSL, this simulator demonstrates how to; (1) implement any given truth table reliably and reconfigurably (examples: NOT, AND, OR, and XOR gates); (2) solve difficult optimization problems (example: traveling salesman problem); and (3) implement relatively large logic operations by connecting basic PSL blocks in a directed manner while retaining the ability to find the inverse relation between inputs and outputs with the same design (example: N-bit adder).


Powered by

Python, NumPy, and MatPlotLib


  1. Camsari, K. Y. et al. Stochastic P-bits for Probabilistic Spin Logic. arXiv preprint arXiv:1610.00377 (2016).
  2. Sutton, B. et al. Intrinsic optimization using stochastic nanomagnets. Sci. Rep. 7, 44370; doi: 10.1038/srep44370 (2017).
  3. Faria, R. et al. Low Barrier Nanomagnets as p-bits for Spin Logic. IEEE Magnetics Letters , vol.PP, no.99, pp.1-1; doi: 10.1109/LMAG.2017.2685358

Cite this work

Researchers should cite this work as follows:

  • Brian Sutton; Kerem Yunus Camsari; Rafatul Faria; Supriyo Datta (2017), "Probabilistic Spin Logic Simulator," (DOI: 10.4231/D3C24QP4B).

    BibTex | EndNote