Skip to content

numba#

Includes our Numba inplace kernels.

Modules:

  • inplace

    Includes our Numba inplace kernels.

Functions:

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 b to a.

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 b from a. 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.