Skip to main content

Aleph - 0.26.0

๐Ÿš€ Highlightsโ€‹


  • Scalar-type-independent factory function names for improved ergonomics when building tensors.
  • New tensor shape manipulation methods: transpose, flatten, and squeeze.
  • Element-wise tensor-scalar operations: addition, subtraction, multiplication, and division.
  • Unified API: random_tensor, filled_tensor, zero_tensor, delta_tensor, uninitialized_tensor.

โœจ New Featuresโ€‹


  • Real and complex tensors now support .conjugate().
  • Tensor Method transpose(tensor, permutation): permutes tensor dimensions with validation.
  • Tensor Method flatten(tensor): reshapes tensor into a order 1 tensor.
  • Tensor Method squeeze(tensor): removes all dimensions of size 1 from a tensor.
  • Tensor-Scalar Operations: tensor + scalar, scalar + tensor, tensor - scalar, scalar - tensor for element-wise arithmetic.

๐Ÿ›  Improvementsโ€‹


๐Ÿ› Fixesโ€‹


  • Improved numerical stability of DMRG with large numbers of sites.

โš™๏ธ Internal / Technical Changesโ€‹


  • Re-implement tensor contraction to reduce compile times.

โš ๏ธ Breaking Changesโ€‹


  • Tensor factory functions renamed: random_real_tensor โ†’ random_tensor, filled_complex_tensor โ†’ filled_tensor, etc...
    • All factory calls can specify the scalar type by parameters: as_real or as_complex (e.g., random_tensor([2, 3], as_complex)).
    • Default scalar type is complex; You must use as_real for real-valued tensors.

๐Ÿงช Migration Notesโ€‹