QuantumKitHub / MPSKitModels.jl

MIT License
20 stars 13 forks source link

add spin irreducible operators with U(1) and SU(2) #24

Open ZongYongyue opened 3 months ago

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.

Files Patch % Lines
src/operators/fermionoperators.jl 0.00% 32 Missing :warning:
Files Coverage Δ
src/MPSKitModels.jl 100.00% <ø> (ø)
src/operators/fermionoperators.jl 60.27% <0.00%> (-16.92%) :arrow_down:
lkdvos commented 3 months ago

Do you happen to also have some way to include some tests? Maybe some properties that these operators have to fulfill, or an (easy) model for which you can compute the groundstate energy? Also, you should be able to autoformat to make the FormatCheck test pass, this is achieved by

using JuliaFormatter
format("MPSKitModels/src")
ZongYongyue commented 3 months ago

Sure, it's what I'm supposed to do, but I've got some other things going on lately, and it might take a few weeks before I get around to doing this.

lkdvos commented 3 months ago

No worries, thanks for the effort already! I might find some time next week as well to check if I can do something more. Can you maybe tell me in what kind of context these operators appear?

ZongYongyue commented 3 months ago

Of course! Indeed, it is a little subtle to test this operators because the total spin operator Sₑ can not be split into isolated S+, S- and Sz operators under the U1 and SU2 symmetries that makes the same test in the spinoperators.jl impossible. At the same time, it is not sufficient to verify spin operator Sₑ using the same methods as verifying electron operators e_plus, e_min in fermionoperators.jl. My idea is to use exact diagonalization that benchmarks the expectation value of these operators in a real model. As we all know, In the large $U$ limit, the Hubbard model is approximate to Heisenberg model, thus, we can consider the changes of spin-spin correlation $\sum_{ij}\langle S_i \cdot S_j\rangle$ in the process of the increase of $U$, where this correlation plays the role of order parameter. It's expected to start at zero and increase as U increases. So we can calculate the spin-spin correlation in the Hubbard model with fixed $U$ in a finite-size system, and compare the result with the exact diagonalization one. I will definitely give a test for it, but probably in a few weeks, so if you have time to do it first or you have an another better method to deal with this, I would be very grateful.