pub struct QuantumEnsemble<T> {
pub classical_models: Vec<T>,
pub quantum_transformers: Vec<QuantumTransformer>,
pub weights: Array1<f64>,
}Expand description
Quantum-inspired ensemble for combining classical and quantum models
Fields§
§classical_models: Vec<T>Classical models in the ensemble
quantum_transformers: Vec<QuantumTransformer>Quantum transformers
weights: Array1<f64>Ensemble weights
Implementations§
Source§impl<T> QuantumEnsemble<T>
impl<T> QuantumEnsemble<T>
Sourcepub fn add_classical_model(self, model: T) -> Self
pub fn add_classical_model(self, model: T) -> Self
Add a classical model to the ensemble
Sourcepub fn add_quantum_transformer(self, transformer: QuantumTransformer) -> Self
pub fn add_quantum_transformer(self, transformer: QuantumTransformer) -> Self
Add a quantum transformer to the ensemble
Sourcepub fn with_weights(self, weights: Array1<f64>) -> Self
pub fn with_weights(self, weights: Array1<f64>) -> Self
Set ensemble weights
Trait Implementations§
Source§impl<T: Clone> Clone for QuantumEnsemble<T>
impl<T: Clone> Clone for QuantumEnsemble<T>
Source§fn clone(&self) -> QuantumEnsemble<T>
fn clone(&self) -> QuantumEnsemble<T>
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 moreSource§impl<T: Debug> Debug for QuantumEnsemble<T>
impl<T: Debug> Debug for QuantumEnsemble<T>
Auto Trait Implementations§
impl<T> Freeze for QuantumEnsemble<T>
impl<T> RefUnwindSafe for QuantumEnsemble<T>where
T: RefUnwindSafe,
impl<T> Send for QuantumEnsemble<T>where
T: Send,
impl<T> Sync for QuantumEnsemble<T>where
T: Sync,
impl<T> Unpin for QuantumEnsemble<T>where
T: Unpin,
impl<T> UnwindSafe for QuantumEnsemble<T>where
T: UnwindSafe,
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