← Writing

Parallels Between Physical Law and Software Architecture

Descriptions of physical law often use the same structures that software uses under compute limits. The match is more specific than "complex systems look similar." The structures have names and definitions. They include sharding, level of detail, lazy evaluation, and garbage collection. Engineers made these structures to run a large simulation on finite hardware. The same structures appear in statements of physical law.

This post first states the case. Then it states the strongest objections. The remainder is what still stands.

The layers

Physics has a stack:

  • Quantum mechanics
  • Atomic structure
  • Molecular chemistry
  • Biology
  • Cognition

Software has a stack:

  • Transistors
  • Logic gates
  • Operating system
  • Runtime
  • Application
graph LR
  subgraph physics["Physics stack"]
    Q[Quantum] --> A[Atomic] --> M[Molecular] --> B[Biological] --> C[Cognitive]
  end
  subgraph software["Software stack"]
    T[Transistors] --> G[Logic gates] --> O[Operating system] --> R[Runtime] --> AP[Application]
  end
  Q -.-> T
  A -.-> G
  M -.-> O
  B -.-> R
  C -.-> AP

A layer does not need to know how the layer below it works. Chemistry does not need quantum field theory. A web application does not need transistor physics. This property is abstraction.

The universe was not required to have this property. A universe can be a system where every scale depends on every other scale. This universe is layered. A layered system lets each part be built and tested on its own.

Level of detail is in the laws

In a game engine, level of detail is an approximation. A mountain at a large distance uses a simple mesh. Full geometry loads only when the player is near. This saves compute. An error in the transition shows a seam.

Physics has a similar mechanism. The difference is that the mechanism is not an approximation.

Newton's shell theorem states a fact about gravity. From outside, a spherically symmetric body has the gravity of one point that holds all of its mass. The result is exact. General relativity has the same property in Birkhoff's theorem. The center-of-mass theorem states a related fact. A system of 10^50 particles, under external forces, moves as one point.

This is why NASA can fly a spacecraft for a decade and hit a small target. The calculation does not simulate one atom of Jupiter. The universe supplies the cheap aggregate. The cheap aggregate is correct. Game engines add level of detail and then show errors. The laws come with aggregation already in place.

A mathematician can object. The shell theorem is not an added feature. It follows from the inverse-square law. The inverse-square law follows from flux conservation in three-dimensional space. Exact aggregation follows from geometry and from linear laws. This objection is fair. It moves the question. It does not remove the question. Why are the laws linear, local, and symmetric enough for this to work in all cases? Nothing required that property. The unusual fact is not the theorem. The unusual fact is the set of constraints from which the theorem follows.

The extreme case is the no-hair theorem. A black hole forms from matter of arbitrary complexity. To the outside, it exposes three properties: mass, charge, and spin. In software terms, this is a class with private fields and three accessors.

The universe is sharded

The speed of light is often described as a speed limit. A more precise frame exists. In Planck units, the speed of light is one Planck length per Planck time. That rate is one cell per tick. Researchers of cellular automata have used this term for a long time. In Conway's Game of Life, the fastest influence moves one cell per generation. The literature calls that limit the speed of light.

The speed of light is not the latency of the universe. It behaves as the clock speed of the universe.

Clocks also run more slowly near dense mass. In a game engine, the frame rate drops in the heavy parts of a scene. This parallel is a note. It is not proof.

A bounded rate of propagation has a consequence that engineers of distributed systems know. Regions that are far enough apart cannot interact. Two events outside each other's light cones cannot affect each other. No locks are needed. Race conditions cannot occur. The universe divides into shards.

The solar system can be computed to high precision with almost no data about Alpha Centauri. The needed data is a small set of aggregate values. Traffic across shards is small, read-only, and late. Light from Andromeda shows state from 2.5 million years ago. That is when the signal left. This is eventual consistency in the literal sense.

Accelerating expansion moves distant shards past the cosmic event horizon. After that point, those shards cannot send another signal. Those partitions leave the working set and do not return.

One exception is large. That exception is entanglement. Measure one of two entangled particles. The outcomes correlate across any distance, and they correlate at once. Bell's theorem shows that these correlations cannot come from state that was shared in advance. In the shard metaphor, this is consistency across shards with no messages. That should not be possible.

The no-communication theorem protects the practical core of the shard account. Entanglement cannot carry a signal. Shards still cannot talk. But the cleanest quantum phenomenon is not local. The partition is real. The one process that ignores the partition is also real. Both facts remain.

Lazy evaluation, and the problem with it

In quantum mechanics, a particle does not show a definite state until a measurement occurs. A measurement is any interaction. It is not only a physicist who looks. Before that interaction, the state is a spread of probabilities. When a process needs the value, the value resolves.

Software has a name for this pattern. The name is lazy evaluation. A value is computed only when something reads it. A game engine does not draw the far side of a mountain. A database does not materialize a view that no query uses.

A design that computes all values, in all places, at all times, wastes work. A universe that resolves definite states at the point of interaction looks like render on demand.

The problem is real. The unobserved part is the expensive part. A classical simulation of a quantum state grows in cost at an exponential rate. A few hundred entangled particles exceed any known classical computer. This is why quantum computers have interest. If the goal of the design is to save compute, quantum superposition is a poor choice.

The reading that "collapse saves work" also depends on interpretation. In many-worlds, there is no collapse. The wavefunction continues.

This correspondence is popular. It also cuts two ways. The interface looks like lazy evaluation. The implementation, if it is classical, would be the most expensive part of the system. Either the host is not classical, or this row belongs in the column against the case. This post keeps the row in both columns.

One more quantum behavior is worth a short note. A particle can appear on the other side of a barrier that it does not have the energy to cross. This is tunneling. It occurs because position is a probability, not a continuous path.

Each electron is an instance of one class

All 10^80 electrons in the observable universe are identical. They have the same mass, the same charge, and the same spin, in all places and at all times. They are not similar in the way that two handmade objects are similar. They are identical in the way that two instances of a class are identical. There is one definition. Each electron is a reference to that definition.

Handmade objects vary. Instantiated objects do not. John Wheeler once told Feynman a stronger idea: every electron is identical because there is only one electron. That electron moves forward and backward through time. The serious version is almost as strange. The universe behaves as if "electron" is defined one time. Reality holds 10^80 pointers to that specification.

A quantum state can move. It cannot be copied.

The no-cloning theorem states a limit. It is not possible to copy an unknown quantum state. The limit is not a matter of difficulty. The structure of quantum mechanics forbids the copy. When quantum teleportation moves a state between particles, the original is destroyed. That is not copy semantics. That is move semantics.

The most basic data type in the universe cannot be copied. It can only be transferred. Unique ownership is a law. Hardware did not force this choice on programming languages. Move semantics was a choice about correctness. The universe made the same choice at the lowest layer.

Storage scales with surface area

The Bekenstein bound sets a limit on information. The maximum information in a region of space is proportional to the surface area of that region. It is not proportional to the volume. If the radius of a sphere doubles, capacity increases by a factor of four, not eight.

This is unusual. A three-dimensional room would not be expected to have a capacity set by two-dimensional walls. 't Hooft and Susskind developed this into the holographic principle. The information of the universe may live on boundaries. The three-dimensional interior is then a projection. A black hole saturates the bound. Its entropy is its horizon area in Planck units, divided by four.

This row does not confirm the software analogy. Ordinary storage does not scale with surface area. The break points toward a different claim. Reality may be rendered from data of a lower dimension. That direction does not make the analogy safer.

Black holes and garbage collection

A garbage collector defines garbage as memory that nothing can reach. After an object crosses an event horizon, no reference from the rest of the universe can touch it. Light cannot touch it. Causality cannot touch it. This is not a loose likeness of unreachability. It satisfies the definition.

The rest of the lifecycle follows.

  • Collection. The object is removed from the observable working set.
  • Compaction. Internal structure is discarded. By the no-hair theorem, objects of arbitrary complexity compact to the same three fields.
  • Deallocation. Hawking radiation returns the memory to the heap as thermal energy over about 10^67 years. The process is incremental. There is no stop-the-world pause.

The black hole information paradox is an argument about deletion. For forty years, theoretical physics asked if a garbage collector may delete data. Quantum mechanics says that information cannot be destroyed. That rule is unitarity: no-delete semantics. Black holes looked like the one place where deletion occurred. The emerging consensus is that information survives, in a scrambled form, on the horizon. In software terms, the collector serializes the data before it frees the memory.

Landauer's principle adds a related fact from thermodynamics. Erasure of one bit has a minimum energy cost of kT ln 2. Experiments confirm this cost. Deletion of data in this universe is a metered operation with a physical price.

The scorecard, both columns

The matches:

Physics Software
Speed of light (1 Planck length / Planck time) Clock speed: one cell per tick
Light cones and causal separation Shard boundaries: no locks needed
Shell theorem and no-hair theorem Aggregation and encapsulation
Identical particles Instances of one class
No-cloning theorem Move semantics
Landauer's principle Metered deletes
Unitarity No-delete semantics
Conservation laws Invariants

A scorecard that counts only matches is not an argument. The misses:

Physics Why it does not fit
Quantum superposition A classical simulation has exponential cost. This is the opposite of a compute-saving method.
Entanglement Non-local correlations across shard boundaries
Lorentz invariance A grid picks a preferred frame. Experiments find none, to high precision. There is no evidence of a lattice.
About 19 free parameters in the Standard Model Config values with no derivation. They are arbitrary and unexplained.
Dark matter and dark energy About 95 percent of the system has no account.

The matches are specific and many. The misses are also specific and many. Both columns remain.

The strongest objection

This objection cannot be dismissed. It therefore has its own section.

Computers are made of physics. Signals in hardware are bound by the speed of light. That is why engineers made sharding and that is why they care about latency. Energy is scarce. That is why engineers made lazy evaluation and level of detail. The idea of efficient computation comes from the physics in which the computation runs. In this reading, the optimizations mirror physical law because the cause runs from the universe to the engineering. The scorecard does not show the mark of a simulator. It shows that the observer is inside the system that the observer describes.

This objection explains the locality cluster: clock speed, shards, and aggregation. Those were forced by physics.

It explains less than the full scorecard. Hardware did not force move semantics. That was a choice about correctness. The universe enforces that choice at the lowest layer. Hardware did not force unitarity, or a metered cost per bit of erasure, or storage that scales with boundary area. Ordinary software systems do not have those properties.

The rows that survive this objection are the information rows. The universe tracks information. It conserves information. It puts a price on information. It refuses to duplicate some information. The managed resource looks like information, not matter.

What remains

Remove the parts that the objections take. A thesis remains. The thesis does not need a simulator. It may be stranger than a simulator.

Information appears to be physical. Erasure costs energy (Landauer). Destruction is forbidden (unitarity). Storage has a geometric capacity limit (Bekenstein). A copy can be impossible (no-cloning). This is Wheeler's "it from bit." It is not a fringe position. It is an active research program. Physics and computation may be the same subject, approached from two ends.

The simulation hypothesis is one reading of that fact. It is the vivid reading. It is also the reading that George Hotz rejected as a source of power over nature:

"I'm interested only in simulation theory as far as it gives me power over nature. If it's totally unfalsifiable, then who cares?" — George Hotz

That is the correct challenge. What would move this from a comparison to physics? A detected anisotropy from an underlying lattice. A Lorentz violation at high energy. A measured deviation that suggests finite precision in the constants. People have looked for all three. So far there is no such result. That absence is evidence. It counts against a grid.

Historical metaphors

Each era describes the universe with its most impressive technology. Newton's universe ran like a clock. The 1800s used steam. The twentieth century compared brains to switchboards, then to computers. People who build software now look at the universe and see software. The pattern is familiar.

The clockwork metaphor was not a loose image that failed at first contact. It became more precise for two hundred years, through Laplace, Lagrange, and celestial mechanics of high accuracy. Quantum mechanics then ended it. A metaphor built from the best technology of an era can be useful for centuries. It can still be wrong about the substrate.

The honest position is not "this time the metaphor is true." The parts of the correspondence that follow from hardware inside physics prove nothing. The parts that do not follow from that fact are the information rows. Those rows point at something real. "It from bit" names that something, whether or not a process is running the system.

Coincidence or structure

The claim that can be defended is this. Computation and physics continue to look like the same subject. The universe manages information in the way that engineered systems manage a scarce resource.

The claim that someone built the universe this way is not falsifiable today. Fewer rows on the scorecard support that claim than a short version of this comparison would suggest.

One remaining observation is still in place. An audit of a system that you did not build can find a set of policies. Those policies include unreachability, no-delete rules, metered writes, unique ownership, and storage quotas per region. A common conclusion is that someone designed resource management. The universe may be the exception. The universe may also be the first instance of the pattern, and software may be the copy. Neither reading is proved. Only one of those readings explains why the audit keeps finding policy.

Prior art

This comparison has a literature.

  • Konrad Zuse, Calculating Space (1969), proposed that the universe is a cellular automaton.
  • John Wheeler, "it from bit", put information at the base of physics.
  • Edward Fredkin built digital physics as a program.
  • Seth Lloyd argued that the universe is a quantum computer. That claim would answer the superposition objection.
  • Stephen Wolfram continues related work at Wolfram Physics.
  • Nick Bostrom's simulation argument (2003) supplied the probability argument that later writers repeat.