qimpy.math

Math functions extending the core torch set.

Functions

prime_factorization

Get list of prime factors of N in ascending order

fft_suitable

Check whether N has only small prime factors.

ceildiv

Compute ceil(num/den) with purely integer operations

cis

Compute complex exponential exp(i x).

abs_squared

Compute absolute value squared of complex or real tensor.

dagger

Conjugate transpose of a batch of matrices.

accum_norm_

Accumulate \(f |x|^2\) to out in-place.

accum_prod_

Accumulate \(f x y\) to out in-place.

ortho_matrix

Return orthonormalization matrix of a basis.

eighg

Solve Hermitian generalized eigenvalue problem.

Classes

RadialFunction

Set of radial functions in real and reciprocal space.

Modules

qimpy.math.spherical_harmonics

Calculate spherical harmonics and their product expansions.

qimpy.math.spherical_bessel

Calculate spherical Bessel functions.

qimpy.math.quintic_spline

Generate and evaluate quintic (fifth-order) splines.