FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Exponential by sanderdemeyer · Pull Request #465 · QuantumKitHub/TensorKit.jl · GitHub

Exponential - #465

Merged
lkdvos merged 18 commits into
QuantumKitHub:mainfrom
sanderdemeyer:exp
Jul 14, 2026
Merged

lkdvos merged 18 commits into
QuantumKitHub:mainfrom
sanderdemeyer:exp

Conversation

Copy link
Copy Markdown
Contributor

This changes the current way of calculating the exponential (using LinearAlgebra) to the one recently implemented in MatrixAlgebraKit (see QuantumKitHub/MatrixAlgebraKit.jl#94). This will not yet work, since there is no new version of MatrixAlgebraKit tagged yet. I just wanted to start the discussion here already.

I added both exp!(t) and exp!(tau, t). I added the special case where t is real and tau is complex, when exp! cannot overwrite the original tensor and instead a new one is allocated. Suggestions on how to best do this are definitely appreciated.

I still need to add some tests. We can definitely add some tests on whether the output tensor has the expected scalartype, and whether exp!(copy(a)) == exp!((1.0, copy(a)), but suggestions on more nontrivial tests are also welcome.

sanderdemeyer changed the title Exp Exponential Jun 26, 2026

lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We should probably discuss together how to best approach this, because I guess the question is if we want to implement the MatrixAlgebraKit functionality and interface directly on the tensors first, like we did for the factorizations.

I didn't even remember we have exp!, which is as far as I can tell defined in TensorKit itself, which means we could in principle indeed decide to use that for exp!((tau, t)), although my initial feeling seems to gravitate more towards just overloading the MatrixAlgebraKit versions.
That would then also at least expose the algorithm selection and in-place versions a little better?

Copy link
Copy Markdown
Contributor Author

I can definitely get behind just overloading the MatrixAlgebraKit version. Maybe we want to keep exp! as a (deprecated) version just to avoid breaking changes?

lkdvos marked this pull request as draft June 29, 2026 15:31
Comment thread src/factorizations/matrixalgebrakit.jl Outdated

Copy link
Copy Markdown
Contributor Author

The diagonal case needed some extra care (see also the comment above). So if there's any suggestions on tests, that would be greatly appreciated. That would also illuminate whether there are any additional type restrictions needed in MatrixAlgebraKit (preferably before tagging the new version).

Comment thread src/factorizations/matrixalgebrakit.jl Outdated
Comment thread src/factorizations/matrixalgebrakit.jl Outdated
Comment thread src/factorizations/matrixalgebrakit.jl Outdated
Comment thread src/tensors/linalg.jl Outdated
Comment thread src/tensors/linalg.jl Outdated

lkdvos commented Jul 10, 2026

Copy link
Copy Markdown
Member

Confirms this builds fine on top of QuantumKitHub/MatrixAlgebraKit.jl#255

Comment thread test/tensors/exponential.jl Outdated
lkdvos marked this pull request as ready for review July 13, 2026 15:32

lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

As MAK v0.6.9 is now released, I think this one is ready for review.

For me this looks great, thanks @sanderdemeyer for the work (as well as the work that is less visible here making sure that the MAK interface and implementations is compatible)!

lkdvos mentioned this pull request Jul 13, 2026

codecov Bot commented Jul 13, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/factorizations/matrixalgebrakit.jl 80.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/TensorKit.jl 17.24% <ø> (ø)
src/factorizations/utility.jl 50.00% <100.00%> (ø)
src/tensors/linalg.jl 82.88% <100.00%> (-0.31%) ⬇️
src/factorizations/matrixalgebrakit.jl 92.74% <80.00%> (-1.81%) ⬇️

... and 5 files with indirect coverage changes

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

lkdvos requested a review from kshyatt July 13, 2026 21:11
lkdvos enabled auto-merge (squash) July 13, 2026 22:55
lkdvos merged commit 8e5792b into QuantumKitHub:main Jul 14, 2026
92 checks passed
lkdvos referenced this pull request Jul 15, 2026
* Update changelog for v0.17.1

* Bump version to v0.17.1

* Update CITATION.cff for v0.17.1

* Document #485 and MatrixAlgebraKit 0.6.9 bump in changelog

* Address review comments: clarify Enzyme index-manip mode, note cuTENSOR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL