Library / State Register / State Register
State Register
Exact amplitude memory: open, catalogue, index, and faults.
Contract
State Register holds one pure state as a contiguous table of 2^n complex amplitudes in double precision. A gate is a unitary on one or two wires, or a custom 2×2 or 4×4 matrix that passes U†U = I. The product does not drop singular values and does not switch to Bond Contract when the ceiling is too small.
The essay, including the full index convention and the amplitude table, is /investor-relations/research/lattice-mesh/state-register. This page is the operational contract.
| Width | Payload |
|---|---|
| 16 | 1 MiB |
| 20 | 16 MiB |
| 24 | 256 MiB |
| 30 | 16 GiB |
Opening a register
register = Lattice.open(width=20, endian="little", ceiling="256 MiB")
endian must be the string little. A request for the opposite endianness is a fault; reverse the wire labels at your boundary and document it. ceiling is a byte string the console parses (KiB, MiB, GiB). The open adds the largest gate tile’s scratch to the payload and refuses the call if the sum exceeds the ceiling.
Applying a gate
apply names a catalogue entry or a custom matrix. Controls use the positive convention: the target acts when every control bit is 1. Angles on Rx, Ry, Rz are radians and follow exp(−i θ P / 2).
| Name | Required arguments |
|---|---|
| I, X, Y, Z, H, S, T | on |
| Rx, Ry, Rz | on, angle |
| CNOT, CZ | control, target |
| SWAP | on as a pair, or the two wire arguments wires= |
| custom | matrix, wires |
Faults
- Budget fault at open.
- Width fault when a wire index is outside 0 … n−1.
- Unitary fault when a custom matrix fails the identity check.
- Norm fault when assert_norm is armed and the norm leaves the band.