DOCS / PBITS

Project #6: p-bits

Research date for everything below: 2026-11-27, unless a line says otherwise.

Probabilistic bits, p-bits, wired together into a small thermodynamic computer: first as gateware on the bench's Colorlight i9, then fed by a physical noise source, then as a chip. Jon, 2026-11-27: "given my interest in microcontrollers and previous work with thermodynamic computing engineering/simulation in cortenforge, this is attractive to me." The plan came from Jon's Claude session the same day ("Where this came from", below). Nothing is built or ordered, and what each piece would do is unknown until it earns a grade.

What a p-bit computes

CortenForge's Gibbs sampler (cortenforge-sim-thermostat 0.9.0, src/gibbs.rs) states it. Spins σ ∈ {−1, +1} carry the energy

H(σ) = −Σ J_ij σ_i σ_j − Σ h_i σ_i

and each update sets one spin to +1 with probability "sigmoid(2·local_field_i / kT)", where spin i's local field is h_i plus the sum of J_ij σ_j over its neighbours (sweep, which updates the spins in turn). A p-bit is hardware that makes that update. CortenForge's exact_distribution (src/ising.rs) enumerates the distribution H gives, for up to 20 spins ("safety limit: 2^20 = 1M configurations"), and CortenForge checks its sampler against it (tests/gibbs_sampler.rs, "Validates the GibbsSampler against exact_distribution"). It is what a small network's measured histogram is checked against here.

Where it sits

What already exists

The sources are in prior-art.md, "p-bits and thermodynamic computing".

What nothing we found does: p-bits on an ECP5, written in Amaranth and built with Yosys, nextpnr and Trellis; a p-bit core checked bit for bit against an open Rust model; and p-bits fed by an on-chip entropy source that runs SP 800-90B's health tests in the same gateware. That is the part built here. A p-bit made in a process older than 180 nm, or in an open fab, also turned up nowhere.

The steps

Each is a proposal, unknown until it earns a grade.

stepwhatpasses when
1A golden model, in Rust: p-bits in integer arithmetic, with the random-number generator and the sigmoid's table or threshold that the gateware will useon networks of up to 20 spins, its samples' histogram is within a distance of exact_distribution from cortenforge-sim-thermostat 0.9.0, the distance and the sample count set in the test before it first runs (tested)
2A p-bit core in Amaranthin simulation it draws exactly the golden model's samples, from the same seed (tested)
3p-bits on the i9a board run's histogram matches exact_distribution within the same distance, recorded as a measurement (measured)
4True randomness: ring oscillators on the ECP5, with SP 800-90B's health tests in the gateware, feeding the p-bitsthe health tests run on the board and the p-bits' histogram still matches (measured); what the source's entropy is stays unknown until it is estimated
5A p-bit chip, on a shuttle and then in our own processits histogram matches (measured); a shuttle costs money, which is Jon's decision (fab.md, "The steps")

What it could run

applicationwhat existshere
invertible logic: a multiplier run backward to factorCamsari et al. 2017; Borders et al. 2019; ferrotherm's multiplier, in softwarethe showcase, after the small networks
max-cut and SATpc-COP and the sparse Ising machine, on Xilinx parts; WobblyBits' K3,3, in RTLa first network
true random numbersneoTRNG; cryptoliteICE's health testsstep 4
Bayesian inference and energy-based samplingFaria et al.'s autonomous Bayesian networks (titles read only); Extropic's denoising models, simulatedlater, with CortenForge's IsingLearner for Boltzmann learning
Wave Function Collapsenothing found on p-bits or Ising machineslater

Where this came from

Jon's Claude session of 2026-11-27, whose summary Jon brought the same day. It set out a thermodynamic chip as the strongest candidate for a young fab, a path ("your sims as the reference model, then p-bits on an FPGA, then fabbed devices using real physical noise"), its applications, and a dev kit with a built-in RNG as the launch. Kept: the path, the applications and the dev kit. Changed here:

A second session, whose summary Jon brought on 2026-11-28, asked whether p-bits and MRAM can share a chip. Kept: that they share a device, and may share a process ("What already exists"); its update rule, m_i = sgn(tanh(β·I_i) − r) with r uniform on (−1, 1), which is CortenForge's, since P(m_i = +1) = (1 + tanh βI_i)/2 = sigmoid(2βI_i) with β = 1/kT (algebra; no test holds it yet); and, as an idea for step 1's golden model that its row does not hold, "model temperature drift as a variation in effective β". Changed here:

What was searched

On 2026-11-27, one search agent and my own reads. Searched: 156 queries in the agent's log (68 GitHub repository searches, 44 on arXiv, 10 GitHub code searches, 14 on Gitee, 14 on OSHWHub, 5 on Bilibili and 1 on Crossref), 45 of them empty, and no web searches. Read: method sections of five FPGA papers, of Extropic's paper and of Normal Computing's two (its stochastic processing unit and CN101), about 30 READMEs, NIST SP 800-90B, and Tiny Tapeout's project index. The rows that prior-art.md marks re-read were read again in their own text. Not seen: full Nature texts, IEEE and ACM papers, any FPGA p-bit code that is not public, and Hacker Fab's sources, which were not searched for p-bits. arXiv's search matches abstracts and GitHub's repository search matches names, descriptions and topics, so this shows what was found, not that nothing closer exists.

On 2026-11-28, for MRAM beside p-bits, my own reads: two web searches; arXiv's API for the abstracts of the four MTJ and RRAM papers prior-art.md cites, of the searches' other arXiv hits, and of two of the five papers by Camsari whose abstracts say "embedded"; NCBI's API for the searches' two PubMed Central hits; in the PDFs of arXiv 2506.14590, 2604.14446 and 2509.13469, the passages a search for barrier, MRAM, retention and integration terms found; Yang et al.'s abstract, on bibbase.org; and the README of the SKY130 ReRAM library. Not read: Yang et al.'s paper; "Implementing p-bits With Embedded MTJ" (IEEE Electron Device Letters, 2017), which the review cites and for which Crossref gives no abstract; any other IEEE paper; the second search's other hits; and any open process kit's list of devices.

Written in docs/pbits.md, on main; this page is made from it.