Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Jan 16, 2026

This sets up the structure for beginning to deal with Mooncake in TensorKit.
I think we should merge this like it is ASAP so we can in parallel start working on:

  1. Implementing the mooncake tangent type for TensorMap
  2. Porting over a bunch of rules

kshyatt
kshyatt previously approved these changes Jan 17, 2026
kshyatt
kshyatt previously approved these changes Jan 17, 2026
@lkdvos lkdvos merged commit 68cff49 into main Jan 17, 2026
3 of 5 checks passed
@lkdvos lkdvos deleted the ld-mooncake branch January 17, 2026 07:29
@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

❌ Patch coverage is 1.20482% with 82 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/TensorKitMooncakeExt/tensoroperations.jl 0.00% 52 Missing ⚠️
ext/TensorKitMooncakeExt/utility.jl 0.00% 14 Missing ⚠️
ext/TensorKitMooncakeExt/linalg.jl 0.00% 10 Missing ⚠️
ext/TensorKitMooncakeExt/tangent.jl 0.00% 6 Missing ⚠️
Files with missing lines Coverage Δ
ext/TensorKitMooncakeExt/TensorKitMooncakeExt.jl 100.00% <100.00%> (ø)
ext/TensorKitMooncakeExt/tangent.jl 0.00% <0.00%> (ø)
ext/TensorKitMooncakeExt/linalg.jl 0.00% <0.00%> (ø)
ext/TensorKitMooncakeExt/utility.jl 0.00% <0.00%> (ø)
ext/TensorKitMooncakeExt/tensoroperations.jl 0.00% <0.00%> (ø)

... and 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -0,0 +1,7 @@
function Mooncake.arrayify(A_dA::CoDual{<:TensorMap})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a benefit to overloading arrayify versus just making a TensorKit specific function tensorify?

A = Mooncake.primal(A_dA)
dA_fw = Mooncake.tangent(A_dA)
data = dA_fw.data.data
dA = typeof(A)(data, A.space)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also does this work in the complex case, where data is now probably using Mooncake's wonderful complex Complex tangent type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants