From f6eb94d7f21acb7b7bacfbd252033690c541f7ec Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Mon, 14 Sep 2026 10:55:42 -0400 Subject: [PATCH] Release TensorAlgebra v0.20 Fewer copies in tensor factorizations and contractions: a backend now declares whether its matricized form is a view, so a factorization runs in the operand's own storage and hands its buffer to the output rather than copying in and back out. Breaking: `matricize` goes through `ismatricizeview`, `matricizeview` and `matricizecopy`, replacing `matricizekind` and `matricizepermaliases`. Also restores precompilation on Julia LTS. Co-Authored-By: Claude Opus 5 (1M context) --- Project.toml | 2 +- src/factorizations.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 689ff5e5..50f87a01 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TensorAlgebra" uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" -version = "0.20.0-DEV" +version = "0.20.0" authors = ["ITensor developers and contributors"] [workspace] diff --git a/src/factorizations.jl b/src/factorizations.jl index 5f108cf3..1ab39631 100644 --- a/src/factorizations.jl +++ b/src/factorizations.jl @@ -842,8 +842,8 @@ partition is specified either via labels or directly through a bi-permutation; fused codomain and domain sizes must match. `A` is treated as a shape prototype and is not mutated. -Not exported, since exporting would clash with the implicit `Base.one`. Qualify -as `TensorAlgebra.one(A, ...)`. +A tensor generalization in its own right, not an extension of `Base.one`, so it is neither +exported nor imported. Qualify as `TensorAlgebra.one(A, ...)`. See also `MatrixAlgebraKit.one!`. @@ -862,7 +862,7 @@ julia> matricize(Id, Val(2)) ≈ I true ``` """ -one +function one end function one!!(style::MatricizeStyle, A, ndims_codomain::Val; kwargs...) A_mat = matricize(style, A, ndims_codomain)