pub struct RearrangeReceipt {Show 13 fields
pub initial_hash: [u8; 32],
pub target_hash: [u8; 32],
pub plan_hash: [u8; 32],
pub method: String,
pub success: bool,
pub atoms_moved: u32,
pub total_distance: u64,
pub joules_micro: u64,
pub grant: GrantRef,
pub parent_receipt_hash: Option<[u8; 32]>,
pub signer_pubkey: [u8; 32],
pub signer_id: String,
pub sig: [u8; 64],
}Expand description
A signed, joule-metered, grant-authorized record of a neutral-atom REARRANGEMENT plan.
A neutral-atom processor loads atoms stochastically into an array of optical
traps — a random, ~half-full pattern — then uses mobile tweezers to rearrange
them into a defect-free target register before the computation. The plan
that does it (which atom moves to which site, in what order) is produced by a
combinatorial solver whose optimality and validity nobody signs. This receipt
binds the initial occupancy, the target sites, and the move plan to a success
verdict (every target site filled) and the plan’s cost — produced by a
deterministic solver (Hungarian / LSAP, minimizing total move distance),
byte-exact and reproducible.
success is what the planner DOES know (it re-checks the plan against the
bound configs deterministically), so it belongs in the receipt.
Fields§
§initial_hash: [u8; 32]Content hash of the initial (loaded) array occupancy.
target_hash: [u8; 32]Content hash of the target site set.
plan_hash: [u8; 32]Content hash of the move plan.
method: StringThe solver: "hungarian-lsap".
success: boolThe plan fills every target site from the available atoms.
atoms_moved: u32Atoms actually relocated (moves of nonzero distance).
total_distance: u64Total move distance (grid units) — the plan’s cost. Deterministic.
joules_micro: u64Measured (or modeled) energy of the solve (µJ). Attested.
grant: GrantRef§parent_receipt_hash: Option<[u8; 32]>§signer_pubkey: [u8; 32]§signer_id: String§sig: [u8; 64]Implementations§
Source§impl RearrangeReceipt
impl RearrangeReceipt
pub fn seal( signer: &SigningKey, signer_id: impl Into<String>, method: impl Into<String>, initial_hash: [u8; 32], target_hash: [u8; 32], plan_hash: [u8; 32], success: bool, atoms_moved: u32, total_distance: u64, joules_micro: u64, grant: GrantRef, parent_receipt_hash: Option<[u8; 32]>, ) -> RearrangeReceipt
pub fn honors_budget(&self) -> bool
pub fn verify(&self) -> bool
pub fn plan_matches(&self, bytes: &[u8]) -> bool
pub fn receipt_hash(&self) -> [u8; 32]
pub fn to_json(&self) -> String
pub fn from_json(s: &str) -> Option<RearrangeReceipt>
Trait Implementations§
Source§impl Clone for RearrangeReceipt
impl Clone for RearrangeReceipt
Source§fn clone(&self) -> RearrangeReceipt
fn clone(&self) -> RearrangeReceipt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more