Skip to content

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData

← Module overview

classAtomStateDatasource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData

Bases: RustWrapper[_RustAtomStateData]

Atom-state lattice payload backed by a Rust ``AtomStateData``.

class AtomStateData(inner: _RustAtomStateData | None = None)

All accessors delegate to the underlying Rust object; address-typed fields are wrapped via LocationAddress.from_inner / LaneAddress.from_inner to avoid re-allocating the Rust addresses.

Wrapper instances are treated as immutable: self._inner is set once during construction (or via from_inner) and cannot be rebound afterward. cached_property results live in __dict__ and are unaffected by the guard.

Parameters

NameTypeDefaultDescription
inner_RustAtomStateData | NoneNone

methodfrom_fieldssource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.from_fields

Signature
def from_fields(locations_to_qubit: dict[LocationAddress, int] | None = None, qubit_to_locations: dict[int, LocationAddress] | None = None, collision: dict[int, int] | None = None, prev_lanes: dict[int, LaneAddress] | None = None, move_count: dict[int, int] | None = None) -> AtomStateData

Construct from explicit field values.

Parameters

NameTypeDefaultDescription
locations_to_qubitdict[LocationAddress, int] | NoneNone
qubit_to_locationsdict[int, LocationAddress] | NoneNone
collisiondict[int, int] | NoneNone
prev_lanesdict[int, LaneAddress] | NoneNone
move_countdict[int, int] | NoneNone

Returns

AtomStateData

source

methodnewsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.new

def new(locations: dict[int, LocationAddress] | list[LocationAddress])

Parameters

NameTypeDescription
locationsdict[int, LocationAddress] | list[LocationAddress]
source

propertylocations_to_qubitsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.locations_to_qubit

locations_to_qubit: MappingProxyType[LocationAddress, int]

Mapping from location to qubit id (read-only).

source

propertyqubit_to_locationssource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.qubit_to_locations

qubit_to_locations: MappingProxyType[int, LocationAddress]

Mapping from qubit id to its current location (read-only).

source

propertycollisionsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.collision

collision: MappingProxyType[int, int]

Mapping from qubit id to another qubit id that it has collided with (read-only).

source

propertyprev_lanessource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.prev_lanes

prev_lanes: MappingProxyType[int, LaneAddress]

Mapping from qubit id to the lane it took to reach this state (read-only).

source

propertymove_countsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.move_count

move_count: MappingProxyType[int, int]

Mapping from qubit id to number of moves it has had (read-only).

source

methodadd_atomssource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.add_atoms

def add_atoms(locations: dict[int, LocationAddress]) -> AtomStateData

Parameters

NameTypeDescription
locationsdict[int, LocationAddress]

Returns

AtomStateData

source

methodapply_movessource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.apply_moves

Signature
def apply_moves(lanes: tuple[LaneAddress, ...], arch_spec: ArchSpec) -> AtomStateData | None

Parameters

NameTypeDescription
lanestuple[LaneAddress, ...]
arch_specArchSpec

Returns

AtomStateData | None

source

methodget_qubitsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.get_qubit

def get_qubit(location: LocationAddress)

Parameters

NameTypeDescription
locationLocationAddress
source

methodget_qubit_pairingsource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.get_qubit_pairing

def get_qubit_pairing(zone_address: ZoneAddress, arch_spec: ArchSpec)

Parameters

NameTypeDescription
zone_addressZoneAddress
arch_specArchSpec
source

methodcopysource

bloqade.lanes.analysis.atom.atom_state_data.AtomStateData.copy

def copy() -> AtomStateData

Returns

AtomStateData

source