Skip to content

v0.3.0

Latest

Choose a tag to compare

@shinaoka shinaoka released this 08 Nov 00:26
· 405 commits to main since this release
dcd0e7f

Not published to crates.io (decision 2026-11-08: tags only, no registry release for now).
Downstreams that pin a git revision should use this tag.

v0.3.0

Breaking Rust API changes

Fixed-rank randomized factorization (#1108) and the partitioned TreeTN error
enum are breaking pre-1.0 Rust API changes designated for the next minor
release. The following changes break exhaustive matches, complete struct
literals, or named public types:

  • tensor4all-partitionedtreetn: PartitionedTreeTNError gained the
    RefinementTooLarge { atoms, limit } variant (#1143) and is now
    #[non_exhaustive]. Both land in this release, so an exhaustive match breaks
    once: add a wildcard arm, and later variants stay additive.

  • tensor4all-core: FactorizeAlg::RSVD and
    FactorizeError::UnsupportedTruncationPolicy are new enum variants.
    FactorizeOptions adds randomized and rsvd_seed. Update exhaustive
    matches and use the options constructors or ..Default::default() in
    struct literals.

  • tensor4all-treetn: ContractionOptions and FitOptions add randomized
    and rsvd_seed. FitUpdater gains a lifetime parameter for the borrowed
    execution strategy and RNG. Update named types and complete struct literals.

  • tensor4all-simplett: remove the unimplemented FactorizeMethod::RSVD
    variant and its unused rsvd_p/rsvd_q options. New randomized consumers
    use the core and TreeTN APIs.

  • tensor4all-capi: remove the unused Rust From<FactorizeAlg> conversion
    to the C enum. The C ABI and C enum values are unchanged.

  • tensor4all-tensorbackend: ScalarValue (the dynamic scalar value) and
    ScalarTensorElement (its construction trait) are now public here and are the
    only definitions; tensor4all-core dropped its private copies and uses these.
    BackendScalar and AnyScalar remain the two wrappers. The new public surface
    is additive; the removed core items were pub(crate), so no external caller
    loses a path.

Fixed

  • abs() of a c32 scalar is now formed in f64 (hypot after widening the
    parts) instead of computing the modulus in f32 and widening the result, so
    BackendScalar::abs and AnyScalar::abs agree bit-for-bit. Values change only
    by the last bits of the former f32 norm.
  • abs() of an integer scalar widens before taking the absolute value, so
    i32::MIN and i64::MIN no longer overflow (debug panic / negative result in
    release).

Added

  • Dense fixed-rank RSVD, Gaussian range finding, caller-owned RNG entries,
    and RSVD selection in TreeTN Fit and Zipup. Supported scalar types are
    f64 and Complex64; f32 and Complex32 are unsupported.

Public-API renames and removals since v0.2.0

The sections above record release impact; this one is the porting list. It names
the public Rust API and C API items that existed at v0.2.0 and no longer exist
at this tag, grouped by crate. Each entry cites the commit that made the change
(12 hex digits) and the pull request. Additions are not listed here — read the
rustdoc for those. Nothing is published to crates.io; depend on the tag as
described in README.md.

Crate-level changes

  • tensor4all-tcicore was dissolved into tensor4all-core — 5396d0d25bbd,
    #639, #642. The public modules cached_function, indexset, matrixaca,
    matrixlu, matrixluci (with cache_key, error, index_int, scalar,
    traits), the types CachedFunction, IndexSet, MultiIndex, LocalIndex,
    MatrixACA, MatrixLUCI, MatrixLuciFactors, RrLU, RrLUOptions, the
    traits AbstractMatrixCI, CacheKey, IndexInt, Scalar, and the error
    enums CacheKeyError and MatrixCIError moved to tensor4all-core; their
    inherent methods moved with them. The crate itself no longer exists. Two
    other removals landed in the crate before it was dissolved: rrlu_inplace —
    7d263fadb7ef, #595; PivotKernelOptions::max_rank and
    RrLUOptions::max_rank — 9a77ac651643, #599.
  • tensor4all-partitionedtt was replaced by the new tensor4all-partitionedtreetn
    crate — 8ee92420e528, #915 D3, #1005. PartitionedTT, SubDomainTT,
    Projector, PatchingOptions (fields max_bond_dim, patch_order, rtol),
    PartitionedTTError with its seven variants, Result, and their inherent
    methods are gone. Before that removal: data_mut, get_mut, values_mut —
    2b11f7fe564a, #649; SubDomainTT::siteinds — 7d263fadb7ef, #595;
    PartitionedTTError::TensorTrainError — 928c567b922e, #589.

tensor4all-core

  • 7d263fadb7ef, #595 — replaceinds renamed to replace_indices and
    replaceinds_in_place to replace_indices_mut; removed as_slice_f64 and
    as_slice_c64 (use the generic to_vec::<f64>() / to_vec::<Complex64>()).
  • a93f582c202f, #612 — TensorDynLen renamed to IdxTensor, the module
    tensordynlen to idx_tensor, and the constructor diag_tensor_dyn_len to
    diag_idx_tensor. The indices field is a separate change, below.
  • 6e0d55800018, #1024 — the indices field of IdxTensor (public at
    v0.2.0) became pub(crate); read it through IdxTensor::indices().
  • 9a77ac651643, #599 — SvdOptions::max_rank and FactorizeOptions::max_rank
    renamed to max_bond_dim; with_max_rank renamed to with_max_bond_dim.
  • 2c972983e594, #616, #643 — index_ops::hasinds

See CHANGELOG.md in the tree for the complete list.