Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Sep 10, 2025

No description provided.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

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

Files with missing lines Patch % Lines
src/operators/mpo.jl 83.33% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/operators/mpohamiltonian.jl 89.90% <100.00%> (+0.36%) ⬆️
src/operators/mpo.jl 87.21% <83.33%> (-0.35%) ⬇️

... and 2 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 lkdvos marked this pull request as ready for review September 28, 2025 11:41
@lkdvos lkdvos enabled auto-merge (squash) September 28, 2025 11:41
Copy link
Member

@VictorVanthilt VictorVanthilt left a comment

Choose a reason for hiding this comment

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

Could you give some insight as to why we need to swap and multiply neighbours?

@lkdvos
Copy link
Member Author

lkdvos commented Sep 29, 2025

The obvious case is an exchange integral (ie for quantum chemistry)

T = rand(N, N) # kinetic
V = rand(N, N, N, N) # exchange
H = FiniteMPOHamiltonian(fill(V, N), (i, j) => T[i, j] * c_min() \otimes c_plus()) +
    FiniteMPOHamiltonian(fill(V, N), (i, j, k, l) => V[i, j, k, l] * c_min() \otimes c_min() \otimes c_plus() \otimes c_plus())

@VictorVanthilt
Copy link
Member

But $X\otimes X \otimes Y \otimes Y$ applied on sites 1, 1, 1 and 1 just sits wrong with me. The operator lives on a 4-site Hilbertspace but it acts on only the first one?

@lkdvos
Copy link
Member Author

lkdvos commented Sep 29, 2025

Does it help if you rewrite this as $H = \sum_{ijkl} V_{ijkl} c_i c_j c^\dagger_k c^\dagger_l$?

@VictorVanthilt VictorVanthilt self-requested a review September 29, 2025 17:37
@lkdvos lkdvos merged commit ae978f4 into main Sep 29, 2025
26 checks passed
@lkdvos lkdvos deleted the mpoconstructor branch September 29, 2025 17:38
lkdvos referenced this pull request Sep 30, 2025
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