Skip to content

Try letting Enzyme make rules for insert/remove unit - #488

Merged
lkdvos merged 3 commits into
mainfrom
ksh/enz_unit
Jul 15, 2026
Merged

lkdvos merged 3 commits into
mainfrom
ksh/enz_unit

Conversation

@kshyatt

@kshyatt kshyatt commented Jul 15, 2026

Copy link
Copy Markdown
Member

No description provided.

@kshyatt
kshyatt requested review from Jutho and lkdvos July 15, 2026 06:04
@kshyatt
kshyatt marked this pull request as ready for review July 15, 2026 06:05
@codecov

codecov Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.70370% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/TensorKitEnzymeExt/utility.jl 3.70% 26 Missing ⚠️
Files with missing lines Coverage Δ
ext/TensorKitEnzymeExt/TensorKitEnzymeExt.jl 100.00% <ø> (ø)
ext/TensorKitEnzymeExt/indexmanipulations.jl 90.47% <ø> (-3.59%) ⬇️
ext/TensorKitEnzymeExt/utility.jl 21.62% <3.70%> (-16.38%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread ext/TensorKitEnzymeExt/utility.jl Resolved
Comment thread ext/TensorKitEnzymeExt/utility.jl Resolved
Comment thread ext/TensorKitEnzymeExt/utility.jl Resolved
@lkdvos
lkdvos merged commit ce15899 into main Jul 15, 2026
76 of 77 checks passed
@lkdvos
lkdvos deleted the ksh/enz_unit branch July 15, 2026 14:00
@lkdvos lkdvos mentioned this pull request Sep 20, 2026
lkdvos referenced this pull request Sep 21, 2026
* Draft changelog for v0.17.2

Consolidates the Unreleased section (which already included the real
entries added by #526/#532 on merge) with entries for the remaining
PRs merged since v0.17.1 (#487-#535), and retitles it as 0.17.2.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Bump version to v0.17.2

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix confirmed small bugs from the pre-release audit

- isunitspace: require dim(V) == 1 for GenericUnit sectors (#537)
- GradedSpace ⊕/supremum: check unit homogeneity of the result (#538)
- isconj(::ComplexSpace): return isdual(V) instead of always true (#539)
- multi_associator: return a vector, not a scalar, on early-exit for
  GenericFusion (#540)
- split(f, 0): use leftunit(f.coupled) instead of indexing an empty
  uncoupled tuple (#541)
- repartition: return a Pair in the identity branch, matching every
  other branch (#542)
- Mooncake scalar_pullback: accumulate into the tangent instead of
  overwriting it (#543)
- rand/randn/randexp/randisometry(rng, T, space): fix one(domain) typo (#544)
- pinv(::DiagonalTensorMap): fix inverted atol/rtol defaulting and
  empty-tensor throw (#545)
- t1 / t2: promote to a float scalartype, matching t1 \ t2 (#546)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Add changelog entry for the audit bugfixes

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Address fable review findings on the audit bugfixes

- split(f, 0): also guard innerlines_extended construction, which
  still indexed the empty uncoupled tuple for a 0-leg tree
- pinv(::DiagonalTensorMap): use eps (not sqrt(eps)) for the default
  rtol, matching _default_rtol's convention and dense LinearAlgebra.pinv

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Address tuicr review comments on the audit bugfixes

- pinv(::DiagonalTensorMap): reuse _default_rtol instead of
  duplicating its formula
- Add regression tests for split(f, 0) on a genuine 0-leg tree and
  for multi_associator's early-exit branch on a GenericFusion sector

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix planar issues after MPSKit test rerun

* harden Mooncake scalar pullback

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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