Trait qmc::sse::qmc_traits::diagonal::Hamiltonian [−][src]
pub trait Hamiltonian<'a> { fn hamiltonian(
&self,
vars: &[usize],
bond: usize,
inputs: &[bool],
outputs: &[bool]
) -> f64; fn edge_fn(&self, bond: usize) -> (&'a [usize], bool); fn num_bonds(&self) -> usize; }
Expand description
An object which provides all required details of the hamiltonian.
Required methods
fn hamiltonian(
&self,
vars: &[usize],
bond: usize,
inputs: &[bool],
outputs: &[bool]
) -> f64
[src]
&self,
vars: &[usize],
bond: usize,
inputs: &[bool],
outputs: &[bool]
) -> f64
Expand description
Maps (vars, bond, inputs, outputs) to a float matrix element.
fn edge_fn(&self, bond: usize) -> (&'a [usize], bool)
[src]
Expand description
Give edges for a bond, and if the bond is a constant.
fn num_bonds(&self) -> usize
[src]
Expand description
The number of bonds which exist.