pub struct ResolvedModel { /* private fields */ }Expand description
A validated Hamiltonian together with the physical inputs that resolved it.
The operator representation is useful for matrix and local-energy work, while this wrapper keeps the model family, simulation basis, weighted pair identities, and site parameters available for provenance and inspection.
Implementations§
Source§impl ResolvedModel
impl ResolvedModel
Sourcepub const fn hamiltonian(&self) -> &Hamiltonian
pub const fn hamiltonian(&self) -> &Hamiltonian
Return the resolved operator Hamiltonian.
Sourcepub const fn basis(&self) -> SimulationBasis
pub const fn basis(&self) -> SimulationBasis
Return the simulation basis used by the builder.
Sourcepub fn interactions(&self) -> &[WeightedInteraction]
pub fn interactions(&self) -> &[WeightedInteraction]
Return all resolved weighted interactions, including zero coefficients.
Sourcepub fn with_physical_constant(
self,
constant: f64,
) -> Result<ResolvedModel, ModelError>
pub fn with_physical_constant( self, constant: f64, ) -> Result<ResolvedModel, ModelError>
Return a copy of this model with the supplied real physical constant.
Model constructors use a zero constant because their named parameters describe non-identity terms. Durable configuration adapters can apply an explicitly serialized constant through this method without rebuilding or reinterpreting the operator terms.
Sourcepub const fn specification(&self) -> &ModelSpecification
pub const fn specification(&self) -> &ModelSpecification
Return the original typed physical specification.
Methods from Deref<Target = Hamiltonian>§
Sourcepub fn site_count(&self) -> SiteCount
pub fn site_count(&self) -> SiteCount
Number of sites represented by the Hamiltonian.
Sourcepub fn terms(&self) -> &[(Complex<f64>, PauliString)]
pub fn terms(&self) -> &[(Complex<f64>, PauliString)]
Return deterministic coefficient/operator terms.
Sourcepub fn apply(
&self,
state: &BasisState,
) -> Result<Vec<(BasisState, Complex<f64>)>, OperatorError>
pub fn apply( &self, state: &BasisState, ) -> Result<Vec<(BasisState, Complex<f64>)>, OperatorError>
Apply the Hamiltonian and combine duplicate connected states.
Sourcepub fn local_energy(
&self,
state: &BasisState,
amplitudes: &[(BasisState, Complex<f64>)],
) -> Result<Complex<f64>, OperatorError>
pub fn local_energy( &self, state: &BasisState, amplitudes: &[(BasisState, Complex<f64>)], ) -> Result<Complex<f64>, OperatorError>
Evaluate sum_b H_ab psi_b / psi_a from an explicit amplitude table.
Trait Implementations§
Source§impl Clone for ResolvedModel
impl Clone for ResolvedModel
Source§fn clone(&self) -> ResolvedModel
fn clone(&self) -> ResolvedModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more