pub struct QuantumOperatorPlan { /* private fields */ }Expand description
Fixed-pattern materialization of a QuantumOperator.
Construction aligns every component with the union sparsity pattern once. Subsequent evaluations update only numerical values, preserving the sparse indices and any backend analysis that depends on them.
Implementations§
Source§impl QuantumOperatorPlan
impl QuantumOperatorPlan
Sourcepub fn component_names(&self) -> impl Iterator<Item = &str>
pub fn component_names(&self) -> impl Iterator<Item = &str>
Iterate component names in the coefficient order accepted by the plan.
Sourcepub fn operator(&self) -> &Operator
pub fn operator(&self) -> &Operator
Borrow the most recently evaluated operator and its stable storage.
Sourcepub fn resolve_coefficients(
&self,
parameters: &HashMap<String, Complex64>,
) -> Result<Vec<Complex64>>
pub fn resolve_coefficients( &self, parameters: &HashMap<String, Complex64>, ) -> Result<Vec<Complex64>>
Resolve a parameter map into the plan’s stable coefficient order.
Sourcepub fn evaluate(
&mut self,
parameters: &HashMap<String, Complex64>,
) -> Result<&Operator>
pub fn evaluate( &mut self, parameters: &HashMap<String, Complex64>, ) -> Result<&Operator>
Evaluate named parameters while reusing the plan’s storage pattern.
Sourcepub fn evaluate_coefficients(
&mut self,
coefficients: &[Complex64],
) -> Result<&Operator>
pub fn evaluate_coefficients( &mut self, coefficients: &[Complex64], ) -> Result<&Operator>
Evaluate coefficients already arranged in Self::component_names order.
This is the lowest-overhead scan path: it performs no name lookup and allocates no matrix structure.
Trait Implementations§
Source§impl Clone for QuantumOperatorPlan
impl Clone for QuantumOperatorPlan
Source§fn clone(&self) -> QuantumOperatorPlan
fn clone(&self) -> QuantumOperatorPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QuantumOperatorPlan
impl RefUnwindSafe for QuantumOperatorPlan
impl Send for QuantumOperatorPlan
impl Sync for QuantumOperatorPlan
impl Unpin for QuantumOperatorPlan
impl UnsafeUnpin for QuantumOperatorPlan
impl UnwindSafe for QuantumOperatorPlan
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.