pub struct HSProblem<R: RealScalar> {
pub circuit: Arc<QuditCircuit>,
pub target: Arc<InstantiationTarget<R::C>>,
}Fields§
§circuit: Arc<QuditCircuit>§target: Arc<InstantiationTarget<R::C>>Implementations§
Source§impl<R: RealScalar> HSProblem<R>
impl<R: RealScalar> HSProblem<R>
pub fn new( circuit: Arc<QuditCircuit>, target: Arc<InstantiationTarget<R::C>>, ) -> Self
pub fn build_cost<const D: DifferentiationLevel>(&self) -> PinnedTNVM<R::C, D>
pub fn build_residual<const D: DifferentiationLevel>( &self, ) -> PinnedTNVM<R::C, D>
Trait Implementations§
Source§impl<R: RealScalar> InstantiationProblem<R> for HSProblem<R>
impl<R: RealScalar> InstantiationProblem<R> for HSProblem<R>
fn from_instantiation( circuit: Arc<QuditCircuit>, target: Arc<InstantiationTarget<R::C>>, _data: Arc<DataMap>, ) -> Self
Source§impl<R: RealScalar> Problem for HSProblem<R>
impl<R: RealScalar> Problem for HSProblem<R>
Source§fn num_params(&self) -> usize
fn num_params(&self) -> usize
Returns the number of parameters in the problem.
Source§impl<R: RealScalar> ProvidesCostFunction<R> for HSProblem<R>
impl<R: RealScalar> ProvidesCostFunction<R> for HSProblem<R>
Source§type CostFunction = HSFunction<R, 0>
type CostFunction = HSFunction<R, 0>
The type of the cost function.
Source§fn build_cost_function(&self) -> Self::CostFunction
fn build_cost_function(&self) -> Self::CostFunction
Builds the cost function.
Source§impl<R: RealScalar> ProvidesJacobian<R> for HSProblem<R>
impl<R: RealScalar> ProvidesJacobian<R> for HSProblem<R>
Source§type Jacobian = HSFunction<R, GRADIENT>
type Jacobian = HSFunction<R, GRADIENT>
The type of the cost function.
Source§fn build_jacobian(&self) -> Self::Jacobian
fn build_jacobian(&self) -> Self::Jacobian
Builds the Jacobian.
Source§impl<R: RealScalar> ProvidesResidualFunction<R> for HSProblem<R>
impl<R: RealScalar> ProvidesResidualFunction<R> for HSProblem<R>
Source§type ResidualFunction = HSFunction<R, 0>
type ResidualFunction = HSFunction<R, 0>
The type of the cost function.
Source§fn build_residual_function(&self) -> Self::ResidualFunction
fn build_residual_function(&self) -> Self::ResidualFunction
Builds the residual function.
Auto Trait Implementations§
impl<R> Freeze for HSProblem<R>
impl<R> RefUnwindSafe for HSProblem<R>
impl<R> Send for HSProblem<R>
impl<R> Sync for HSProblem<R>
impl<R> Unpin for HSProblem<R>
impl<R> UnwindSafe for HSProblem<R>
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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