diff --git a/docs/Project.toml b/docs/Project.toml index a22832b..32fc64e 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -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" diff --git a/docs/make.jl b/docs/make.jl index 937ed67..2490bd9 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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", @@ -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") diff --git a/docs/src/assets/mpskitmodels.bib b/docs/src/assets/mpskitmodels.bib new file mode 100644 index 0000000..f00f5dd --- /dev/null +++ b/docs/src/assets/mpskitmodels.bib @@ -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} +} diff --git a/docs/src/references.md b/docs/src/references.md new file mode 100644 index 0000000..78f29bc --- /dev/null +++ b/docs/src/references.md @@ -0,0 +1,4 @@ +# References + +```@bibliography +``` diff --git a/src/models/transfermatrices.jl b/src/models/transfermatrices.jl index 0f7fc54..56058aa 100644 --- a/src/models/transfermatrices.jl +++ b/src/models/transfermatrices.jl @@ -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...) @@ -69,15 +90,15 @@ 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) @@ -85,7 +106,7 @@ function sixvertex(elt::Type{<:Number}, ::Type{CU1Irrep}; a = 1.0, b = 1.0, c = 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 #=========================================================================================== diff --git a/test/sixvertex.jl b/test/sixvertex.jl index 3952937..fc9cc66 100644 --- a/test/sixvertex.jl +++ b/test/sixvertex.jl @@ -1,6 +1,7 @@ using MPSKitModels using MPSKit using TensorKit +using LinearAlgebra using Test F₀ = (4 / 3)^(3 / 2) @@ -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 + 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