Skip to main content

LocomotionHamiltonian

Struct LocomotionHamiltonian 

Source
pub struct LocomotionHamiltonian {
    pub hbar_eff: f32,
    pub bias: [f32; 5],
    pub couplings: [f32; 5],
}
Expand description

Locomotion Hamiltonian H_loc = H_bias + H_input + H_couple + H_phase. Generates the unitary U_tick = exp(-iHdt/hbar_eff) each frame.

Fields§

§hbar_eff: f32

Effective reduced Planck constant (engine tuning parameter).

§bias: [f32; 5]

Bias energies per mode [E_I, E_M, E_J, E_L, E_S].

§couplings: [f32; 5]

Coupling strengths between adjacent modes. Order: omega_IM, omega_MS, omega_MJ, omega_JL, omega_LI

Implementations§

Source§

impl LocomotionHamiltonian

Source

pub fn build_matrix( &self, input_bias: &[f32; 5], phase_time: f32, ) -> [Complex; 25]

Build the 5x5 Hamiltonian matrix from current parameters + input. input_bias: per-mode input contribution [b_I, b_M, b_J, b_L, b_S].

Source

pub fn compute_unitary(&self, h: &[Complex; 25], dt: f32) -> [Complex; 25]

Compute U = exp(-iHdt/hbar_eff) via second-order Taylor expansion. U = I - iHdt/hbar + (1/2)(-iHdt/hbar)^2 Sufficient for small dt.

Trait Implementations§

Source§

impl Default for LocomotionHamiltonian

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.