Hi everyone,
Together with @juthohaegeman, I’m excited to announce the release of TensorKit.jl v0.13, a Julia package designed for large-scale tensor computations with a touch of category theory. This release brings a number of performance enhancements and simplifications to the data structures, particularly for symmetric tensors involving complex fusion trees. We expect a significant reduction in overhead in such cases.
Breaking Changes:
-
Scalar Type Parameter: The scalar type (
eltype) is now an explicit parameter in the AbstractTensorMap type, and appears in the first position. Consequently, you should now useTensorMap{T}(undef, codomain ← domain)to create a TensorMap with uninitialized data of scalar typeT. -
Updated Tensor Constructors: The previous form
TensorMap(randn, T, codomain ← domain)is being replaced byrandn(T, codomain ← domain). We now overloadrand,randn, andrandexpfrom the Random module, mimicking the constructors forArray. You can also pass a custom random number generator as the first argument. Note thatT(the scalar type) is optional and defaults toFloat64. The old constructors are still available but in deprecation mode and will be removed in the 1.0 release. -
TensorMap Structure: The
TensorMapdata structure has been simplified, with all tensor data now stored in a single<:DenseVector. While this does not change the interface,TensorMapobjects saved with TensorKit.jl v0.12.7 or earlier (e.g., using JLD2.jl) are not compatible with this new version. We provide a script to help migrate data for v0.13 compatibility.
Major Non-Breaking Changes:
-
Support for TensorOperations.jl v5: TensorKit.jl now supports TensorOperations.jl v5, which introduces new backend and allocator support in the @tensor macro. This includes using Bumper.jl for managing intermediate tensors.
-
Separation of Sector Types: The
Sectortype hierarchy and its corresponding interface have been moved to TensorKitSectors.jl. This package is now a direct dependency of TensorKit.jl and is re-exported to ensure backward compatibility while allowing other packages to use it as a lightweight dependency. -
fusiontreesIterator Update: The fusiontrees iterator now processesFusionTreeobjects in a different order, improving the performance of certain future operations. It also accepts aProductSpaceas input, rather than just a tuple ofSectorobjects, which also affects the ordering of data inTensorMapobjects. -
Improved Structural Information Handling: The structural information for
TensorMapobjects (linked to theirHomSpace) is now cached globally, eliminating the need for recalculation when creating newTensorMapinstances. This change reduces overhead, particularly in scenarios where such computations are frequent.
We hope these updates improve your experience with TensorKit.jl, especially when working with symmetric tensors. As always, we welcome any feedback, issues, comments or feature requests.