Skip to content

Conversation

@Jutho
Copy link
Member

@Jutho Jutho commented Dec 19, 2025

This tries to remove all (near) degeneracies in matrices that we will use for the AD of the eigenvalue decomposition, thereby hopefully stabilizing the tests.

I also made some progress with the case of degeneracies, for which I will make a separate PR with some hand written tests.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/common/matrixproperties.jl 87.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jutho Jutho requested review from kshyatt and lkdvos December 19, 2025 09:06
Copy link
Member

@kshyatt kshyatt left a comment

Choose a reason for hiding this comment

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

LGTM, just left some nitpicky comments

function stabilize_eigvals!(D::AbstractVector)
absD = abs.(D)
p = invperm(sortperm(absD)) # rank of abs(D)
# account for exact degeneracies in absolute value when having complex conjugate pairs
Copy link
Member

Choose a reason for hiding this comment

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

Great! This will help us a lot if we have to revisit in 6 months, I think.

@Jutho Jutho merged commit af22843 into main Dec 19, 2025
10 checks passed
@Jutho Jutho deleted the jh/stabilizeeigtests branch December 19, 2025 14:48
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