Skip to content

Commit 4cef2c0

Browse files
author
qyli
committed
pairing operator for U1SpinlessFermion
1 parent a1efdd4 commit 4cef2c0

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/LocalSpace/SpinlessFermion.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Two rank-`3` operators of hopping `c^dag c`.
1818
1919
FFdag::NTuple{2, TensorMap}
2020
Two rank-`3` operators of hopping `c c^dag`.
21+
22+
ΔdagΔ::NTuple{4, TensorMap}
23+
Four operators of pairing `Δ^dag Δ`, where `Δᵢⱼ = cᵢcⱼ` is the pairing operator. Rank = `(3, 4, 4, 3)`. Sign convention: `(i,j,k,l)` gives `cᵢ^dag cⱼ^dag cₖ cₗ = - cⱼ^dag cᵢ^dag cₖ cₗ = - Δᵢⱼ^dag Δₖₗ`.
2124
"""
2225
module U₁SpinlessFermion
2326
using TensorKit
@@ -55,6 +58,17 @@ const FFdag = let
5558
F, Fdag
5659
end
5760

61+
const ΔdagΔ = let
62+
A = FdagF[1]
63+
aspace = Rep[U₁](1 => 1)
64+
aspace2 = Rep[U₁](2 => 1)
65+
iso = isometry(aspace aspace, aspace2)
66+
@tensor B[d a; b e] := A[a b c] * iso[c d e]
67+
C = permute(B', ((2, 1), (4, 3)))
68+
D = permute(A', ((2, 1), (3,)))
69+
A, B, C, D
70+
end
71+
5872
end
5973

6074
"""

test/mulsiteIntr.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for i in 1:L, j in 1:L
1818
if i == j
1919
addIntr!(Tree, U1SpinlessFermion.n, i, -Tij[i, i]; name = :n)
2020
else
21-
addIntr!(Tree, U1SpinlessFermion.FdagF, (i, j), (true, true),
21+
addIntr!(Tree, U1SpinlessFermion.FdagF, (i, j), (true, true),
2222
-Tij[i, j]; name = (:Fdag, :F), Z = U1SpinlessFermion.Z)
2323
end
2424
end
@@ -42,6 +42,7 @@ for i in 1:L, j in 1:L, k in 1:L, l in 1:L
4242
!duplicated && !allunique([i, j, k, l]) && continue
4343
addObs!(Tree, (U1SpinlessFermion.FdagF..., U1SpinlessFermion.FdagF...), (i, j, k, l), (true, true, true, true); Z = U1SpinlessFermion.Z, name = (:Fdag, :F, :Fdag, :F))
4444
addObs!(Tree, Tuple(fill(U1SpinlessFermion.n, 4)), (i, j, k, l), (false, false, false, false); name = (:n, :n, :n, :n))
45+
addObs!(Tree, U1SpinlessFermion.ΔdagΔ, (i, j, k, l), (true, true, true, true); Z = U1SpinlessFermion.Z, name = (:Fdag, :Fdag, :F, :F))
4546
end
4647
# 3-site
4748
for i in 1:L, j in 1:L, k in 1:L
@@ -124,7 +125,11 @@ end
124125
!duplicated && !allunique([i, j, k, l]) && continue
125126
O_ex = ExpectationValue(G, [i, j, k, l], [1, 3])
126127
@test haskey(Obs.FdagFFdagF, (i, j, k, l)) && abs(Obs.FdagFFdagF[(i, j, k, l)] - O_ex) < tol
128+
129+
O_ex = ExpectationValue(G, [i, j, k, l], [1, 2])
130+
@test haskey(Obs.FdagFdagFF, (i, j, k, l)) && abs(Obs.FdagFdagFF[(i, j, k, l)] - O_ex) < tol
127131
end
132+
128133
end
129134

130135

0 commit comments

Comments
 (0)