add spin irreducible operators with U(1) and SU(2) #24
add spin irreducible operators with U(1) and SU(2) #24ZongYongyue wants to merge 4 commits intoQuantumKitHub:mainfrom
Conversation
src/operators/fermionoperators.jl
Outdated
|
|
||
| function S_e_exchange(elt::Type{<:Number}, ::Type{U1Irrep}, ::Type{SU2Irrep}) | ||
| S = S_e(elt, U1Irrep, SU2Irrep) | ||
| @planar SS[-1 -2; -3 -4] := S[-1;-3 1]*permute(S',((2,1),(3,)))[1 -2; -4] |
There was a problem hiding this comment.
I'm a bit confused by the explicit call to permute here. Is this not the same as (S')[-2 1; -4] ?
Alternatively, I think if you want you can make this the same system as for the other "one-sided" operators:
The S_e gets a keyword argument side=:L or side=:R, and then you can make use of the contract_twosite function to combine them?
Codecov ReportAttention: Patch coverage is
|
|
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? 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 |
No description provided.