Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
89eeec1
add `arrayify` for adjoint tensor
lkdvos Jan 17, 2026
f24f95d
add vectorinterface rules
lkdvos Jan 17, 2026
11e7ab8
add tensoroperations rules
lkdvos Jan 17, 2026
612d4e4
add indexmanipulations rules
lkdvos Jan 18, 2026
98630aa
add mul rules
lkdvos Jan 20, 2026
0119ffa
temporarily disable Fibonacci (complex) spaces
lkdvos Jan 20, 2026
11b1ba9
bump TupleTools compat
lkdvos Jan 20, 2026
5792a3d
add twist! rule
lkdvos Jan 21, 2026
f079f2b
add flip rule
lkdvos Jan 21, 2026
9da8850
vector spaces arent vector spaces!
lkdvos Jan 21, 2026
139da3c
insert and remove units
lkdvos Jan 21, 2026
a77fa7a
mark a bunch of things as non-differentiable
lkdvos Jan 21, 2026
33112ac
rewrite rule for `tensortrace!` in terms of `trace_permute!`
lkdvos Jan 21, 2026
17ab207
dont need rules for `tensoradd!`
lkdvos Jan 21, 2026
e294771
add planaroperations
lkdvos Jan 22, 2026
1401e05
rewrite rule `tensorcontract` in terms of `blas_contract!`
lkdvos Jan 22, 2026
f8a60d9
add rule `tr`
lkdvos Jan 22, 2026
fe1d6ae
give up on planartrace for now
lkdvos Jan 22, 2026
ee1b939
add rule `inv`
lkdvos Jan 22, 2026
a57b894
is_primitive in namespace
lkdvos Jan 22, 2026
ee22140
share more code
lkdvos Jan 22, 2026
292d03a
split AD tests to reduce CI pressure
lkdvos Jan 22, 2026
5e13bbf
add missing imports
lkdvos Jan 22, 2026
082ad92
remove the use of the internal `Mooncake._rdata`
lkdvos Jan 26, 2026
cb5f7c1
add comments about `NoRData()`
lkdvos Jan 26, 2026
88fdfee
add TODO
lkdvos Jan 26, 2026
5e3c8e5
correctly implement `_needs_tangent`
lkdvos Jan 29, 2026
18154c4
update to Mooncake 0.5
lkdvos Jan 29, 2026
93a0186
add TensorMap tangent type
lkdvos Jan 29, 2026
e8fcc3f
fix stupid tolerance mistake
lkdvos Jan 29, 2026
cf02d33
enable complex tests
lkdvos Jan 29, 2026
ea91a29
add tangent type test
lkdvos Jan 29, 2026
37959dc
correct output type for `A * B` with complex sector types
lkdvos Jan 29, 2026
fe3b92d
correct arrayify
lkdvos Jan 29, 2026
3127bff
fix indexmanipulations
lkdvos Jan 29, 2026
33c6e81
bump versions
lkdvos Jan 29, 2026
39d8d76
promote scalartype for complex sectors
lkdvos Jan 29, 2026
ffe0e9a
deal with more complex sector shenanigans
lkdvos Jan 29, 2026
6637549
properly accumulate
lkdvos Jan 29, 2026
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
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
- symmetries
- tensors
- other
- autodiff
- mooncake
- chainrules
os:
- ubuntu-latest
- macOS-latest
Expand All @@ -55,7 +56,8 @@ jobs:
- symmetries
- tensors
- other
- autodiff
- mooncake
- chainrules
os:
- ubuntu-latest
- macOS-latest
Expand Down
18 changes: 12 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TensorKit"
uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
authors = ["Jutho Haegeman, Lukas Devos"]
version = "0.16.0"
authors = ["Jutho Haegeman, Lukas Devos"]

[deps]
LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
Expand All @@ -22,8 +22,8 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"

[extensions]
TensorKitAdaptExt = "Adapt"
Expand All @@ -34,6 +34,7 @@ TensorKitMooncakeExt = "Mooncake"

[compat]
Adapt = "4"
AllocCheck = "0.2.3"
Aqua = "0.6, 0.7, 0.8"
ArgParse = "1.2.0"
CUDA = "5.9"
Expand All @@ -44,8 +45,8 @@ FiniteDifferences = "0.12"
GPUArrays = "11.3.1"
LRUCache = "1.0.2"
LinearAlgebra = "1"
MatrixAlgebraKit = "0.6.3"
Mooncake = "0.4.183"
MatrixAlgebraKit = "0.6.4"
Mooncake = "0.5"
OhMyThreads = "0.8.0"
Printf = "1"
Random = "1"
Expand All @@ -56,14 +57,15 @@ TensorKitSectors = "0.3.3"
TensorOperations = "5.1"
Test = "1"
TestExtras = "0.2,0.3"
TupleTools = "1.1"
TupleTools = "1.5"
VectorInterface = "0.4.8, 0.5"
Zygote = "0.7"
cuTENSOR = "2"
julia = "1.10"

[extras]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -72,6 +74,7 @@ ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Expand All @@ -82,4 +85,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"

[targets]
test = ["ArgParse", "Adapt", "Aqua", "Combinatorics", "CUDA", "cuTENSOR", "GPUArrays", "LinearAlgebra", "SafeTestsets", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote", "Mooncake"]
test = ["ArgParse", "Adapt", "Aqua", "AllocCheck", "Combinatorics", "CUDA", "cuTENSOR", "GPUArrays", "LinearAlgebra", "SafeTestsets", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote", "Mooncake", "JET"]

[sources]
MatrixAlgebraKit = {url = "https://github.com/QuantumKitHub/MatrixAlgebraKit.jl", rev = "v0.6.4"}
12 changes: 9 additions & 3 deletions ext/TensorKitMooncakeExt/TensorKitMooncakeExt.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
module TensorKitMooncakeExt

using Mooncake
using Mooncake: @zero_derivative, DefaultCtx, ReverseMode, NoRData, CoDual, arrayify, primal
using Mooncake: @zero_derivative, @is_primitive,
DefaultCtx, MinimalCtx, ReverseMode, NoFData, NoRData, CoDual, Dual,
arrayify, primal, tangent
using TensorKit
import TensorKit as TK
using VectorInterface
using TensorOperations: TensorOperations, IndexTuple, Index2Tuple, linearize
import TensorOperations as TO
using VectorInterface: One, Zero
using TupleTools

using Random: AbstractRNG

include("utility.jl")
include("tangent.jl")
include("linalg.jl")
include("indexmanipulations.jl")
include("vectorinterface.jl")
include("tensoroperations.jl")
include("planaroperations.jl")

end
Loading
Loading