pub struct ObjectiveEvaluator {
pub config: ObjectiveConfig,
pub circuit: Arc<ParametricCircuit>,
pub backend: ObjectiveBackend,
pub cached_hamiltonian: Option<HamiltonianMatrix>,
pub measurement_groups: Option<Vec<MeasurementGroup>>,
}Expand description
Comprehensive objective function evaluator with SciRS2 integration
Fields§
§config: ObjectiveConfigConfiguration
circuit: Arc<ParametricCircuit>Parametric circuit reference
backend: ObjectiveBackendQuantum simulator backend
cached_hamiltonian: Option<HamiltonianMatrix>Cached Hamiltonian matrix (for efficiency)
measurement_groups: Option<Vec<MeasurementGroup>>Measurement groupings (for optimization)
Implementations§
Source§impl ObjectiveEvaluator
impl ObjectiveEvaluator
Sourcepub fn new(
config: ObjectiveConfig,
circuit: ParametricCircuit,
backend: ObjectiveBackend,
) -> Self
pub fn new( config: ObjectiveConfig, circuit: ParametricCircuit, backend: ObjectiveBackend, ) -> Self
Create new objective evaluator
Sourcepub fn with_hamiltonian_caching(self) -> DeviceResult<Self>
pub fn with_hamiltonian_caching(self) -> DeviceResult<Self>
Initialize with Hamiltonian caching
Sourcepub fn with_measurement_grouping(self) -> DeviceResult<Self>
pub fn with_measurement_grouping(self) -> DeviceResult<Self>
Initialize measurement grouping optimization
Trait Implementations§
Source§impl Debug for ObjectiveEvaluator
impl Debug for ObjectiveEvaluator
Source§impl ObjectiveFunction for ObjectiveEvaluator
impl ObjectiveFunction for ObjectiveEvaluator
Source§fn evaluate(&self, parameters: &Array1<f64>) -> DeviceResult<ObjectiveResult>
fn evaluate(&self, parameters: &Array1<f64>) -> DeviceResult<ObjectiveResult>
Comprehensive objective function evaluation
Source§fn compute_gradient_with_method(
&self,
parameters: &Array1<f64>,
method: &GradientMethod,
) -> DeviceResult<Array1<f64>>
fn compute_gradient_with_method( &self, parameters: &Array1<f64>, method: &GradientMethod, ) -> DeviceResult<Array1<f64>>
Compute gradient with specified method
Source§fn supports_batch_evaluation(&self) -> bool
fn supports_batch_evaluation(&self) -> bool
Check batch evaluation support
Source§fn compute_gradient(
&self,
parameters: &Array1<f64>,
) -> DeviceResult<Array1<f64>>
fn compute_gradient( &self, parameters: &Array1<f64>, ) -> DeviceResult<Array1<f64>>
Compute gradient using specified method
Source§fn batch_evaluate(
&self,
parameter_sets: &[Array1<f64>],
) -> DeviceResult<Vec<ObjectiveResult>>
fn batch_evaluate( &self, parameter_sets: &[Array1<f64>], ) -> DeviceResult<Vec<ObjectiveResult>>
Batch evaluate multiple parameter sets (if supported)
Auto Trait Implementations§
impl Freeze for ObjectiveEvaluator
impl RefUnwindSafe for ObjectiveEvaluator
impl Send for ObjectiveEvaluator
impl Sync for ObjectiveEvaluator
impl Unpin for ObjectiveEvaluator
impl UnwindSafe for ObjectiveEvaluator
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.