pub struct TrainableKernelConfig {
pub n_features: usize,
pub iters: usize,
pub lr: f32,
}Expand description
Configuration for kernel-alignment training.
Fields§
§n_features: usizeNumber of qubits / features.
iters: usizeGradient-ascent iterations.
lr: f32Learning rate for the alignment ascent.
Implementations§
Source§impl TrainableKernelConfig
impl TrainableKernelConfig
Sourcepub fn new(n_features: usize, iters: usize, lr: f32) -> QuantumResult<Self>
pub fn new(n_features: usize, iters: usize, lr: f32) -> QuantumResult<Self>
Validate the configuration.
§Errors
Returns QuantumError::InvalidParameter for a zero feature count, zero
iterations, or a non-finite/non-positive learning rate.
Trait Implementations§
Source§impl Clone for TrainableKernelConfig
impl Clone for TrainableKernelConfig
Auto Trait Implementations§
impl Freeze for TrainableKernelConfig
impl RefUnwindSafe for TrainableKernelConfig
impl Send for TrainableKernelConfig
impl Sync for TrainableKernelConfig
impl Unpin for TrainableKernelConfig
impl UnsafeUnpin for TrainableKernelConfig
impl UnwindSafe for TrainableKernelConfig
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