Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/operators/fermionoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,32 @@ function e_number_updown(elt::Type{<:Number}, ::Type{U1Irrep}, ::Type{SU2Irrep})
end

const nꜛnꜜ = e_number_updown

function S_e(elt::Type{<:Number}, ::Type{U1Irrep}, ::Type{SU2Irrep})
pspace = Vect[fℤ₂ ⊠ U1Irrep ⊠ SU2Irrep]((0, 0, 0) => 1, (1, 1, 1 // 2) => 1,
(0, 2, 0) => 1)
vspace = Vect[fℤ₂ ⊠ U1Irrep ⊠ SU2Irrep]((0, 0, 1) => 1)
S = TensorMap(zeros, elt, pspace ← pspace ⊗ vspace)
blocks(S)[fℤ₂(1) ⊠ U1Irrep(1) ⊠ SU2Irrep(1 // 2)] .= sqrt(3)/2
return S
end

const Sₑ = S_e

function S_e_square(elt::Type{<:Number}, ::Type{U1Irrep}, ::Type{SU2Irrep})
pspace = Vect[fℤ₂ ⊠ U1Irrep ⊠ SU2Irrep]((0, 0, 0) => 1, (1, 1, 1 // 2) => 1,
(0, 2, 0) => 1)
S2 = TensorMap(zeros, elt, pspace ← pspace)
blocks(S2)[fℤ₂(1) ⊠ U1Irrep(1) ⊠ SU2Irrep(1 // 2)] .= 3/4
return S2
end

const Sₑ² = S_e_square

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]
Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Author

Choose a reason for hiding this comment

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

Ok, no problem

return SS
end

const S_e_exchange = SₑSₑ