Programming

The principles of reversible programming

Reversible programming starts from a single, surprising fact of physics: forgetting is what costs energy. Build a computation that never forgets and the bill — in principle — vanishes. Here is how that works, and where its hardware and its inspirations come from.

Zero-energy programming: Landauer and the cost of forgetting

Every time a conventional computer erases or overwrites a bit, physics charges a toll. Rolf Landauer showed in 1961 that destroying one bit of information must release at least kT ln 2 of heat into the surroundings — about 2.75 zeptojoules, or roughly 0.017 eV, at room temperature. The reason is that erasure is logically irreversible: it collapses two distinct states (the bit was 0, or it was 1) into one (now it is 0). That loss of distinguishability is a loss of entropy in the information, which the second law insists must reappear as entropy in the environment, and therefore as heat.

This is not a quirk of any particular technology; it is a floor beneath all of them. And it is not merely theoretical: the bound was measured directly by Bérut and colleagues in 2012, who watched a single colloidal particle in a double-well trap and confirmed that erasing its one bit released no less than Landauer's limit. See Landauer's principle and Bérut et al., Nature 2012.

Computing without forgetting

If forgetting is what costs, the way out is not to forget. Charles Bennett proved in 1973 that this is always possible: any computation can be performed by steps that are each one-to-one and reversible, so that no information is ever thrown away and Landauer's toll never comes due. A reversible machine runs forward to its result, copies that result out, and then runs backward — uncomputing every intermediate value — to recover its scratch memory cleanly rather than erasing it.

The price is bookkeeping, not heat: reversible programs must keep enough history to retrace their steps, trading space (and some discipline in how we write them) for the freedom from dissipation. That trade is exactly what reversible programming languages make manageable, and it is why the logical and the physical sides of the field are inseparable. See Bennett, "Logical Reversibility of Computation" (1973).

Adiabatic and energy-recovery hardware

Logical reversibility removes the floor; adiabatic hardware lets us approach it. Ordinary CMOS wastes ½CV² of energy every time it drives a node between voltage levels, because it dumps the charge through a resistance and turns the stored energy straight into heat. Adiabatic, or energy-recovery, logic refuses that waste: it charges and discharges its capacitances gently, through a resonant power clock, so that most of the energy is returned to the supply to be used again on the next cycle instead of being lost.

Neither idea suffices alone. Switch reversibly but keep erasing, and Landauer still charges you; avoid erasure but switch abruptly, and ½CV² still burns. Together — logical reversibility plus adiabatic switching — they are the only known route to computation whose energy cost can be driven arbitrarily close to zero. That combination is what "zero-energy programming" actually names.

Reversibility in control: an analogy, stated carefully

The Institute's founder is drawn to a resemblance worth setting out plainly — and plainly labelling. In optimal control, Pontryagin's Maximum Principle steers a system optimally by extremizing a control Hamiltonian at each instant; in classical mechanics, the same Hamiltonian structure is what makes time-reversible dynamics tick. Reversible computation, too, is most natural to describe in terms of invertible, information-preserving flows. The shared vocabulary — Hamiltonians, conserved structure, trajectories that can be run either way — is suggestive.

We present this as a motivating analogy, not a proven equivalence. Optimal control and reversible computation are cousins, not twins: they borrow the same mathematical language, but a theorem in one is not automatically a theorem in the other. The resemblance has been useful design inspiration here, and we want to be honest that this is all it is. See Pontryagin's Maximum Principle and time reversibility.