Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
2ab452b
implement `foreachblock`
lkdvos Mar 16, 2025
eeb0ac7
Implement `eig_full!`
lkdvos Mar 16, 2025
d969704
Use `eig_full` in `eig`
lkdvos Mar 16, 2025
d0bf282
Fix factorisation scalartype
lkdvos Mar 19, 2025
9ca844a
Add scheduler support
lkdvos Mar 19, 2025
d9acdb6
Add BlockAlgorithm
lkdvos Mar 19, 2025
52c193e
Add more matrixalgebra methods
lkdvos Mar 19, 2025
4e2b0cf
Start switching more factorizations over
lkdvos Mar 20, 2025
774b11e
Improve `svd` error messages
lkdvos Mar 20, 2025
1b47a8a
more error msg improvements
lkdvos Mar 20, 2025
e46e0f3
Properly escape macro hygiene
lkdvos Mar 20, 2025
0f7718b
Fix SVD spaces
lkdvos Mar 20, 2025
906dba9
Also return `truncerr`
lkdvos Mar 20, 2025
85b5e39
Add `setdiff` for ElementarySpace
lkdvos Apr 2, 2025
784af86
Add `qr_` implementations
lkdvos Apr 2, 2025
a9605b6
start adding truncated svd
lkdvos Apr 2, 2025
77b6fbb
patch through leftorth
lkdvos Apr 2, 2025
80b4f0e
Add `isisometry`
lkdvos May 8, 2025
4a3af28
Revert isposdef changes
lkdvos May 8, 2025
6d68f3f
preinitialize polar output
lkdvos May 8, 2025
26ca960
Bump to MatrixAlgebraKit v0.2
lkdvos May 9, 2025
ed39785
Rework left_orth
lkdvos May 9, 2025
09e64fa
Rework left_null
lkdvos May 9, 2025
f844703
include temporary tests
lkdvos May 9, 2025
ae8dd72
Change `Base.setdiff` for `ominus`
lkdvos May 27, 2025
ee232e6
change blockscheduler to type domain
lkdvos Jun 11, 2025
b259754
make block iterator loop over union of sectors
lkdvos Jun 11, 2025
cda21d3
refactor `left_orth` for new matrixalgebrakit version
lkdvos Jun 11, 2025
89ea628
Bunch of simplifications for new matrixalgebrakit versions
lkdvos Jun 11, 2025
360a991
Major overhaul
lkdvos Jun 12, 2025
7d2cff0
Clean up truncation
lkdvos Jun 12, 2025
2e16b29
Update tuple formatting
lkdvos Jun 12, 2025
86eae7e
Fix scheduler selection
lkdvos Jun 12, 2025
62c9293
Retain `dual` in `ominus`
lkdvos Jun 12, 2025
32954de
Update blockiterator
lkdvos Jun 12, 2025
c913ca4
Update svd rrule
lkdvos Jun 12, 2025
c4473c2
Update eig(h) rrule
lkdvos Jun 12, 2025
d5031b2
Implement `isposdef`
lkdvos Jun 12, 2025
a7ae652
Fix imports
lkdvos Jun 12, 2025
58cb523
Update tests and fixes
lkdvos Jun 12, 2025
485239a
Clean up tests
lkdvos Jun 13, 2025
f31dcd5
Bump minimal MatrixAlgebraKit version
lkdvos Jun 15, 2025
b99fec3
Fix uninitialized cotangents
lkdvos Jun 15, 2025
5c9a79b
Update and use `MatrixAlgebraKit.isisometry`
lkdvos Jun 15, 2025
61a1831
Fix missing export
lkdvos Jun 16, 2025
5644e7a
Implement remaining factorization rrules
lkdvos Jun 17, 2025
94550da
Implement truncated eigenvalues
lkdvos Jun 17, 2025
24748d2
Implement `TruncationKeepSorted`
lkdvos Jun 17, 2025
f9a22f2
correctly restrict type
lkdvos Jul 30, 2025
c17d7bb
canonical use of codomain as first arg
lkdvos Jul 30, 2025
6dd26b8
import Diagonal
lkdvos Jul 30, 2025
0f02734
rework algorithm selection using updated matrixalgebrakit
lkdvos Aug 6, 2025
a7a9b81
Implement singular- and eigenvalues
lkdvos Aug 6, 2025
dbc5e14
small fixes
lkdvos Aug 6, 2025
a6a0444
fix docstring
lkdvos Aug 6, 2025
bf6aaaa
remove leftpolar and rightpolar
lkdvos Aug 6, 2025
017318e
format
lkdvos Aug 6, 2025
fe1da66
Tests passing
Aug 18, 2025
628ab71
Added a few more eig/eigh/svd tests
Aug 21, 2025
660ac63
Excise MatrixAlgebra module entirely to use MatrixAlgebraKit
Aug 21, 2025
deda7ef
Restore argmax and fix AD test
Aug 21, 2025
d60abfe
Respond to comments
Aug 21, 2025
de48d87
Remove unneeded default_algorithm
Aug 21, 2025
6ee379b
clean up handling AdjointTensorMap
lkdvos Aug 31, 2025
75082ef
more adjoint specializations
lkdvos Aug 31, 2025
9fb5594
remove previous adjoint specializations
lkdvos Aug 31, 2025
782a40d
Add `similar(::DiagonalTensorMap, [::Type{T}]) -> DiagonalTensorMap`
lkdvos Sep 4, 2025
510833d
clean up handling DiagonalTensorMap
lkdvos Sep 5, 2025
a41d60a
clean up handling AdjointTensorMap
lkdvos Aug 31, 2025
b4f884f
remove previous adjoint specializations
lkdvos Aug 31, 2025
fec8a9c
move factorizations out into their own test file
kshyatt Sep 4, 2025
e82f8b6
fixup! clean up handling DiagonalTensorMap
lkdvos Sep 5, 2025
6b80f62
little bit of cleanup
lkdvos Sep 5, 2025
1ad76d4
foreachblock
lkdvos Sep 5, 2025
9a84e88
remove unused functions
lkdvos Sep 5, 2025
5a550be
formatter
lkdvos Sep 5, 2025
55f8545
more cleanup
lkdvos Sep 5, 2025
2911c0c
Updates for Diagonal and rectangular array tests
kshyatt Sep 8, 2025
847b67b
Format fix
kshyatt Sep 8, 2025
2e91d9d
Fix diagonal factorizations
kshyatt Sep 9, 2025
9297e46
Format again
kshyatt Sep 9, 2025
a2c58b6
Support QR and LQ
kshyatt Sep 9, 2025
e909f38
Bump MatrixAlgebraKit version
kshyatt Sep 10, 2025
049ec9a
fix stackoverflow
lkdvos Sep 18, 2025
657f4fc
improve BigFloat support
lkdvos Sep 18, 2025
a32f3ae
Last fixes
kshyatt Sep 20, 2025
7176114
Fix format
kshyatt Sep 20, 2025
38441ea
Add a few more Diagonal tests for coverage
kshyatt Sep 21, 2025
e493d51
Fix format again
kshyatt Sep 21, 2025
8a97299
retain `AdjointTensorMap` in factorizations
lkdvos Sep 24, 2025
6ff0835
improve deprecation
lkdvos Sep 24, 2025
529410e
cleanup
lkdvos Sep 24, 2025
a4f6d69
rework tests and more fixes and cleanup
lkdvos Sep 24, 2025
20b15a7
move deprecations to single location
lkdvos Sep 24, 2025
96630e5
type stability of rank
lkdvos Sep 24, 2025
1084853
formatter
lkdvos Sep 24, 2025
46807e5
small docs update
lkdvos Sep 24, 2025
4300722
small fixes for diagonal
lkdvos Sep 24, 2025
71a6ba2
remove more unused files
lkdvos Sep 25, 2025
783256a
fix some diagonal edge cases
lkdvos Sep 25, 2025
f31fae4
rework orths to not take allocate output first
lkdvos Sep 25, 2025
27e9470
more cleanup
lkdvos Sep 25, 2025
3a274b7
more fixes for docs
lkdvos Sep 25, 2025
19cce9d
Fix and refactor truncation tests
lkdvos Sep 26, 2025
e5ee802
fix AD tests
lkdvos Sep 26, 2025
7c5419b
rework truncation to be MatrixAlgebraKit 0.4 compliant
lkdvos Sep 26, 2025
d256ffb
rework AD rules
lkdvos Sep 26, 2025
ff9e391
Adapt to MatrixAlgebraKit v0.4.1
lkdvos Sep 29, 2025
169f324
some final small fixes
lkdvos Sep 29, 2025
b66cacf
enable AD tests on CI
lkdvos Sep 30, 2025
bb9c05a
move permutedcopy_oftype
lkdvos Sep 30, 2025
5aab602
change deprecation warning message
lkdvos Sep 30, 2025
5937544
Apply suggestions from code review
lkdvos Sep 30, 2025
b76d03c
update MatrixAlgebraKit version
lkdvos Oct 1, 2025
5631fe6
remove `truncate!`
lkdvos Oct 1, 2025
3c20424
adapt pullbacks
lkdvos Oct 1, 2025
39f20b1
remove factorization chainrules
lkdvos Oct 1, 2025
9f6761f
remove some boilerplate and disambiguate
lkdvos Oct 1, 2025
01d4f99
more careful with import and exports
lkdvos Oct 2, 2025
23b8443
copyto -> copy
lkdvos Oct 2, 2025
6c703e7
some slight test tweaks
lkdvos Oct 2, 2025
1ed898a
move factorizations folder
lkdvos Oct 2, 2025
01019af
fix some AD tests
lkdvos Oct 2, 2025
fe980c0
use truncate_space
lkdvos Oct 3, 2025
f8463bf
Update src/factorizations/truncation.jl
lkdvos Oct 3, 2025
4a5db98
final simplifications
lkdvos Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name = "TensorKit"
uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
authors = ["Jutho Haegeman"]
version = "0.14.11"
version = "0.15.0"

[deps]
LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MatrixAlgebraKit = "6c742aac-3347-4629-af66-fc926824e5e4"
OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5"
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63"
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
TensorKitSectors = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f"
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
Expand All @@ -30,8 +33,11 @@ Combinatorics = "1"
FiniteDifferences = "0.12"
LRUCache = "1.0.2"
LinearAlgebra = "1"
MatrixAlgebraKit = "0.5.0"
OhMyThreads = "0.8.0"
PackageExtensionCompat = "1"
Random = "1"
ScopedValues = "1.3.0"
Strided = "2"
TensorKitSectors = "0.1.4, 0.2"
TensorOperations = "5.1"
Expand Down
3 changes: 1 addition & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
TensorKitSectors = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f"

[compat]
Documenter = "1"
Random = "1"
TensorKitSectors = "0.1"
11 changes: 9 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
using Documenter
using Random
using TensorKit, TensorKitSectors
using TensorKit
using TensorKit.TensorKitSectors
using TensorKit.MatrixAlgebraKit
using DocumenterInterLinks

links = InterLinks("MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/",
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/")

pages = ["Home" => "index.md",
"Manual" => ["man/intro.md", "man/tutorial.md", "man/categories.md",
Expand All @@ -15,6 +21,7 @@ makedocs(; modules=[TensorKit, TensorKitSectors],
format=Documenter.HTML(; prettyurls=true, mathengine=MathJax(),
assets=["assets/custom.css"]),
pages=pages,
pagesonly=true)
pagesonly=true,
plugins=[links])

deploydocs(; repo="github.com/QuantumKitHub/TensorKit.jl.git", push_preview=true)
1 change: 1 addition & 0 deletions docs/src/lib/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ dual
conj
flip
zero(::ElementarySpace)
oneunit
supremum
Expand Down
33 changes: 14 additions & 19 deletions docs/src/lib/tensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,26 +214,21 @@ contract!

## `TensorMap` factorizations

The factorisation methods come in two flavors, namely a non-destructive version where you
can specify an additional permutation of the domain and codomain indices before the
factorisation is performed (provided that `sectorstyle(t)` has a symmetric braiding) as
well as a destructive version The non-destructive methods are given first:
The factorisation methods are powered by [MatrixAlgebraKit.jl](https://github.com/QuantumKitHub/MatrixAlgebraKit.jl)
and all follow the same strategy. The idea is that the `TensorMap` is interpreted as a linear
map based on the current partition of indices between `domain` and `codomain`, and then the
entire range of MatrixAlgebraKit functions can be called.
Factorizing a tensor according to a different partition of the indices is possible
by prepending the factorization step with an explicit call to [`permute`](@ref) or [`transpose`](@ref).

```@docs
leftorth
rightorth
leftnull
rightnull
tsvd
eigh
eig
eigen
isposdef
```
For the full list of factorizations, see [Decompositions](@extref MatrixAlgebraKit).

The corresponding destructive methods have an exclamation mark at the end of their name,
and only accept the `TensorMap` object as well as the method-specific algorithm and keyword
arguments.
Additionally, it is possible to obtain truncated versions of some of these factorizations
through the [`MatrixAlgebraKit.TruncationStrategy`](@ref) objects.

The exact truncation strategy can be controlled through the strategies defined in [Truncations](@extref MatrixAlgebraKit),
but for `TensorMap`s there is also the special-purpose scheme:

TODO: document svd truncation types
```@docs
truncspace
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module TensorKitChainRulesCoreExt
using TensorOperations
using VectorInterface
using TensorKit
using TensorKit: foreachblock
using ChainRulesCore
using LinearAlgebra
using TupleTools
Expand All @@ -15,6 +16,5 @@ include("utility.jl")
include("constructors.jl")
include("linalg.jl")
include("tensoroperations.jl")
include("factorizations.jl")

end
Loading