Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502"
MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab"

[compat]
Documenter = "1"
DocumenterCitations = "1"
7 changes: 6 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ if Base.active_project() != joinpath(@__DIR__, "Project.toml")
end

using Documenter
using DocumenterCitations
using MPSKitModels

bib = CitationBibliography(joinpath(@__DIR__, "src", "assets", "mpskitmodels.bib"); style = :authoryear)

makedocs(;
modules = [MPSKitModels],
sitename = "MPSKitModels.jl",
Expand All @@ -26,9 +29,11 @@ makedocs(;
"man/lattices.md",
"man/models.md",
],
"References" => "references.md",
"Index" => "package_index.md",
],
checkdocs = :public
checkdocs = :public,
plugins = [bib]
)

deploydocs(; repo = "github.com/QuantumKitHub/MPSKitModels.jl.git")
18 changes: 18 additions & 0 deletions docs/src/assets/mpskitmodels.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@book{baxter1982,
title = {Exactly Solved Models in Statistical Mechanics},
author = {Baxter, Rodney J.},
year = {1982},
publisher = {Academic Press},
address = {London}
}

@article{lieb1967exact,
title = {Exact Solution of the Problem of the Entropy of Two-Dimensional Ice},
author = {Lieb, Elliott H.},
year = {1967},
journal = {Physical Review Letters},
volume = {18},
number = {17},
pages = {692--694},
doi = {10.1103/PhysRevLett.18.692}
}
4 changes: 4 additions & 0 deletions docs/src/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# References

```@bibliography
```
31 changes: 26 additions & 5 deletions src/models/transfermatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,28 @@ end
sixvertex([elt::Type{<:Number}=ComplexF64], [symmetry::Type{<:Sector}=Trivial];
a=1.0, b=1.0, c=1.0)

MPO for the partition function of the two-dimensional six vertex model.
MPO for the partition function of the two-dimensional six-vertex model, with vertex weights
`a`, `b` and `c` in the convention of [baxter1982](@citet), Ch. 8.

Every bond carries an arrow, and only the six vertices with two incoming and two outgoing
arrows have a nonzero weight. The MPO tensor has legs `W ⊗ S ← N ⊗ E`. Listing the arrows
on the horizontal legs as (W, E) and on the vertical legs as (S, N), the weights are

| weight | horizontal (W, E) | vertical (S, N) |
|:------:|:-----------------:|:---------------:|
| `a` | (→, →) | (↑, ↑) |
| `a` | (←, ←) | (↓, ↓) |
| `b` | (→, →) | (↓, ↓) |
| `b` | (←, ←) | (↑, ↑) |
| `c` | (→, ←) | (↓, ↑) |
| `c` | (←, →) | (↑, ↓) |

so `a` and `b` are the two kinds of vertex where both arrows pass straight through, and
`c` is the vertex where they turn. The phase is set by the anisotropy
``Δ = (a^2 + b^2 - c^2) / (2ab)``: ferroelectric (frozen) for ``Δ > 1``, critical for
``-1 < Δ < 1`` and antiferroelectric for ``Δ < -1``. The default `a = b = c = 1` is the ice
point (``Δ = 1/2``), with partition function per site ``(4/3)^{3/2}``
[lieb1967exact](@cite).
"""
function sixvertex end
sixvertex(symmetry::Type{<:Sector}; kwargs...) = sixvertex(ComplexF64, symmetry; kwargs...)
Expand All @@ -69,23 +90,23 @@ function sixvertex(
0 b c 0
0 0 0 a
]
return InfiniteMPO([permute(TensorMap(d, ℂ^2 ⊗ ℂ^2, ℂ^2 ⊗ ℂ^2), ((1, 2), (4, 3)))])
return InfiniteMPO([TensorMap(d, ℂ^2 ⊗ ℂ^2, ℂ^2 ⊗ ℂ^2)])
end
function sixvertex(elt::Type{<:Number}, ::Type{U1Irrep}; a = 1.0, b = 1.0, c = 1.0)
pspace = U1Space(-1 // 2 => 1, 1 // 2 => 1)
mpo = zeros(elt, pspace ⊗ pspace, pspace ⊗ pspace)
block(mpo, Irrep[U₁](0)) .= [b c; c b]
block(mpo, Irrep[U₁](0)) .= [c b; b c]
block(mpo, Irrep[U₁](1)) .= reshape([a], (1, 1))
block(mpo, Irrep[U₁](-1)) .= reshape([a], (1, 1))
return InfiniteMPO([permute(mpo, ((1, 2), (4, 3)))])
return InfiniteMPO([mpo])
end
function sixvertex(elt::Type{<:Number}, ::Type{CU1Irrep}; a = 1.0, b = 1.0, c = 1.0)
pspace = CU1Space(1 // 2 => 1)
mpo = zeros(elt, pspace ⊗ pspace, pspace ⊗ pspace)
block(mpo, Irrep[CU₁](0, 0)) .= reshape([b + c], (1, 1))
block(mpo, Irrep[CU₁](0, 1)) .= reshape([-b + c], (1, 1))
block(mpo, Irrep[CU₁](1, 2)) .= reshape([a], (1, 1))
return InfiniteMPO([permute(mpo, ((1, 2), (4, 3)))])
return InfiniteMPO([mpo])
end

#===========================================================================================
Expand Down
28 changes: 28 additions & 0 deletions test/sixvertex.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using MPSKitModels
using MPSKit
using TensorKit
using LinearAlgebra
using Test

F₀ = (4 / 3)^(3 / 2)
Expand Down Expand Up @@ -40,3 +41,30 @@ end
F = leading_eigenvalue(ψ, mpo2)
@test abs(F)^(1 / 4) ≈ F₀ atol = 1.0e-2
end

# `convert(Array, ⋅)` need not use the same basis for different symmetries, so compare
# tr(Rᵏ) of the periodic row transfer matrix R on four sites, which does not depend on it.
@testset "Crosscheck" begin
Comment thread
lkdvos marked this conversation as resolved.
Resolved
function ring_traces(T)
W = convert(Array, sixvertex(T; a = 1.0, b = 2.0, c = 3.0)[1])
@tensor R[s1 s2 s3 s4; n1 n2 n3 n4] :=
W[v1 s1 n1 v2] * W[v2 s2 n2 v3] * W[v3 s3 n3 v4] * W[v4 s4 n4 v1]
R = reshape(R, 16, 16)
return [tr(R^k) for k in 1:6]
end
t = ring_traces(Trivial)
@test ring_traces(U1Irrep) ≈ t
@test ring_traces(CU1Irrep) ≈ t
end

@testset "Baxter convention" begin
# max(a, b) > min(a, b) + c means Δ > 1: frozen ferroelectric phase, with partition
# function per site max(a, b). The second set has c + a < b, so swapping b and c
# makes it antiferroelectric (c > a + b) and changes the result.
for (a, b, c) in ((3.0, 1.0, 1.5), (1.0, 3.0, 1.5))
mpo = sixvertex(; a, b, c)
ψ = InfiniteMPS(ℂ^2, ℂ^4)
ψ, _ = leading_boundary(ψ, mpo, alg)
@test expectation_value(ψ, mpo)[1] ≈ max(a, b) atol = 1.0e-8
end
end
Loading