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
86 changes: 43 additions & 43 deletions docs/src/examples/classic2d/1.hard-hexagon/index.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/src/examples/classic2d/1.hard-hexagon/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.11.4"
"version": "1.10.4"
},
"kernelspec": {
"name": "julia-1.11",
"display_name": "Julia 1.11.4",
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"language": "julia"
}
},
Expand Down
541 changes: 271 additions & 270 deletions docs/src/examples/quantum1d/1.ising-cft/index.md

Large diffs are not rendered by default.

63 changes: 37 additions & 26 deletions docs/src/examples/quantum1d/1.ising-cft/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
"cell_type": "code",
"source": [
"function O_shift(L)\n",
" τ = BraidingTensor{ComplexF64}(ℂ^2, ℂ^2)\n",
" O = TensorMap(τ)\n",
" I = id(ComplexF64, ℂ^2)\n",
" @tensor O[W S; N E] := I[W; N] * I[S; E]\n",
" return periodic_boundary_conditions(InfiniteMPO([O]), L)\n",
"end"
],
Expand All @@ -112,7 +112,8 @@
"eigenvalues. The eigensolver will find an orthonormal basis within each energy subspace, but\n",
"this basis is not necessarily a basis of eigenstates of the translation operator. In order\n",
"to fix this, we diagonalize the translation operator within each energy subspace.\n",
"The resulting energy levels have one-to-one correspondence to the operators in CFT, where the momentum is related to their conformal spin as $P_n = \\frac{2\\pi}{L}S_n$."
"The resulting energy levels have one-to-one correspondence to the operators in CFT, where\n",
"the momentum is related to their conformal spin as $P_n = \\frac{2\\pi}{L}S_n$."
],
"metadata": {}
},
Expand Down Expand Up @@ -149,7 +150,10 @@
{
"cell_type": "markdown",
"source": [
"Calculating scaling dimensions from the energy gap"
"We can compute the scaling dimensions $\\Delta_n$ of the operators in the CFT from the\n",
"energy gap of the corresponding excitations as $E_n - E_0 = \\frac{2\\pi v}{L} \\Delta_n$,\n",
"where $v = 2$. If we plot these scaling dimensions against the conformal spin $S_n$ from\n",
"above, we retrieve the familiar spectrum of the Ising CFT."
],
"metadata": {}
},
Expand All @@ -159,9 +163,12 @@
"source": [
"v = 2.0\n",
"Δ = real.(energies[1:18] .- energies[1]) ./ (2π * v / L)\n",
"p = plot(momenta, real.(Δ);\n",
" seriestype=:scatter, xlabel=\"momentum\", ylabel=\"energy\", legend=false)\n",
"vline!(p, [2π / L * i for i in -3:3]; color=\"gray\", linestyle=:dash)\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"
],
Expand Down Expand Up @@ -203,27 +210,31 @@
"outputs": [],
"cell_type": "code",
"source": [
"E_ex, qps = excitations(H_mps, QuasiparticleAnsatz(), ψ, envs; num=16)\n",
"E_ex, qps = excitations(H_mps, QuasiparticleAnsatz(), ψ, envs; num=18)\n",
"states_mps = vcat(ψ, map(qp -> convert(FiniteMPS, qp), qps))\n",
"E_mps = map(x -> expectation_value(x, H_mps), states_mps)\n",
"energies_mps = map(x -> expectation_value(x, H_mps), states_mps)\n",
"\n",
"momenta_mps = Float64[]\n",
"append!(momenta_mps, fix_degeneracies(states[1:1]))\n",
"append!(momenta_mps, fix_degeneracies(states[2:2]))\n",
"append!(momenta_mps, fix_degeneracies(states[3:3]))\n",
"append!(momenta_mps, fix_degeneracies(states[4:5]))\n",
"append!(momenta_mps, fix_degeneracies(states[6:9]))\n",
"append!(momenta_mps, fix_degeneracies(states[10:11]))\n",
"append!(momenta_mps, fix_degeneracies(states[12:12]))\n",
"append!(momenta_mps, fix_degeneracies(states[13:16]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[1:1]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[2:2]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[3:3]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[4:5]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[6:9]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[10:11]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[12:12]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[13:16]))\n",
"append!(momenta_mps, fix_degeneracies(states_mps[17:18]))\n",
"\n",
"v = 2.0\n",
"Δ = real.(energies[1:18] .- energies[1]) ./ (2π * v / L)\n",
"plot(momenta_mps, Δ;\n",
" seriestype=:scatter, xlabel=\"momentum\", ylabel=\"energy\", legend=false)\n",
"vline!(p, [2π / L * i for i in -3:3]; color=\"gray\", linestyle=:dash)\n",
"hline!(p, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color=\"gray\", linestyle=:dash)\n",
"p"
"Δ_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"
],
"metadata": {},
"execution_count": null
Expand All @@ -244,11 +255,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.11.5"
"version": "1.10.4"
},
"kernelspec": {
"name": "julia-1.11",
"display_name": "Julia 1.11.5",
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"language": "julia"
}
},
Expand Down
222 changes: 112 additions & 110 deletions docs/src/examples/quantum1d/2.haldane/index.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/src/examples/quantum1d/2.haldane/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.11.4"
"version": "1.10.4"
},
"kernelspec": {
"name": "julia-1.11",
"display_name": "Julia 1.11.4",
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"language": "julia"
}
},
Expand Down
32 changes: 16 additions & 16 deletions docs/src/examples/quantum1d/3.ising-dqpt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ H₀ = transverse_field_ising(FiniteChain(L); g=-0.5)
````

````
[ Info: DMRG init: obj = +9.627138678740e+00 err = 1.5287e-01
[ Info: DMRG 1: obj = -2.040021714898e+01 err = 1.5582585194e-02 time = 0.10 sec
[ Info: DMRG 2: obj = -2.040021715175e+01 err = 3.4655395009e-07 time = 0.02 sec
[ Info: DMRG 3: obj = -2.040021763026e+01 err = 3.7385206468e-05 time = 0.06 sec
[ Info: DMRG 4: obj = -2.040021786702e+01 err = 2.1782648849e-06 time = 0.04 sec
[ Info: DMRG 5: obj = -2.040021786703e+01 err = 1.3998187485e-07 time = 0.02 sec
[ Info: DMRG conv 6: obj = -2.040021786703e+01 err = 9.0384912069e-11 time = 0.26 sec
[ Info: DMRG init: obj = +9.906929661608e+00 err = 1.4654e-01
[ Info: DMRG 1: obj = -2.040021714938e+01 err = 9.3181641986e-04 time = 0.05 sec
[ Info: DMRG 2: obj = -2.040021715179e+01 err = 2.4688856530e-07 time = 0.03 sec
[ Info: DMRG 3: obj = -2.040021786221e+01 err = 4.2747944525e-05 time = 0.08 sec
[ Info: DMRG 4: obj = -2.040021786699e+01 err = 1.6446674043e-06 time = 0.04 sec
[ Info: DMRG 5: obj = -2.040021786703e+01 err = 2.4678293656e-07 time = 0.03 sec
[ Info: DMRG 6: obj = -2.040021786703e+01 err = 2.3749087526e-10 time = 0.03 sec
[ Info: DMRG conv 7: obj = -2.040021786703e+01 err = 4.3310784899e-12 time = 0.29 sec

````

Expand Down Expand Up @@ -111,14 +112,13 @@ H₀ = transverse_field_ising(; g=-0.5)
````

````
[ Info: VUMPS init: obj = +4.981979532800e-01 err = 3.9530e-01
[ Info: VUMPS 1: obj = -1.030701827098e+00 err = 1.0340065851e-01 time = 6.72 sec
[ Info: VUMPS 2: obj = -1.063544326030e+00 err = 2.9155624606e-04 time = 0.01 sec
[ Info: VUMPS 3: obj = -1.063544409971e+00 err = 1.8767724186e-06 time = 0.01 sec
[ Info: VUMPS 4: obj = -1.063544409973e+00 err = 2.0959736412e-08 time = 0.00 sec
[ Info: VUMPS 5: obj = -1.063544409973e+00 err = 2.7005924256e-09 time = 0.00 sec
[ Info: VUMPS 6: obj = -1.063544409973e+00 err = 3.0434524435e-10 time = 0.00 sec
[ Info: VUMPS conv 7: obj = -1.063544409973e+00 err = 2.4566755222e-11 time = 6.75 sec
[ Info: VUMPS init: obj = +4.937592959715e-01 err = 3.8640e-01
[ Info: VUMPS 1: obj = -1.041532472680e+00 err = 1.0207037612e-01 time = 7.91 sec
[ Info: VUMPS 2: obj = -1.063544395012e+00 err = 1.0570052184e-04 time = 0.01 sec
[ Info: VUMPS 3: obj = -1.063544409972e+00 err = 1.3451291600e-06 time = 0.01 sec
[ Info: VUMPS 4: obj = -1.063544409973e+00 err = 2.1982905922e-08 time = 0.00 sec
[ Info: VUMPS 5: obj = -1.063544409973e+00 err = 8.6218866571e-10 time = 0.00 sec
[ Info: VUMPS conv 6: obj = -1.063544409973e+00 err = 7.1345139950e-11 time = 7.94 sec

````

Expand All @@ -130,7 +130,7 @@ dot(ψ₀, ψ₀)
````

````
1.0000000000000053 - 8.519001927175606e-17im
0.9999999999999991 + 5.43344267830843e-16im
````

so the loschmidth echo takes on the pleasant form
Expand Down
6 changes: 3 additions & 3 deletions docs/src/examples/quantum1d/3.ising-dqpt/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.11.4"
"version": "1.10.4"
},
"kernelspec": {
"name": "julia-1.11",
"display_name": "Julia 1.11.4",
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"language": "julia"
}
},
Expand Down
Loading