Lattice Mesh · partitioned execution

Device Span

Device Span is the Æ Hive product that partitions a State Register or a density table across workers and reproduces the single-worker result inside a published tolerance.

What Device Span owns

Device Span does not define a new state. It places the State Register table, or a Noise Channel density table, onto more than one worker and applies the same gates. The numerical contract is agreement with the one-worker product. Any algorithm that changes pair-update order enough to move results outside the published tolerance is a defect, even if it is faster.

Workers are an ordered list supplied at open. The laboratory profile uses processes that share a job identifier. The product description does not depend on a particular accelerator vendor. A worker is an addressable memory plus the ability to exchange messages with the other workers in the span. If the deployment has one worker, Device Span is required to match State Register entry for entry on the regression suite.

How the table is cut

The default partition stripes the amplitude index by its high bits. With w workers, where w is a power of two, worker r owns the rows whose top log2(w) bits equal r. Each worker holds 2^n / w amplitudes. A gate on a low wire, below the cut, updates pairs that sit entirely inside one worker. A gate on a wire inside the cut has every amplitude’s partner on a different worker.

For a cut wire, each local amplitude is paired with exactly one remote amplitude, the row that differs only in that bit. The exchange sends one complex value per local amplitude, applies the 2×2 matrix, and writes the local half back. The byte volume of that exchange is 16 bytes times the local row count, in each direction, before compression. The report lists that volume per gate. It does not hide communication inside a timer.

Table 1. Default stripe for a power-of-two worker count.
Width nWorkersRows per workerCut wires (high bits)
2011,048,576none
204262,144bits 18 and 19
2482,097,152bits 21–23
301667,108,864bits 26–29

Agreement with one worker

On one worker the pair-update order is the State Register order. On several workers, pairs that lie inside a worker follow that same local order, and cross-worker pairs are applied only after both halves of a tile have arrived. The merge can change the last bits of a double-precision result relative to a single-threaded walk. The published tolerance for the regression suite is an absolute amplitude tolerance of 10^{-12} on the Aether braid and on every rotation suite circuit at width ≤ 16, and 10^{-9} on the width-20 random brickwork stored in the laboratory fixture.

Expectations go through Observable Ledger. A span does not print its own unofficial mean. The ledger record gains a field workers. A comparison between workers=1 and workers=8 that exceeds the tolerance is a mismatch fault attributed to Device Span, not to the ledger.

Lattice script
span = Lattice.span(width=20, workers=4, ceiling="8 GiB")
span.run(script)                 # same script a State Register would take
one = Lattice.open(width=16)    # reference width that still fits
one.run(script_16)
assert span.expect_on_prefix(one, tol=1e-12)

Density tables

A density table is partitioned by the high bits of the row index and, independently, by the high bits of the column index, into a block grid. A local Noise Channel map on a low wire updates blocks without a full exchange. A map on a cut wire, or a two-wire unitary that touches a cut, exchanges blocks. The report’s volume is in bytes of block payload. The numerical checks are the same trace, hermiticity, and negativity checks as Noise Channel, reduced on worker 0 after an all-gather of the scalars (trace and the smallest eigenvalue). Eigenvalue estimation uses the same procedure as the one-worker product, not a looser estimate invented for the span.

Bond Contract is not spanned in this release. Its memory is already linear in width, and the laboratory’s first distributed target is the exact table, which is the one that exhausts a single host. A caller who needs a factored state on one machine stays on Bond Contract.

Partial failure

If any worker fails a gate, the span aborts the job identifier and refuses further applies. There is no promotion of a surviving subset of workers into a smaller state. A partial amplitude table is not a state of fewer wires. It is an incomplete table, and publishing an expectation from it would be a false record. Observable Ledger will not read a span whose job is aborted.

  • Membership fault: the worker list changed after open.
  • Budget fault: the per-worker slice plus scratch exceeds that worker’s ceiling. Ceilings may differ. The strictest shortfall aborts the whole span.
  • Exchange fault: a partner message is missing, duplicated, or tagged with another job.
  • Tolerance fault: a regression comparison against one worker exceeds the published band.

Continue in the laboratory