Skip to content

Commit 92b3ccc

Browse files
committed
small changes
1 parent b00035e commit 92b3ccc

2 files changed

Lines changed: 45 additions & 47 deletions

File tree

src/models/hamiltonians.jl

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ end
465465
Quantum Ashkin-Teller model
466466
===========================================================================================#
467467
"""
468-
ashkin_teller([T::Type{<:Number} = ComplexF64],
469-
[S = ProductSector{Tuple{Z2Irrep, Z2Irrep}}],
468+
ashkin_teller([T::Type{<:Number} = ComplexF64], [S = Trivial],
470469
[lattice::AbstractLattice = InfiniteChain(1)];
471470
h = 1.0, J = 1.0, λ = 1.0)
472471
@@ -479,61 +478,58 @@ H = -h \\sum_i\\bigg(\\sigma_i^x + \\tau_i^x + \\lambda \\sigma_i^x \\tau_i^x \\
479478
+\\lambda \\sigma_i^z \\sigma_j^z \\tau_i^z \\tau_j^z \\bigg).
480479
481480
```
482-
Currently the Hamiltonian is only supported with ```Z2Irrep ⊠ Z2Irrep``` symmetry.
483481
"""
484482
function ashkin_teller end
485483
function ashkin_teller(lattice::AbstractLattice; kwargs...)
486-
return ashkin_teller(ComplexF64, ProductSector{Tuple{Z2Irrep, Z2Irrep}}, lattice; kwargs...)
484+
return ashkin_teller(ComplexF64, Trivial, lattice; kwargs...)
485+
end
486+
function ashkin_teller(symmetry::Type{<:Sector}; kwargs...)
487+
return ashkin_teller(ComplexF64, symmetry; kwargs...)
487488
end
488489
function ashkin_teller(T::Type{<:Number}, lattice::AbstractLattice; kwargs...)
489-
return ashkin_teller(T, ProductSector{Tuple{Z2Irrep, Z2Irrep}}, lattice; kwargs...)
490+
return ashkin_teller(T, Trivial, lattice; kwargs...)
490491
end
491492
function ashkin_teller(
492-
T::Type{<:Number} = ComplexF64,
493-
S = ProductSector{Tuple{Z2Irrep, Z2Irrep}},
493+
T::Type{<:Number} = ComplexF64, S::Type{<:Sector} = Trivial,
494494
lattice::AbstractLattice = InfiniteChain(1);
495495
h = 1.0, J = 1.0, λ = 1.0
496496
)
497+
S₁, S₂ = _ashin_teller_decompose_symmetry(S)
497498

498-
S == ProductSector{Tuple{Z2Irrep, Z2Irrep}} || error("Only implemented with ℤ₂×ℤ₂ symmetry")
499+
# component tensors
500+
X₁ = σˣ(T, S₁)
501+
Z₁Z₁ = σᶻᶻ(T, S₁)
502+
I₁ = id(T, domain(X₁))
503+
I₁I₁ = id(T, domain(Z₁Z₁))
499504

500-
V = Vect[S](c => 1 for c in values(S))
505+
Z₂Z₂ = σᶻᶻ(T, S₂)
506+
X₂ = σˣ(T, S₂)
507+
I₂ = id(T, domain(X₂))
508+
I₂I₂ = id(T, domain(Z₂Z₂))
501509

502510
# Single site operators
503-
XI = ones(T, V V)
504-
block(XI, S(1, 0)) .*= -1
505-
block(XI, S(1, 1)) .*= -1
506-
IX = ones(T, V V)
507-
block(IX, S(0, 1)) .*= -1
508-
block(IX, S(1, 1)) .*= -1
509-
XX = ones(T, V V)
510-
block(XX, S(0, 1)) .*= -1
511-
block(XX, S(1, 0)) .*= -1
511+
XI = X₁ I₂
512+
IX = I₁ X₂
513+
XX = X₁ X₂
514+
F = isometry(Int, fuse(domain(XX)) domain(XX))
515+
onsite = F * (-h * (XI + IX + λ * XX)) * F'
512516

513517
# Nearest-neighbour terms
514-
ZIZI = zeros(T, V V V V)
515-
IZIZ = zeros(T, V V V V)
516-
ZZZZ = zeros(T, V V V V)
517-
for (s, f) in fusiontrees(ZIZI)
518-
if s.uncoupled == map(x -> flip_charge(x, (1, 0)), f.uncoupled)
519-
ZIZI[s, f] .= 1
520-
end
521-
if s.uncoupled == map(x -> flip_charge(x, (0, 1)), f.uncoupled)
522-
IZIZ[s, f] .= 1
523-
end
524-
if s.uncoupled == map(x -> flip_charge(x, (1, 1)), f.uncoupled)
525-
ZZZZ[s, f] .= 1
526-
end
527-
end
528-
529-
return @mpoham begin
530-
sum(vertices(lattice)) do i
531-
return -h * (XI{i} + IX{i} + λ * XX{i})
532-
end +
533-
sum(nearest_neighbours(lattice)) do (i, j)
534-
-J * (ZIZI{i, j} + IZIZ{i, j} + λ * ZZZZ{i, j})
535-
end
518+
@tensor FF[-1 -2; -3 -5 -4 -6] := F[-1; -3 -4] * F[-2; -5 -6] # note permutation!
519+
ZIZI = FF * (Z₁Z₁ I₂I₂) * FF'
520+
IZIZ = FF * (I₁I₁ Z₂Z₂) * FF'
521+
ZZZZ = FF * (Z₁Z₁ Z₂Z₂) * FF'
522+
twosite = -J * (ZIZI + IZIZ + λ * ZZZZ)
523+
524+
return @mpoham sum(vertices(lattice)) do i
525+
return onsite{i}
526+
end + sum(nearest_neighbours(lattice)) do (i, j)
527+
return twosite{i, j}
536528
end
537529
end
538530

531+
_ashin_teller_decompose_symmetry(::Type{Trivial}) = (Trivial, Trivial)
532+
_ashin_teller_decompose_symmetry(::Type{ProductSector{Tuple{A, B}}}) where {A <: Union{Trivial, Z2Irrep}, B <: Union{Trivial, Z2Irrep}} = (A, B)
533+
_ashin_teller_decompose_symmetry(T) = error("Ashkin-Teller model not implemented for symmetry $T")
534+
539535
# TODO: add (hardcore) bosonic t-J model (https://arxiv.org/abs/2409.15424)

test/ashkin_teller.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ E0s = [
1616
]
1717
alg = VUMPS(; maxiter = 100, verbosity = 0)
1818

19-
S = Z2Irrep Z2Irrep
20-
V = Vect[S](c => 1 for c in values(S))
21-
W = Vect[S](c => 6 for c in values(S))
22-
2319
# Test
2420

2521
@testset "Ashkin-Teller" for (gamma, E0) in zip(gammas, E0s)
26-
2722
H = ashkin_teller(h = 1, J = 1, λ = cos(gamma))
28-
Ψ = InfiniteMPS(V, W)
29-
23+
Ψ = InfiniteMPS(physicalspace(H), [ComplexSpace(24)])
3024
@test imag(expectation_value(Ψ, H)) 0 atol = 1.0e-12
25+
Ψ0, _ = find_groundstate(Ψ, H, alg)
26+
@test real(expectation_value(Ψ0, H)) E0 atol = 1.0e-3
27+
end
3128

29+
@testset "Ashkin-Teller (Z2 ⊠ Z2)" for (gamma, E0) in zip(gammas, E0s)
30+
H = ashkin_teller(Z2Irrep Z2Irrep; h = 1, J = 1, λ = cos(gamma))
31+
V = spacetype(H)(c => 6 for c in values(sectortype(H)))
32+
Ψ = InfiniteMPS(physicalspace(H), [V])
33+
@test imag(expectation_value(Ψ, H)) 0 atol = 1.0e-12
3234
Ψ0, _ = find_groundstate(Ψ, H, alg)
3335
@test real(expectation_value(Ψ0, H)) E0 atol = 1.0e-3
3436
end

0 commit comments

Comments
 (0)