qttools.fft#
source package qttools.fft
Functions
-
fft_convolve — Computes the convolution of two arrays using FFT over the first axis (energy axis).
-
fft_circular_convolve — Computes the circular convolution of two arrays using the FFT.
-
fft_convolve_kpoints — Computes the convolution of two arrays using the FFT.
-
fft_correlate_kpoints — Computes the correlation of two arrays using FFT.
source fft_convolve(a: NDArray, b: NDArray) → NDArray
Computes the convolution of two arrays using FFT over the first axis (energy axis).
Parameters
-
a : NDArray — First array.
-
b : NDArray — Second array.
Returns
-
NDArray — The convolution of the two arrays.
source fft_circular_convolve(a: NDArray, b: NDArray, axes: tuple[int]) → NDArray
Computes the circular convolution of two arrays using the FFT.
Parameters
-
a : NDArray — First array.
-
b : NDArray — Second array.
-
axes : tuple[int] — The axes over which to perform the convolution.
Returns
-
NDArray — The circular convolution of the two arrays.
source fft_convolve_kpoints(a: NDArray, b: NDArray) → NDArray
Computes the convolution of two arrays using the FFT.
The first axis is assumed to be the energy axis, the other axes are k-points and the last axis is the orbital index.
Over the k-point axes, a circular convolution is performed.
Parameters
-
a : NDArray — First array.
-
b : NDArray — Second array.
-
Returns
-
-------
-
NDArray — The convolution of the two arrays.
source fft_correlate_kpoints(a: NDArray, b: NDArray) → NDArray
Computes the correlation of two arrays using FFT.
The first axis is assumed to be the energy axis, the other axes are k-points and the last axis is the orbital index.
Over the k-point axes, a circular correlation is performed.
Parameters
-
a : NDArray — First array.
-
b : NDArray — Second array.
Returns
-
NDArray — The cross-correlation of the two arrays.