Skip to content
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ HalfIntegers = "f0d1745a-41c9-11e9-1dd9-e5d34d218721"
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36"
MatrixAlgebraKit = "6c742aac-3347-4629-af66-fc926824e5e4"
OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5"
OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand All @@ -25,22 +26,23 @@ VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
[compat]
Accessors = "0.1"
Aqua = "0.8.9"
BlockTensorKit = "0.2"
BlockTensorKit = "0.3"
Combinatorics = "1"
Compat = "3.47, 4.10"
DocStringExtensions = "0.9.3"
HalfIntegers = "1.6.0"
KrylovKit = "0.8.3, 0.9.2, 0.10"
LinearAlgebra = "1.6"
LoggingExtras = "~1.0"
MatrixAlgebraKit = "0.5.0"
OhMyThreads = "0.7, 0.8"
OptimKit = "0.3.1, 0.4"
Pkg = "1"
Plots = "1.40"
Printf = "1"
Random = "1"
RecipesBase = "1.1"
TensorKit = "0.14"
TensorKit = "0.15.1"
TensorKitManifolds = "0.7"
TensorOperations = "5"
Test = "1"
Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ links = InterLinks(
"TensorKit" => "https://quantumkithub.github.io/TensorKit.jl/stable/",
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/",
"KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/",
"BlockTensorKit" => "https://lkdvos.github.io/BlockTensorKit.jl/dev/"
"BlockTensorKit" => "https://lkdvos.github.io/BlockTensorKit.jl/dev/",
"MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/"
)

# include MPSKit in all doctests
Expand Down
84 changes: 16 additions & 68 deletions docs/src/examples/classic2d/1.hard-hexagon/index.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions docs/src/examples/classic2d/1.hard-hexagon/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
" return Vect[FibonacciAnyon](sector => _D for sector in (:I, :τ))\n",
"end\n",
"\n",
"@assert isapprox(dim(virtual_space(100)), 100; atol=3)"
"@assert isapprox(dim(virtual_space(100)), 100; atol = 3)"
],
"metadata": {},
"execution_count": null
Expand All @@ -69,10 +69,10 @@
"D = 10\n",
"V = virtual_space(D)\n",
"ψ₀ = InfiniteMPS([P], [V])\n",
"ψ, envs, = leading_boundary(ψ₀, mpo,\n",
" VUMPS(; verbosity=0,\n",
" alg_eigsolve=MPSKit.Defaults.alg_eigsolve(;\n",
" ishermitian=false))) # use non-hermitian eigensolver\n",
"ψ, envs, = leading_boundary(\n",
" ψ₀, mpo,\n",
" VUMPS(; verbosity = 0, alg_eigsolve = MPSKit.Defaults.alg_eigsolve(; ishermitian = false))\n",
") # use non-hermitian eigensolver\n",
"F = real(expectation_value(ψ, mpo))\n",
"S = real(first(entropy(ψ)))\n",
"ξ = correlation_length(ψ)\n",
Expand All @@ -97,8 +97,10 @@
"outputs": [],
"cell_type": "code",
"source": [
"function scaling_simulations(ψ₀, mpo, Ds; verbosity=0, tol=1e-6,\n",
" alg_eigsolve=MPSKit.Defaults.alg_eigsolve(; ishermitian=false))\n",
"function scaling_simulations(\n",
" ψ₀, mpo, Ds; verbosity = 0, tol = 1.0e-6,\n",
" alg_eigsolve = MPSKit.Defaults.alg_eigsolve(; ishermitian = false)\n",
" )\n",
" entropies = similar(Ds, Float64)\n",
" correlations = similar(Ds, Float64)\n",
" alg = VUMPS(; verbosity, tol, alg_eigsolve)\n",
Expand All @@ -108,7 +110,7 @@
" correlations[1] = correlation_length(ψ)\n",
"\n",
" for (i, d) in enumerate(diff(Ds))\n",
" ψ, envs = changebonds(ψ, mpo, OptimalExpand(; trscheme=truncdim(d)), envs)\n",
" ψ, envs = changebonds(ψ, mpo, OptimalExpand(; trscheme = truncrank(d)), envs)\n",
" ψ, envs, = leading_boundary(ψ, mpo, alg, envs)\n",
" entropies[i + 1] = real(entropy(ψ)[1])\n",
" correlations[i + 1] = correlation_length(ψ)\n",
Expand All @@ -122,9 +124,9 @@
"\n",
"f = fit(log.(ξs), 6 * Ss, 1)\n",
"c = f.coeffs[2]\n",
"p = plot(; xlabel=\"logarithmic correlation length\", ylabel=\"entanglement entropy\")\n",
"p = plot(log.(ξs), Ss; seriestype=:scatter, label=nothing)\n",
"plot!(p, ξ -> f(ξ) / 6; label=\"fit\")"
"p = plot(; xlabel = \"logarithmic correlation length\", ylabel = \"entanglement entropy\")\n",
"p = plot(log.(ξs), Ss; seriestype = :scatter, label = nothing)\n",
"plot!(p, ξ -> f(ξ) / 6; label = \"fit\")"
],
"metadata": {},
"execution_count": null
Expand All @@ -145,13 +147,13 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
"version": "1.12.0"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.12",
"display_name": "Julia 1.12.0",
"language": "julia"
}
},
"nbformat": 4
}
}
375 changes: 87 additions & 288 deletions docs/src/examples/quantum1d/1.ising-cft/index.md

Large diffs are not rendered by default.

45 changes: 24 additions & 21 deletions docs/src/examples/quantum1d/1.ising-cft/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@
"outputs": [],
"cell_type": "code",
"source": [
"energies, states = exact_diagonalization(H; num=18, alg=Lanczos(; krylovdim=200));\n",
"plot(real.(energies);\n",
" seriestype=:scatter,\n",
" legend=false,\n",
" ylabel=\"energy\",\n",
" xlabel=\"#eigenvalue\")"
"energies, states = exact_diagonalization(H; num = 18, alg = Lanczos(; krylovdim = 200));\n",
"plot(\n",
" real.(energies);\n",
" seriestype = :scatter, legend = false, ylabel = \"energy\", xlabel = \"#eigenvalue\"\n",
")"
],
"metadata": {},
"execution_count": null
Expand Down Expand Up @@ -167,11 +166,13 @@
"Δ = real.(energies[1:18] .- energies[1]) ./ (2π * v / L)\n",
"S = momenta ./ (2π / L)\n",
"\n",
"p = plot(S, real.(Δ);\n",
" seriestype=:scatter, xlabel=\"conformal spin (S)\", ylabel=\"scaling dimension (Δ)\",\n",
" legend=false)\n",
"vline!(p, -3:3; color=\"gray\", linestyle=:dash)\n",
"hline!(p, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color=\"gray\", linestyle=:dash)\n",
"p = plot(\n",
" S, real.(Δ);\n",
" seriestype = :scatter, xlabel = \"conformal spin (S)\", ylabel = \"scaling dimension (Δ)\",\n",
" legend = false\n",
")\n",
"vline!(p, -3:3; color = \"gray\", linestyle = :dash)\n",
"hline!(p, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color = \"gray\", linestyle = :dash)\n",
"p"
],
"metadata": {},
Expand Down Expand Up @@ -212,7 +213,7 @@
"outputs": [],
"cell_type": "code",
"source": [
"E_ex, qps = excitations(H_mps, QuasiparticleAnsatz(), ψ, envs; num=18)\n",
"E_ex, qps = excitations(H_mps, QuasiparticleAnsatz(), ψ, envs; num = 18)\n",
"states_mps = vcat(ψ, map(qp -> convert(FiniteMPS, qp), qps))\n",
"energies_mps = map(x -> expectation_value(x, H_mps), states_mps)\n",
"\n",
Expand All @@ -231,11 +232,13 @@
"Δ_mps = real.(energies_mps[1:18] .- energies_mps[1]) ./ (2π * v / L_mps)\n",
"S_mps = momenta_mps ./ (2π / L_mps)\n",
"\n",
"p_mps = plot(S_mps, real.(Δ_mps);\n",
" seriestype=:scatter, xlabel=\"conformal spin (S)\",\n",
" ylabel=\"scaling dimension (Δ)\", legend=false)\n",
"vline!(p_mps, -3:3; color=\"gray\", linestyle=:dash)\n",
"hline!(p_mps, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color=\"gray\", linestyle=:dash)\n",
"p_mps = plot(\n",
" S_mps, real.(Δ_mps);\n",
" seriestype = :scatter, xlabel = \"conformal spin (S)\",\n",
" ylabel = \"scaling dimension (Δ)\", legend = false\n",
")\n",
"vline!(p_mps, -3:3; color = \"gray\", linestyle = :dash)\n",
"hline!(p_mps, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color = \"gray\", linestyle = :dash)\n",
"p_mps"
],
"metadata": {},
Expand All @@ -257,13 +260,13 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
"version": "1.12.0"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.12",
"display_name": "Julia 1.12.0",
"language": "julia"
}
},
"nbformat": 4
}
}
Loading