pub struct EmbeddingOptimizer;Expand description
Embedding evaluation and optimization utilities
Implementations§
Source§impl EmbeddingOptimizer
impl EmbeddingOptimizer
Sourcepub fn generate_initial_embedding(
problem: &IsingModel,
hardware: &HardwareTopology,
) -> RLEmbeddingResult<Embedding>
pub fn generate_initial_embedding( problem: &IsingModel, hardware: &HardwareTopology, ) -> RLEmbeddingResult<Embedding>
Generate initial embedding using baseline method
Sourcepub fn calculate_reward(
old_embedding: &Embedding,
new_embedding: &Embedding,
hardware: &HardwareTopology,
objective_weights: &ObjectiveWeights,
) -> RLEmbeddingResult<f64>
pub fn calculate_reward( old_embedding: &Embedding, new_embedding: &Embedding, hardware: &HardwareTopology, objective_weights: &ObjectiveWeights, ) -> RLEmbeddingResult<f64>
Calculate reward for action
Sourcepub fn evaluate_embedding_quality(
embedding: &Embedding,
hardware: &HardwareTopology,
) -> RLEmbeddingResult<f64>
pub fn evaluate_embedding_quality( embedding: &Embedding, hardware: &HardwareTopology, ) -> RLEmbeddingResult<f64>
Evaluate embedding quality
Sourcepub fn calculate_average_chain_length(embedding: &Embedding) -> f64
pub fn calculate_average_chain_length(embedding: &Embedding) -> f64
Calculate average chain length
Sourcepub fn calculate_hardware_utilization(
embedding: &Embedding,
hardware: &HardwareTopology,
) -> f64
pub fn calculate_hardware_utilization( embedding: &Embedding, hardware: &HardwareTopology, ) -> f64
Calculate hardware utilization
Sourcepub fn update_state(
old_state: &EmbeddingState,
action: &EmbeddingAction,
new_embedding: &Embedding,
hardware: &HardwareTopology,
) -> RLEmbeddingResult<EmbeddingState>
pub fn update_state( old_state: &EmbeddingState, action: &EmbeddingAction, new_embedding: &Embedding, hardware: &HardwareTopology, ) -> RLEmbeddingResult<EmbeddingState>
Update state after action
Sourcepub fn is_terminal_state(state: &EmbeddingState) -> bool
pub fn is_terminal_state(state: &EmbeddingState) -> bool
Check if state is terminal
Sourcepub fn calculate_problem_density(problem: &IsingModel) -> f64
pub fn calculate_problem_density(problem: &IsingModel) -> f64
Calculate problem density
Sourcepub fn classify_problem_type(problem: &IsingModel) -> String
pub fn classify_problem_type(problem: &IsingModel) -> String
Classify problem type for transfer learning
Auto Trait Implementations§
impl Freeze for EmbeddingOptimizer
impl RefUnwindSafe for EmbeddingOptimizer
impl Send for EmbeddingOptimizer
impl Sync for EmbeddingOptimizer
impl Unpin for EmbeddingOptimizer
impl UnsafeUnpin for EmbeddingOptimizer
impl UnwindSafe for EmbeddingOptimizer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.