Skip to content

Commit cb6033b

Browse files
committed
Add more operators for t-J model
1 parent da18092 commit cb6033b

File tree

3 files changed

+63
-12
lines changed

3 files changed

+63
-12
lines changed

src/MPSKitModels.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export c⁺, c⁻, c⁺⁺, c⁻⁻, c⁺⁻, c⁻⁺
3535
export e_plus, e_min, e_plusplus, e_minmin, e_plusmin, e_minplus
3636
export e_number, e_number_up, e_number_down, e_number_updown
3737
export e⁺⁺, e⁻⁻, e⁺⁻, e⁻⁺
38-
export tJ
38+
export tJ, TJOperators
3939

4040
export transverse_field_ising
4141
export kitaev_model
@@ -70,7 +70,8 @@ using .HubbardOperators
7070
# TJOperators share operator names with HubbardOperators
7171
# and is only imported to avoid name conflicts
7272
include("operators/tjoperators.jl")
73-
import .TJOperators as tJ
73+
import .TJOperators
74+
const tJ = TJOperators
7475
include("operators/bosonoperators.jl")
7576

7677
include("models/hamiltonians.jl")

src/operators/tjoperators.jl

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ export tj_space
1414
export e_plusmin, e_plusmin_up, e_plusmin_down
1515
export e_minplus, e_minplus_up, e_minplus_down
1616
export e_minmin_ud, e_minmin_du, e_singlet
17-
export e_number, e_number_up, e_number_down
18-
export S_x, S_y, S_z
17+
export e_number, e_number_up, e_number_down, e_number_hole
18+
export S_x, S_y, S_z, S_plus, S_min
1919
export S_plusmin, S_minplus, S_exchange
2020

2121
export e⁺e⁻, e⁺e⁻ꜛ, e⁺e⁻ꜜ, e⁻e⁺, e⁻e⁺ꜛ, e⁻e⁺ꜜ
22-
export nꜛ, nꜜ
22+
export nꜛ, nꜜ, nʰ
23+
export Sˣ, Sʸ, Sᶻ, S⁺, S⁻
2324
# not exported because namespace: export n
2425

2526
"""
@@ -423,13 +424,28 @@ function e_number(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Se
423424
end
424425
const n = e_number
425426

427+
"""
428+
e_number_hole(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
429+
430+
Return the one-body operator that counts the number of holes.
431+
"""
432+
e_number_hole(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = e_number_hole(ComplexF64,
433+
P, S;
434+
sf)
435+
function e_number_hole(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector};
436+
sf::Bool=false)
437+
iden = TensorKit.id(tj_space(particle_symmetry, spin_symmetry; sf))
438+
return iden - e_number(T, particle_symmetry, spin_symmetry; sf)
439+
end
440+
const= e_number_hole
441+
426442
"""
427443
S_x(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
428444
429445
Return the one-body spin-1/2 x-operator on the electrons.
430446
"""
431-
S_x(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = S_x(ComplexF64, P, S; sf)
432-
S_x(; sf::Bool=false) = S_x(ComplexF64, Trivial, Trivial; sf)
447+
S_x(P::Type{<:Sector}=Trivial, S::Type{<:Sector}=Trivial; sf::Bool=false) = S_x(ComplexF64,
448+
P, S; sf)
433449
function S_x(T::Type{<:Number}, ::Type{Trivial}, ::Type{Trivial}; sf::Bool=false)
434450
t = single_site_operator(T, Trivial, Trivial; sf)
435451
I = sectortype(t)
@@ -446,14 +462,15 @@ function S_x(T::Type{<:Number}, ::Type{U1Irrep}, ::Type{Trivial}; sf::Bool=false
446462
t[(I(b, 1), dual(I(b, 1)))][2, 1] = 0.5
447463
return t
448464
end
465+
const= S_x
449466

450467
"""
451468
S_y(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
452469
453470
Return the one-body spin-1/2 x-operator on the electrons (only defined for `Trivial` symmetry).
454471
"""
455-
S_y(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = S_y(ComplexF64, P, S; sf)
456-
S_y(; sf::Bool=false) = S_y(ComplexF64, Trivial, Trivial; sf)
472+
S_y(P::Type{<:Sector}=Trivial, S::Type{<:Sector}=Trivial; sf::Bool=false) = S_y(ComplexF64,
473+
P, S; sf)
457474
function S_y(T::Type{<:Number}, ::Type{Trivial}, ::Type{Trivial}; sf::Bool=false)
458475
t = single_site_operator(T, Trivial, Trivial; sf)
459476
I = sectortype(t)
@@ -470,14 +487,15 @@ function S_y(T::Type{<:Number}, ::Type{U1Irrep}, ::Type{Trivial}; sf::Bool=false
470487
t[(I(b, 1), dual(I(b, 1)))][2, 1] = 0.5im
471488
return t
472489
end
490+
const= S_y
473491

474492
"""
475493
S_z(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
476494
477495
Return the one-body spin-1/2 z-operator on the electrons.
478496
"""
479-
S_z(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = S_z(ComplexF64, P, S; sf)
480-
S_z(; sf::Bool=false) = S_z(ComplexF64, Trivial, Trivial; sf)
497+
S_z(P::Type{<:Sector}=Trivial, S::Type{<:Sector}=Trivial; sf::Bool=false) = S_z(ComplexF64,
498+
P, S; sf)
481499
function S_z(T::Type{<:Number}, ::Type{Trivial}, ::Type{Trivial}; sf::Bool=false)
482500
t = single_site_operator(T, Trivial, Trivial; sf)
483501
I = sectortype(t)
@@ -510,6 +528,37 @@ function S_z(T::Type{<:Number}, ::Type{U1Irrep}, ::Type{U1Irrep}; sf::Bool=false
510528
t[(I(b, 1, -1 // 2), dual(I(b, 1, -1 // 2)))] .= -0.5
511529
return t
512530
end
531+
const Sᶻ = S_z
532+
533+
"""
534+
S_plus(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
535+
536+
Return the spin-plus operator.
537+
"""
538+
S_plus(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = S_plus(ComplexF64,
539+
P, S;
540+
sf)
541+
function S_plus(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector};
542+
sf::Bool=false)
543+
return S_x(T, particle_symmetry, spin_symmetry; sf) +
544+
1im * S_y(T, particle_symmetry, spin_symmetry; sf)
545+
end
546+
const S⁺ = S_plus
547+
548+
"""
549+
S_min(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool=false)
550+
551+
Return the spin-minus operator.
552+
"""
553+
S_min(P::Type{<:Sector}, S::Type{<:Sector}; sf::Bool=false) = S_min(ComplexF64,
554+
P, S;
555+
sf)
556+
function S_min(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector};
557+
sf::Bool=false)
558+
return S_x(T, particle_symmetry, spin_symmetry; sf) -
559+
1im * S_y(T, particle_symmetry, spin_symmetry; sf)
560+
end
561+
const S⁻ = S_min
513562

514563
"""
515564
S_plusmin(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector}; sf::Bool = false)

test/tjoperators.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ implemented_symmetries = [(Trivial, Trivial),
5959
@test sum(tr(Svec[i]^2) for i in 1:3) / (2S + 1) S * (S + 1)
6060
# test S_plus and S_min
6161
@test tJ.S_plusmin(particle_symmetry, spin_symmetry; sf)
62-
(Svec[1] + im * Svec[2]) (Svec[1] - im * Svec[2])
62+
tJ.S_plus(particle_symmetry, spin_symmetry; sf)
63+
tJ.S_min(particle_symmetry, spin_symmetry; sf)
6364
# commutation relations
6465
for i in 1:3, j in 1:3
6566
@test Svec[i] * Svec[j] - Svec[j] * Svec[i]

0 commit comments

Comments
 (0)