pub struct QuantumInspiredFramework { /* private fields */ }Expand description
Main quantum-inspired classical algorithms framework
Implementations§
Source§impl QuantumInspiredFramework
impl QuantumInspiredFramework
Sourcepub fn new(config: QuantumInspiredConfig) -> Result<Self>
pub fn new(config: QuantumInspiredConfig) -> Result<Self>
Create a new quantum-inspired framework
Sourcepub fn set_backend(&mut self, backend: SciRS2Backend)
pub fn set_backend(&mut self, backend: SciRS2Backend)
Set SciRS2 backend for numerical operations
Sourcepub fn optimize(&mut self) -> Result<OptimizationResult>
pub fn optimize(&mut self) -> Result<OptimizationResult>
Run optimization algorithm
Sourcepub fn train_ml_model(
&mut self,
training_data: &[(Array1<f64>, Array1<f64>)],
) -> Result<MLTrainingResult>
pub fn train_ml_model( &mut self, training_data: &[(Array1<f64>, Array1<f64>)], ) -> Result<MLTrainingResult>
Train machine learning model
Sourcepub fn sample(&mut self) -> Result<SamplingResult>
pub fn sample(&mut self) -> Result<SamplingResult>
Perform sampling
Sourcepub fn solve_linear_algebra(
&mut self,
matrix: &Array2<Complex64>,
rhs: &Array1<Complex64>,
) -> Result<LinalgResult>
pub fn solve_linear_algebra( &mut self, matrix: &Array2<Complex64>, rhs: &Array1<Complex64>, ) -> Result<LinalgResult>
Solve linear algebra problem
Sourcepub fn solve_graph_problem(
&mut self,
adjacency_matrix: &Array2<f64>,
) -> Result<GraphResult>
pub fn solve_graph_problem( &mut self, adjacency_matrix: &Array2<f64>, ) -> Result<GraphResult>
Solve graph problem
Sourcepub const fn get_stats(&self) -> &QuantumInspiredStats
pub const fn get_stats(&self) -> &QuantumInspiredStats
Get current statistics
Sourcepub const fn get_state(&self) -> &QuantumInspiredState
pub const fn get_state(&self) -> &QuantumInspiredState
Get current state
Sourcepub const fn get_state_mut(&mut self) -> &mut QuantumInspiredState
pub const fn get_state_mut(&mut self) -> &mut QuantumInspiredState
Get mutable state access
Sourcepub fn evaluate_objective_public(
&mut self,
solution: &Array1<f64>,
) -> Result<f64>
pub fn evaluate_objective_public( &mut self, solution: &Array1<f64>, ) -> Result<f64>
Evaluate objective function (public version)
Sourcepub fn check_convergence_public(&self) -> Result<bool>
pub fn check_convergence_public(&self) -> Result<bool>
Check convergence (public version)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuantumInspiredFramework
impl !RefUnwindSafe for QuantumInspiredFramework
impl !Send for QuantumInspiredFramework
impl !Sync for QuantumInspiredFramework
impl Unpin for QuantumInspiredFramework
impl !UnwindSafe for QuantumInspiredFramework
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> 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
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.