numba#
Includes our Numba inplace kernels.
Modules:
-
inplace–Includes our Numba inplace kernels.
Functions:
-
scatter_add_scaled–Adds array
bto arrayaat indicesindsin-place. -
scatter_add_scaled_obc–Adds array
bto arrayaat indicesindin-place with OBC repetitions.
scatter_add_scaled
#
scatter_add_scaled(a: NDArray, b: NDArray, inds: NDArray, alpha: complex128, conjugate: bool) -> None
Adds array b to array a at indices inds in-place.
Parameters:
-
a(NDArray) –The array to be updated.
-
b(NDArray) –The array to be added to
a. -
inds(NDArray) –The indices at which to add
btoa.
scatter_add_scaled_obc
#
scatter_add_scaled_obc(a: NDArray, b: NDArray, inds: NDArray, k: tuple[float, float], transverse_repetition_grid: tuple[int, int], alpha: complex128)
Adds array b to array a at indices ind in-place with OBC repetitions.
Parameters:
-
a(NDArray) –The array to be updated.
-
b(NDArray) –The array to be added from
a. -
inds(NDArray) –The indices at which to subtract
bfroma. The indices are assumed unique. If there are duplicates, the behavior is undefined due to potential race conditions. -
k(tuple[float, float]) –The transverse wavevector components.
-
transverse_repetition_grid(tuple[int, int]) –The transverse repetition grid of the contact.
-
alpha(complex128) –The scaling factor.