Open ZongYongyue opened 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")
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.
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?
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.
Codecov Report
Attention: Patch coverage is
0%
with32 lines
in your changes missing coverage. Please review.100.00% <ø> (ø)
60.27% <0.00%> (-16.92%)