Skip to content

Fix the interactions in qstate_clock - #89

Merged
leburgel merged 1 commit into
mainfrom
lb/fix-qstateclock
Nov 24, 2026
Merged

leburgel merged 1 commit into
mainfrom
lb/fix-qstateclock

Conversation

@leburgel

@leburgel leburgel commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

With MPSKit's leg order W ⊗ S ← N ⊗ E, the weights i - j - k - l - i couple the opposite legs S - N and W - E, so this is not the square-lattice clock model (for q = 2 it misses Onsager's free energy). The fix couples neighbouring legs, i - j - l - k - i, as TNRKit.jl does.

This broke in b608f72, which adapted the transfer matrices to MPSKit's new leg order (QuantumKitHub/MPSKit.jl@47c2137) but missed the clock tensor.

Adds test/qstate_clock.jl, comparing q = 2 to Onsager and q = 4 to two Ising models at β/2.

🤖 Generated with Claude Code

Couple neighbouring legs W - S - E - N of the `W ⊗ S ← N ⊗ E` tensor instead of
the opposite pairs. This broke in b608f72, which adapted the transfer matrices
to MPSKit's new leg order but missed the clock tensor. Add tests against the
Onsager free energy for q = 2 and q = 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

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

@leburgel
leburgel requested a review from borisdevos November 24, 2026 17:39
@leburgel
leburgel merged commit 99cbea3 into main Nov 24, 2026
8 of 9 checks passed
@leburgel
leburgel deleted the lb/fix-qstateclock branch November 24, 2026 20:11
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.

2 participants