pub struct MetalOperator<'a> { /* private fields */ }Expand description
A sparse Hamiltonian resident on the GPU.
Implementations§
Source§impl MetalOperator<'_>
impl MetalOperator<'_>
Sourcepub fn kpm_moments(
&self,
starts: &[Vec<c64>],
kernel: &[f64],
) -> Result<Vec<c64>, GpuError>
pub fn kpm_moments( &self, starts: &[Vec<c64>], kernel: &[f64], ) -> Result<Vec<c64>, GpuError>
KPM moments μ_n = kernel_n · mean_r ⟨r| T_n(H̃) |r⟩, n = 0..kernel.len(), all start
vectors at once, with the doubling relations (as caroli_kpm::block_moments).
Sourcepub fn propagate(
&self,
coefficients: &[c64],
psi: &mut [c64],
vectors: usize,
steps: usize,
) -> Result<(), GpuError>
pub fn propagate( &self, coefficients: &[c64], psi: &mut [c64], vectors: usize, steps: usize, ) -> Result<(), GpuError>
steps propagation steps ψ ← Σ_n c_n T_n(H̃) ψ (coefficients from
caroli_dynamics::Chebyshev) for a block of vectors wave functions stored
interleaved (ψ[row·vectors + v], as SparseMatrix::apply_block).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MetalOperator<'a>
impl<'a> !Send for MetalOperator<'a>
impl<'a> !Sync for MetalOperator<'a>
impl<'a> !UnwindSafe for MetalOperator<'a>
impl<'a> Freeze for MetalOperator<'a>
impl<'a> Unpin for MetalOperator<'a>
impl<'a> UnsafeUnpin for MetalOperator<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<T, U> Imply<T> for U
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