Explore refactoring array handling in a separate module.
- Ideally similar to
pulser.math
- Type aliases could simplify type hints
from typing import TypeAlias
Array: TypeAlias = npt.NDArray[np.float64] | torch.Tensor
ArrayLike: TypeAlias = npt.ArrayLike | Array
Benefits:
- reusing numpy/torch array handling in other parts of the library, mostly waveforms
Explore refactoring array handling in a separate module.
pulser.mathBenefits: