pub struct LayerwiseConfig {
pub n_qubits: usize,
pub target_depth: usize,
pub iters_per_stage: usize,
pub lr: f32,
pub seed_noise: f32,
}Expand description
Configuration for layer-wise warm-start VQE training.
Fields§
§n_qubits: usizeNumber of qubits in the ansatz.
target_depth: usizeFinal ansatz depth to grow to (number of entangling layers).
iters_per_stage: usizeParameter-shift gradient-descent iterations spent at each depth stage.
lr: f32Learning rate for gradient descent.
seed_noise: f32Small std-dev for randomizing the very first (depth-0) layer; the grown layers are always zero-initialized to preserve the identity-block warm start, so only the seed layer needs symmetry breaking.
Implementations§
Source§impl LayerwiseConfig
impl LayerwiseConfig
Sourcepub fn new(
n_qubits: usize,
target_depth: usize,
iters_per_stage: usize,
lr: f32,
seed_noise: f32,
) -> QuantumResult<Self>
pub fn new( n_qubits: usize, target_depth: usize, iters_per_stage: usize, lr: f32, seed_noise: f32, ) -> QuantumResult<Self>
Validate the configuration.
§Errors
Returns QuantumError::InvalidParameter / QuantumError::InvalidQubitCount
for non-positive qubit counts, zero iterations, or a non-finite learning rate.
Trait Implementations§
Source§impl Clone for LayerwiseConfig
impl Clone for LayerwiseConfig
Auto Trait Implementations§
impl Freeze for LayerwiseConfig
impl RefUnwindSafe for LayerwiseConfig
impl Send for LayerwiseConfig
impl Sync for LayerwiseConfig
impl Unpin for LayerwiseConfig
impl UnsafeUnpin for LayerwiseConfig
impl UnwindSafe for LayerwiseConfig
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