Skip to content

Commit 2007958

Browse files
lkdvosdartsushihuangrzh
committed
Add potts model
Co-authored-by: Atsushi <[email protected]> Co-authored-by: Rui-Zhen <[email protected]>
1 parent 34c3acf commit 2007958

File tree

4 files changed

+121
-1
lines changed

4 files changed

+121
-1
lines changed

src/MPSKitModels.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export e⁺, e⁻, e⁺⁺, e⁻⁻, e⁺⁻, e⁻⁺
3737

3838
export transverse_field_ising
3939
export kitaev_model
40+
export quantum_potts
4041
export heisenberg_XXX, heisenberg_XXZ, heisenberg_XYZ
4142
export bilinear_biquadratic_model
4243
export hubbard_model, bose_hubbard_model

src/models/hamiltonians.jl

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#===========================================================================================
22
Ising model
33
===========================================================================================#
4-
ising_kwargs = (; J=1.0, g=1.0)
54

65
"""
76
transverse_field_ising([elt::Type{<:Number}], [symmetry::Type{<:Sector}],
@@ -234,6 +233,44 @@ function bilinear_biquadratic_model(elt::Type{<:Number}=ComplexF64,
234233
end
235234
end
236235

236+
#===========================================================================================
237+
Potts models
238+
===========================================================================================#
239+
"""
240+
quantum_potts([elt::Type{<:Number}], [symmetry::Type{<:Sector}],
241+
[lattice::AbstractLattice]; q=3, J=1.0, g=1.0)
242+
243+
MPO for the hamiltonian of the quantum Potts model, as defined by
244+
```math
245+
H = - J \\sum_{\\langle i,j \\rangle} Z_i^\\dagger Z_j + Z_i Z_j^\\dagger
246+
- g \\sum_i (X_i + X_i^\\dagger)
247+
```
248+
where the operators ``Z`` and ``X`` are the ``q``-rotation operators satisfying
249+
``Z^q = X^q = 1`` and ``ZX = \\omega XZ`` where ``\\omega = e^{2πi/q}``.
250+
"""
251+
function quantum_potts end
252+
function quantum_potts(lattice::AbstractLattice; kwargs...)
253+
return quantum_potts(ComplexF64, Trivial, lattice; kwargs...)
254+
end
255+
function quantum_potts(symmetry::Type{<:Sector},
256+
lattice::AbstractLattice=InfiniteChain(1); kwargs...)
257+
return quantum_potts(ComplexF64, symmetry, lattice; kwargs...)
258+
end
259+
function quantum_potts(elt::Type{<:Number}, lattice::AbstractLattice;
260+
kwargs...)
261+
return quantum_potts(elt, Trivial, lattice; kwargs...)
262+
end
263+
function quantum_potts(elt::Type{<:Number}=ComplexF64,
264+
symmetry::Type{<:Sector}=Trivial,
265+
lattice::AbstractLattice=InfiniteChain(1);
266+
q=3, J=1.0, g=1.0)
267+
return @mpoham sum(nearest_neighbours(lattice)) do (i, j)
268+
return -J * potts_exchange(elt, symmetry; q){i,j}
269+
end - sum(vertices(lattice)) do i
270+
return g * potts_field(elt, symmetry; q){i}
271+
end
272+
end
273+
237274
#===========================================================================================
238275
Hubbard models
239276
===========================================================================================#

src/operators/spinoperators.jl

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,3 +444,64 @@ const SS = S_exchange
444444

445445
"""Pauli exchange operator."""
446446
σσ(args...; kwargs...) = 4 * S_exchange(args...; kwargs...)
447+
448+
"""
449+
potts_exchange([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q=3)
450+
451+
The Potts exchange operator ``Z ⊗ Z' + Z' ⊗ Z``, where ``Z^q = 1``.
452+
"""
453+
function potts_exchange end
454+
potts_exchange(; kwargs...) = potts_exchange(ComplexF64, Trivial; kwargs...)
455+
potts_exchange(elt::Type{<:Number}; kwargs...) = potts_exchange(elt, Trivial; kwargs...)
456+
function potts_exchange(symmetry::Type{<:Sector}; kwargs...)
457+
return potts_exchange(ComplexF64, symmetry; kwargs...)
458+
end
459+
460+
function potts_exchange(elt::Type{<:Number}, ::Type{Trivial}; q=3)
461+
pspace = ComplexSpace(q)
462+
Z = TensorMap(zeros, elt, pspace pspace)
463+
for i in 1:q
464+
Z[i, i] = cis(2π * (i - 1) / q)
465+
end
466+
return Z Z' + Z' Z
467+
end
468+
function potts_exchange(elt::Type{<:Number}, ::Type{ZNIrrep{Q}}; q=Q) where {Q}
469+
@assert q == Q "q must match the irrep charge"
470+
pspace = Vect[ZNIrrep{q}](i => 1 for i in 0:(q - 1))
471+
aspace = Vect[ZNIrrep{q}](1 => 1, -1 => 1)
472+
Z_left = TensorMap(ones, elt, pspace pspace aspace)
473+
Z_right = TensorMap(ones, elt, aspace pspace pspace)
474+
return contract_twosite(Z_left, Z_right)
475+
end
476+
477+
"""
478+
potts_field([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q=3)
479+
480+
The Potts field operator ``X + X'``, where ``X^q = 1``.
481+
"""
482+
function potts_field end
483+
potts_field(; kwargs...) = potts_field(ComplexF64, Trivial; kwargs...)
484+
potts_field(elt::Type{<:Number}; kwargs...) = potts_field(elt, Trivial; kwargs...)
485+
function potts_field(symmetry::Type{<:Sector}; kwargs...)
486+
return potts_field(ComplexF64, symmetry; kwargs...)
487+
end
488+
489+
function potts_field(elt::Type{<:Number}, ::Type{Trivial}; q=3)
490+
pspace = ComplexSpace(q)
491+
X = TensorMap(zeros, elt, pspace pspace)
492+
for i in 1:q
493+
X[mod1(i - 1, q), i] = one(elt)
494+
end
495+
return X + X'
496+
end
497+
# TODO: generalize to arbitrary q
498+
function potts_field(elt::Type{<:Number}, ::Type{ZNIrrep{Q}}; q=Q) where {Q}
499+
@assert q == Q "q must match the irrep charge"
500+
@assert q == 3 "only q = 3 is implemented"
501+
pspace = Vect[ZNIrrep{q}](i => 1 for i in 0:(q - 1))
502+
X = TensorMap(zeros, elt, pspace pspace)
503+
for (c, b) in blocks(X)
504+
b .= isone(c) ? 2 : -1
505+
end
506+
return X
507+
end

test/potts.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using MPSKit
2+
using TensorKit
3+
4+
alg = VUMPS(; maxiter=25, verbosity=0)
5+
E₀ = -(4 / 3 + 2sqrt(3) / π)
6+
7+
@testset "Trivial" begin
8+
H = quantum_potts(; q=3)
9+
ψ = InfiniteMPS(3, 32)
10+
@test imag(expectation_value(ψ, H)) 0 atol = 1e-10
11+
ψ, envs, δ = find_groundstate(ψ, H, alg)
12+
@test E₀ expectation_value(ψ, H, envs) atol = 1e-2
13+
end
14+
15+
@testset "Z3Irrep" begin
16+
H = quantum_potts(Z3Irrep; q=3)
17+
ψ = InfiniteMPS(Rep[ℤ₃](i => 1 for i in 0:2), Rep[ℤ₃](i => 12 for i in 0:2))
18+
@test imag(expectation_value(ψ, H)) 0 atol = 1e-10
19+
ψ, envs, δ = find_groundstate(ψ, H, alg)
20+
@test E₀ expectation_value(ψ, H, envs) atol = 1e-2
21+
end

0 commit comments

Comments
 (0)