Skip to content

Use eigh in bath op assertion - #166

Merged
gefux merged 2 commits into
mainfrom
eigh-assertion
Aug 8, 2026
Merged

Use eigh in bath op assertion#166
gefux merged 2 commits into
mainfrom
eigh-assertion

Conversation

@piperfw

@piperfw piperfw commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

#165

The constructor already asserts the coupling operator is Hermitian, so using eigh should be safe and not fail in the way described in the issue.

Never done a one-character Pull Request before. Ran the tests just to be sure!

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (0015fc2) to head (4b5eb02).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #166   +/-   ##
=======================================
  Coverage   92.12%   92.12%           
=======================================
  Files          24       24           
  Lines        4572     4572           
=======================================
  Hits         4212     4212           
  Misses        360      360           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@piperfw

piperfw commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

If we wanted to be more thorough, we could write some tests using an operator such as in the issue example

@gefux gefux self-assigned this Aug 7, 2026

@gefux gefux 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.

Because we are checking a few lines above that tmp_coupling_operator is hermitian np.linalg.eigh is indeed the better choice.
I'll add the test (following the issue #165) in a sec.

@gefux gefux added the bug Something isn't working label Aug 8, 2026
@gefux
gefux merged commit 219e061 into main Aug 8, 2026
4 checks passed
@gefux

gefux commented Aug 8, 2026

Copy link
Copy Markdown
Member

This closes issue #165.

Thank you, @piperfw, for this wold record single character PR. I am almost sorry I messed it up in the end with adding a test. :)

@gefux
gefux deleted the eigh-assertion branch August 8, 2026 12:31
@piperfw

piperfw commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

I cling to that my request was single-character. What you did with that request is neither here nor there!

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants