Skip to content

Conversation

@sanderdemeyer
Copy link
Collaborator

This is again mainly a copy from MPSKitModels.

There are some things we should discuss. I talked with @lkdvos about whether we want to allow users to use the single-site operators like u_plus (that are then contracted to get the symmetric two-site operators) or whether we will only define the contracted versions. The discussion here is similar. Currently, the two-site operators are defined as the contraction of the single-site ones. We could alternatively define them only as the contracted version, similarly to how we now define the Hubbard operators. This would also eliminate the need for the extra utility file.

Secondly, I have added a simple test where I use the exact diagonalisation of the two-body operator in a spinless fermion model (see e.g. this paper. I assume this is what you meant with the discussion in #9, @lkdvos, or did you mean something a bit more elaborate? I have similar stuff for the other models, sometimes a bit more elaborate, but I find it hard to find benchmark data for the exact diagonalisation of finite chains for some of these models. Anyway, these other tests will be added in a separate PR.

@lkdvos
Copy link
Member

lkdvos commented Mar 28, 2025

I think I would very much prefer to not define the "half" operators that aren't symmetric by themselves. Since these aren't all that well-defined I feel like this is more a cause for confusion than really a useful feature.
I would be okay with having a split feature here, but honestly that seems like something more suited for downstream packages anyways, because how you split it probably depends quite heavily on what you want to do afterwards.

@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Only allow for contracted tensors. Also changed some naming conventions to match the ones in this package
@sanderdemeyer
Copy link
Collaborator Author

I have left the /utility.jl file in there, even though we don't use it anymore (that is also why the patch coverage is too low). I would be fine with removing this completely, since there is indeed no unique way of splitting the tensors.

@lkdvos
Copy link
Member

lkdvos commented Mar 31, 2025

Looks good to me overall. Can you again use the same kind of setup for the module, with a fermion_space function etc? It would be nice to keep the consistency.

consistency with other files
@lkdvos lkdvos merged commit 35ed685 into QuantumKitHub:main Apr 1, 2025
9 checks passed
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