Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Guidelines for updating this changelog
When making changes to this project, please update the "Unreleased" section with your changes under the appropriate category:
- Added for new features.
- Changed for changes in existing functionality.
- Deprecated for soon-to-be removed features.
- Removed for now removed features.
- Fixed for any bug fixes.
- Performance for performance improvements.
When releasing a new version, move the "Unreleased" changes to a new version section with the release date.
Unreleased
Added
Changed
Deprecated
Removed
Fixed
Performance
0.17.2 - 2026-09-20
Added
- Precompilation workloads for common tensor construction, contraction, index manipulation, and factorization patterns, to reduce time-to-first-use (#487)
- TimerOutputs-based timers for internal kernels, and documentation for the global cache API, to aid profiling and debugging (#525, #507)
- Enzyme forward/reverse rules for
flip,insertleftunit,insertrightunit, andremoveunit, and for planar operations (#488, #489, #474) planarcontract!now supports an arbitrary (cyclic) output permutationpAB, in the same way as the non-planartensorcontract!, along with the new helperTensorKit.planar_contract_indices, which@planaruses to emit canonical index tuples. (#531)
Changed
- For sector types with
GenericUnitsuch that colorings are not unique,GradedSpace,ProductSpaceandHomSpacenow check for this compatibility. In particular, this prevents the construction ofTensorMaps with incompatible colorings, which previously either errored or produced empty tensors inconsistently. (#515) TensorOperations.tensorcontract_structurenow requires the index tuplespAandpBto be planar (cyclic) partitions for sector types withGenericUnit(); hand-written planar kernels should canonicalize their index tuples withTensorKit.planar_contract_indicesbefore allocating. (#531)- The allocator is now threaded through
transpose!in planar operations and through additional@planarcall sites (#502, #529) - Index manipulations use a single kernel operating on subblocks addressed by position:
StridedSubblocks(sector-independent views into the flat data of aTensorMap) orSubblockIterator(anyAbstractTensorMap, throughsubblock). TheTreeTransformers store the mapping between subblock positions and recoupling coefficients and are cached for every tensor type; conjugated and adjoint operands are handled through this mechanism instead of throughAdjointTensorMapwrappers (internal) (#516)
Deprecated
- The type alias
ZNSpace{N}is deprecated in favour ofVect[ZNIrrep{N}]orRep[ℤ{N}]: a type alias cannot compute the storage type fromN, so the two only agree for smallN. (#511)
Removed
Fixed
- Fixed bugs in the
GradedSpaceconstructor and insimilarforSectorVector(#498) braidfor anyonic sectors no longer silently accepts duplicatelevels(#503)- Fixed backend and allocator insertion in the
@planarmacro (#505) permuteandtransposeChainRules rules now support all keyword arguments (#513)- Added a
hashmethod forFusionTreeBlockto fix a caching bug affectingpermuteonAdjointTensorMaps (#518) @planarand hand-written planar kernels now canonicalize index partitions before allocating the contraction destination, fixing incorrect/erroring allocation for non-planarpAB, for@planarcontractions whose leg-wise partitions are non-planar by themselves, and for contracting operands with differentspacetypes (e.g. aBlockTensorMapwith aTensorMap) (#532)braid!,permute!andtranspose!with aBraidingTensorsource now use the cached fusion tree transformers (#516)- Made the ChainRules extension's rules consistent with the corresponding Mooncake and Enzyme rules (#535)
isunitspace,GradedSpace⊕/supremum,isconj(::ComplexSpace),multi_associator,split,repartition, the Mooncakescalarrule,rand/randn/randexp/randisometrywith an explicitrng,pinv(::DiagonalTensorMap), andt1 / t2: fixed various small bugs found during a pre-release audit (#537, #538, #539, #540, #541, #542, #543, #544, #545, #546)
Performance
GradedSpaceoperations (dim,flip,⊕,⊖,fuse,infimum,supremum, truncation) are now specialised on the storage type of the degeneracy dimensions, and tuple storage is used only for sector types with at mostTensorKit._NTUPLE_STORAGE_THRESHOLDsectors so that sector types with many sectors no longer burden the compiler. (#511)- Fixed a performance regression for non-abelian index manipulations, and reduced memory usage of
twist(#521, #501) - More error strings marked as lazy to reduce runtime overhead in non-error paths (#492)
- Use vector multiplication instead of an explicit loop for truncation error computation (#443)
- In-place
permute!,braid!andtranspose!withAdjointTensorMapsources or destinations, as well as@tensorexpressions withconj, now use the same cached and sector-independent kernel as plainTensorMaps; other tensor types (e.g.DiagonalTensorMap) also use the cached fusion tree transformers, andsubblocksiterates without repeating any space-level lookup (#516, #519, #520)
0.17.1 - 2026-07-13
Added
- Enzyme AD support: forward and reverse rules (with tests) for TensorOperations contractions, linear algebra, and VectorInterface operations, and reverse rules for index manipulations (#436, #437, #440, #449, #451, #466)
exponentialandexponential!for the matrix exponential of tensors (#465)- Docstrings for
catdomainandcatcodomain(#485)
Changed
- Consolidated duplicated GPU logic into a new GPUArrays extension (#460)
- Removed explicit dependence on cuTENSOR for the CUDA extension; importing
cuTENSORis still recommended for best performance, as it enables the corresponding TensorOperations extension (#455) - Improved
DimensionMismatcherror message in theTensorMapconstructor (#456)
Fixed
- Added missing zero-derivatives and an in-place rrule test for
svd_trunc(#448)
Performance
- Reduced overhead in the
TensorMapconstructor and insectorequal/sectorhashfor trivial symmetries (#476) - Further trivial-symmetry improvements and reduced respecialization for
contract!(#479) - Fast path for trivial tensors into the TensorOperations machinery (#463)
- Marked more error strings as lazy to reduce runtime overhead (#478)
0.17.0 - 2026-06-03
Added
- Allow
BraidingTensorto have a custom storage type (#393) remove_gauge_dependence!overloads (#419)- Mooncake forward rules for linear algebra functions (#434)
- Support for broadcasting and mapping over
HomSpaceandProductSpace, where broadcasting overProductSpacenow returns a tuple (#430, #431)
Changed
- Reworked the index manipulation API, adding backend and allocator support while uniformizing the API, with accompanying documentation (#416, #438)
- Bumped minimum version of CUDA and cuTENSOR (#404)
Fixed
- Correct Artin braid image (#441)
- Fix cache miss due to ignored dual flag in
foldright(#442) - Improvements to bypass scalar indexing and improve GPU support (#375)
- Compatibility with SUNRepresentations v0.4 type parameter change (#426)
0.16.5 - 2026-05-01
Added
- Implement
DefaultAlgorithmsupport (#422)
Fixed
0.16.4 - 2026-04-23
Added
- Partial tensor support for AMDGPU via a new extension (#341)
- Define
spacetypeforTruncationSpace(#403)
Changed
- Updated MatrixAlgebraKit dependency to v0.6.5 with corresponding API updates (#390)
Fixed
- Fix ignored
adjointflag inBraidingTensor(#392) - Fix
MethodErrorfor certain tensor operations (#406) - Add square checks for
project_(anti)hermitianand eigenvalue decompositions (#408)
Performance
- Vectorize fusiontree manipulations (#261)
- Avoid generic matmul fallback in transformation kernel (#378)
- Reduce cache footprint by decoupling degeneracy-dependent data (#387)
0.16.3 - 2026-02-22
Added
Changed
- Documentation improvements and updates (#345)
Fixed
- Small fixes for upstream compatibility and CUDA support, including
Base.ones/zerosacceptingCuArray(#373)
0.16.2 - 2026-02-10
Added
- A more robust promotion system for
storagetypes to better handle working with unions and other abstract tensor map types (#370).
Fixed
- Fix
findtruncatedwithtruncspace(#369) - Fix
truncrankwhen kept rank is larger than input (#368) - Added missing
similardefinition forSectorVector(#367) - Small fixes for CUDA support (#366)
0.16.1 - 2026-02-05
Added
- Extended support for selecting storage types in the
TensorMapconstructors (#327) similar_diagonalto handle storage types when constructing diagonals (#330)- Support for CUDA.jl (#336,#325)
- Support for Adapt.jl (#344)
- Preliminary support for Mooncake (#352)
- Export
TimeReversedsymbol (#337)
Fixed
- Issue with using relative tolerances in truncation schemes (#314)
- Using
scalartypeinstead ofeltypein BLAS contraction (#326) - Divide by zero error in
showfor empty tensors (#329) svd_vals(::DiagonalTensorMap)correctly outputsSectorVectorand implementation fix. (#333)- Fix handling of real tensors with complex scalartype (#360)
- Sorted diagonal eigenvalues to ensure consistent ordering (#350)
- Adding tensors of different types now correctly promotes (#364)
Changed
convert(TensorMap, t)now retainsstoragetypewhen converting (#357)transposespecialization forDiagonalTensorMapfor improved correctness/performance (#335)- Uniformized
CartesianSpaceandComplexSpaceconstructors (#334)
Performance
- GPU-friendly truncation implementations (#349)
normperformance optimizations (#351)- TensorOperations ChainRules performance improvements (#343)
- Type-stability and small test fixes (various commits)
0.16.0 - 2025-12-08
Added
rrulefortransposeoperation (#319)- New functions for multifusion support:
unitspace,zerospace,leftunitspace,rightunitspace,isunitspace(#291) - Support for projections and orthogonal complements (#312)
Changed
- Improvements to the default printing of tensors, where only a (possibly compressed) representation of the (possibly truncated) list of diagonal blocks is printed. Use
blocks(t)andsubblocks(t)for a full inspection of the tensor data (#304, #322)) - Updated
left_orth,right_orth,left_nullandright_nullinterfaces for MatrixAlgebraKit v0.6 (#312) - Updated
ishermitianandisisometricimplementations (#312) - Sector functions now by default use
unitinstead ofone,isunitinstead ofisone, anddualinstead ofconj(#291) - Reworked TensorOperations implementation to use backend and allocator system (#311)
- Major documentation update/overhaul (#289)
- Added symmetric tensor tutorial as appendix (#316)
- Improved error messages throughout codebase (#309)
eigvalsandsvdvalsnow outputSectorVectorobjects, which do behave asAbstractVectorbut also have the option of iterating the blocks throughBase.pairs. (#324
Deprecated
Removed
- All deprecations from v0.15: old factorization function names (
leftorth,rightorth,tsvd,eig,eigh) - Old truncation strategy names (
truncdim,truncbelow) - Old factorization struct types (
OrthogonalFactorization) - Old constructor syntaxes and deprecated
rand*function names
Fixed
- Avoid unnecessary copy in
twistfor tensors with bosonic braiding (#305) - Small fixes and typos (#295)
eig_vals,svd_vals, etc now all outputSectorVectorobjects instead ofDiagonalTensorMaps, in line with how MatrixAlgebraKit returnsVectors instead ofDiagonals (#324
0.15.3 - 2025-10-30
Fixed
- Fixed typo in
show(::GradedSpace)(#308) - Updated printing of
ProductSpace{<:Any,0} - Added tests for show methods
0.15.2 - 2025-10-28
Added
subblocksiterator for easier inspection of tensor data (#304)
Changed
- Tensors no longer print their data by default, only their spaces. Use
blocks(t)orsubblocks(t)to inspect data (#304) - Updated compatibility to TensorKitSectors v0.3 (#290)
- Refactored test suite and split into groups (#298)
Fixed
- Fixed
TruncationIntersectionimplementation and test (#300) - Avoided unnecessary allocations in rrules for contractions and tensor products (#306)
0.15.1 - 2025-10-09
Fixed
- Small fixes and typo corrections (#295)
0.15.0 - 2025-10-03
Added
- MatrixAlgebraKit as new backend for tensor factorizations (#230)
foreachblock(f, t::AbstractTensorMap...)- uniform interface to iterate through tensor blockseig_truncandeigh_trunc- truncated eigenvalue decompositionsominus(and unicode⊖) - compute orthogonal complement of a space- Backend selection for factorizations - swap algorithms or implementations
Changed
left_orthandright_orthnow always output tensors with a single connecting spaceleft_orthandright_orthnow always have connecting space withisdual=false- Code formatter is now Runic.jl
Deprecated
- Factorization functions
leftorth,rightorth,tsvd,eig,eighin favor of MatrixAlgebraKit variants (left_orth,right_orth,svd_compact,eig_full,eigh_full) - Truncation strategies:
truncdim(usetruncrank) andtruncbelow(usetrunctol) OrthogonalFactorizationstructs (constructors deprecated to return equivalent MatrixAlgebraKit algorithm structs)
Removed
- Direct permute-and-factorize operations (incompatible with
permutevsbraiddistinction) Polardecomposition behavior forleft_orth/right_orth(useleft_polar/right_polarinstead forisposdefR factors)
0.14.0 - 2024-12-19
Added
DiagonalTensorMaptype for representing tensor maps with diagonal blocksreduceddim(V)function that sums up degeneracy dimensions for each sector- New index manipulation functions:
flip(t, i)insertleftunit(t, i)insertrightunit(t, i)removeunit(t, i)
Changed
- Singular values and eigenvalues now explicitly represented as
DiagonalTensorMapinstances - SVD truncation now guarantees smaller singular values are removed first, irrespective of sector quantum dimension
0.13.0 - 2024-11-24
Added
- Refactored
TensorMapconstructors to align with JuliaArrayconstructors - Convenience constructors:
ones,zeros,rand,randnfor tensors - TensorOperations v5 support
Changed
- Scalar type as parameter to
AbstractTensorMaptype:AbstractTensorMap{E, S, N₁, N₂} - Default way to create uninitialized tensors is now
TensorMap{E}(undef, codomain ← domain) - Behavior of
copyforBraidingTensorto properly instantiate aTensorMap - TensorKitSectors promoted to separate package
TensorMapdata structure now consists of single vector with blocks as viewsFusionTreevertices now only useIntlabels forGenericFusionsectors