#[repr(C)]pub struct QAOAAngleOptimizer {
pub angles: QAOAAngles,
pub angle_updates: QAOAAngles,
pub cost_history: [f64; 50],
pub gradients: QAOAAngles,
pub depth: u8,
pub config: SolverConfig,
pub solver_state: SolverState,
}Expand description
QAOA angle optimizer for quantum approximate optimization
Fields§
§angles: QAOAAnglesCurrent angle parameters (β, γ pairs)
angle_updates: QAOAAnglesAngle updates
cost_history: [f64; 50]Cost function history
gradients: QAOAAnglesGradient estimates
depth: u8Current depth
config: SolverConfigSolver configuration
solver_state: SolverStateSolver state
Implementations§
Source§impl QAOAAngleOptimizer
impl QAOAAngleOptimizer
Sourcepub fn new(depth: u8, config: SolverConfig) -> Self
pub fn new(depth: u8, config: SolverConfig) -> Self
Create new QAOA angle optimizer
Sourcepub fn optimize<F>(
&mut self,
f: &F,
initial_angles: QAOAAngles,
) -> SolverResult<QuantumOptimizerState>where
F: QuantumCostFunction,
pub fn optimize<F>(
&mut self,
f: &F,
initial_angles: QAOAAngles,
) -> SolverResult<QuantumOptimizerState>where
F: QuantumCostFunction,
Optimize QAOA angles using gradient-based method
Sourcepub fn get_angles(&self) -> QAOAAngles
pub fn get_angles(&self) -> QAOAAngles
Get optimized angles
Sourcepub fn get_gradients(&self) -> QAOAAngles
pub fn get_gradients(&self) -> QAOAAngles
Get gradient information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QAOAAngleOptimizer
impl RefUnwindSafe for QAOAAngleOptimizer
impl Send for QAOAAngleOptimizer
impl Sync for QAOAAngleOptimizer
impl Unpin for QAOAAngleOptimizer
impl UnsafeUnpin for QAOAAngleOptimizer
impl UnwindSafe for QAOAAngleOptimizer
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.