pub struct TileAssignment {
pub tile_id: u8,
pub vertices: Vec<u64>,
pub boundary_vertices: Vec<u64>,
pub neighbors: Vec<u8>,
}Expand description
Assignment of qubits/vertices to a specific tile.
Fields§
§tile_id: u8Tile ID (1-255 for workers, 0 reserved for TileZero)
vertices: Vec<u64>Qubit/vertex IDs assigned to this tile
boundary_vertices: Vec<u64>Boundary vertices shared with other tiles
neighbors: Vec<u8>Neighboring tile IDs
Implementations§
Source§impl TileAssignment
impl TileAssignment
Sourcepub fn add_vertex(&mut self, vertex_id: u64)
pub fn add_vertex(&mut self, vertex_id: u64)
Add a vertex to this tile.
Sourcepub fn add_boundary(&mut self, vertex_id: u64)
pub fn add_boundary(&mut self, vertex_id: u64)
Add a boundary vertex (shared with neighboring tiles).
Sourcepub fn add_neighbor(&mut self, tile_id: u8)
pub fn add_neighbor(&mut self, tile_id: u8)
Add a neighboring tile.
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Get the total number of vertices (including boundary).
Trait Implementations§
Source§impl Clone for TileAssignment
impl Clone for TileAssignment
Source§fn clone(&self) -> TileAssignment
fn clone(&self) -> TileAssignment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TileAssignment
impl RefUnwindSafe for TileAssignment
impl Send for TileAssignment
impl Sync for TileAssignment
impl Unpin for TileAssignment
impl UnwindSafe for TileAssignment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more