Skip to content

Commit

Permalink
build based on 66d346e
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Nov 22, 2024
1 parent 3c29e0d commit 570ff2b
Show file tree
Hide file tree
Showing 27 changed files with 4,507 additions and 3,039 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-19T01:09:36","documenter_version":"1.8.0"}}
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-22T12:37:07","documenter_version":"1.8.0"}}
86 changes: 43 additions & 43 deletions dev/examples/classic2d/1.hard-hexagon/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dev/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.10.4"
"version": "1.11.1"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.11",
"display_name": "Julia 1.11.1",
"language": "julia"
}
},
Expand Down
2 changes: 1 addition & 1 deletion dev/examples/index.html

Large diffs are not rendered by default.

369 changes: 184 additions & 185 deletions dev/examples/quantum1d/1.ising-cft/index.html

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions dev/examples/quantum1d/1.ising-cft/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@
{
"cell_type": "markdown",
"source": [
"!!! note \"Krylov dimension\"\n",
" Note that we have specified a large Krylov dimension as degenerate eigenvalues are\n",
" notoriously difficult for iterative methods."
"> **Krylov dimension**\n",
">\n",
"> Note that we have specified a large Krylov dimension as degenerate eigenvalues are\n",
"> notoriously difficult for iterative methods."
],
"metadata": {}
},
Expand Down Expand Up @@ -231,11 +232,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
"version": "1.11.1"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.11",
"display_name": "Julia 1.11.1",
"language": "julia"
}
},
Expand Down
232 changes: 116 additions & 116 deletions dev/examples/quantum1d/2.haldane/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dev/examples/quantum1d/2.haldane/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
"version": "1.11.1"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.11",
"display_name": "Julia 1.11.1",
"language": "julia"
}
},
Expand Down
43 changes: 27 additions & 16 deletions dev/examples/quantum1d/3.ising-dqpt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

L = 20
ψ₀ = FiniteMPS(rand, ComplexF64, L, ℂ^2, ℂ^10)
ψ₀, _ = find_groundstate(ψ₀, H₀, DMRG());</code></pre><pre><code class="nohighlight hljs">[ Info: DMRG init: obj = +9.833992820341e+00 err = 1.5162e-01
[ Info: DMRG 1: obj = -2.040021714792e+01 err = 1.0482607701e-02 time = 0.07 sec
[ Info: DMRG 2: obj = -2.040021715176e+01 err = 2.9301055999e-07 time = 0.02 sec
[ Info: DMRG 3: obj = -2.040021783353e+01 err = 2.1923563339e-05 time = 0.14 sec
[ Info: DMRG 4: obj = -2.040021786702e+01 err = 1.8539117704e-06 time = 0.21 sec
[ Info: DMRG 5: obj = -2.040021786703e+01 err = 7.8191209682e-08 time = 0.04 sec
[ Info: DMRG conv 6: obj = -2.040021786703e+01 err = 6.4920277294e-11 time = 0.49 sec
ψ₀, _ = find_groundstate(ψ₀, H₀, DMRG());</code></pre><pre><code class="nohighlight hljs">[ Info: DMRG init: obj = +9.799964091770e+00 err = 1.5223e-01
[ Info: DMRG 1: obj = -2.040021714743e+01 err = 2.4038839149e-02 time = 0.09 sec
[ Info: DMRG 2: obj = -2.040021715170e+01 err = 6.0313575856e-07 time = 0.07 sec
[ Info: DMRG 3: obj = -2.040021773534e+01 err = 1.6799456960e-05 time = 0.14 sec
[ Info: DMRG 4: obj = -2.040021786694e+01 err = 1.9058246307e-06 time = 0.09 sec
[ Info: DMRG 5: obj = -2.040021786703e+01 err = 1.1474711603e-06 time = 0.05 sec
[ Info: DMRG 6: obj = -2.040021786703e+01 err = 4.3837579221e-10 time = 0.02 sec
[ Info: DMRG conv 7: obj = -2.040021786703e+01 err = 1.9834477158e-11 time = 0.50 sec
</code></pre><h2 id="Finite-MPS-quenching"><a class="docs-heading-anchor" href="#Finite-MPS-quenching">Finite MPS quenching</a><a id="Finite-MPS-quenching-1"></a><a class="docs-heading-anchor-permalink" href="#Finite-MPS-quenching" title="Permalink"></a></h2><p>We can define a helper function that measures the loschmith echo</p><pre><code class="language-julia hljs">echo(ψ₀::FiniteMPS, ψₜ::FiniteMPS) = -2 * log(abs(dot(ψ₀, ψₜ))) / length(ψ₀)
@assert isapprox(echo(ψ₀, ψ₀), 0, atol=1e-10)</code></pre><p>We will initially use a two-site TDVP scheme to dynamically increase the bond dimension while time evolving, and later on switch to a faster one-site scheme. A single timestep can be done using</p><pre><code class="language-julia hljs">H₁ = transverse_field_ising(; g=-2.0)
ψₜ = deepcopy(ψ₀)
Expand All @@ -32,14 +33,24 @@

return times, echos
end</code></pre><pre><code class="nohighlight hljs">finite_sim (generic function with 1 method)</code></pre><p><img src="finite_timeev.png" alt/></p><h2 id="Infinite-MPS-quenching"><a class="docs-heading-anchor" href="#Infinite-MPS-quenching">Infinite MPS quenching</a><a id="Infinite-MPS-quenching-1"></a><a class="docs-heading-anchor-permalink" href="#Infinite-MPS-quenching" title="Permalink"></a></h2><p>Similarly we could start with an initial infinite state and find the pre-quench groundstate:</p><pre><code class="language-julia hljs">ψ₀ = InfiniteMPS([ℂ^2], [ℂ^10])
ψ₀, _ = find_groundstate(ψ₀, H₀, VUMPS());</code></pre><pre><code class="nohighlight hljs">[ Info: VUMPS init: obj = +5.083504996507e-01 err = 3.8682e-01
[ Info: VUMPS 1: obj = -1.060586960116e+00 err = 4.7773289906e-02 time = 1.51 sec
[ Info: VUMPS 2: obj = -1.063544400328e+00 err = 8.6203478863e-05 time = 0.01 sec
[ Info: VUMPS 3: obj = -1.063544409973e+00 err = 2.6470717828e-07 time = 0.01 sec
[ Info: VUMPS 4: obj = -1.063544409973e+00 err = 8.9760940163e-09 time = 0.00 sec
[ Info: VUMPS 5: obj = -1.063544409973e+00 err = 4.1698951454e-10 time = 0.00 sec
[ Info: VUMPS conv 6: obj = -1.063544409973e+00 err = 3.7060383050e-11 time = 1.53 sec
</code></pre><p>The dot product of two infinite matrix product states scales as <span>$\alpha ^N$</span> where <span>$α$</span> is the dominant eigenvalue of the transfer matrix. It is this <span>$α$</span> that is returned when calling</p><pre><code class="language-julia hljs">dot(ψ₀, ψ₀)</code></pre><pre><code class="nohighlight hljs">0.9999999999999964 - 7.217459182439675e-17im</code></pre><p>so the loschmidth echo takes on the pleasant form</p><pre><code class="language-julia hljs">echo(ψ₀::InfiniteMPS, ψₜ::InfiniteMPS) = -2 * log(abs(dot(ψ₀, ψₜ)))
ψ₀, _ = find_groundstate(ψ₀, H₀, VUMPS());</code></pre><pre><code class="nohighlight hljs">[ Info: VUMPS init: obj = +5.000419382862e-01 err = 3.8507e-01
[ Info: VUMPS 1: obj = -1.062780898337e+00 err = 2.4151374798e-02 time = 1.31 sec
┌ Warning: ignoring imaginary component -3.817802691569172e-6 from total weight 2.4343214394239743: operator might not be hermitian?
│ α = 1.7081089443203243 - 3.817802691569172e-6im
│ β₁ = 0.14004438155194618
│ β₂ = 1.7287776826281838
└ @ KrylovKit ~/.julia/packages/KrylovKit/xccMN/src/factorizations/lanczos.jl:170
┌ Warning: ignoring imaginary component -4.33258309393697e-6 from total weight 3.290563788912538: operator might not be hermitian?
│ α = 2.784222669687663 - 4.33258309393697e-6im
│ β₁ = 0.13141322180957496
│ β₂ = 1.7488981501547187
└ @ KrylovKit ~/.julia/packages/KrylovKit/xccMN/src/factorizations/lanczos.jl:170
[ Info: VUMPS 2: obj = -1.063544409753e+00 err = 1.4337063091e-05 time = 0.08 sec
[ Info: VUMPS 3: obj = -1.063544409973e+00 err = 1.7048015038e-07 time = 0.01 sec
[ Info: VUMPS 4: obj = -1.063544409973e+00 err = 1.7183182449e-08 time = 0.01 sec
[ Info: VUMPS 5: obj = -1.063544409973e+00 err = 5.8865202016e-10 time = 0.01 sec
[ Info: VUMPS conv 6: obj = -1.063544409973e+00 err = 6.8020365686e-11 time = 1.42 sec
</code></pre><p>The dot product of two infinite matrix product states scales as <span>$\alpha ^N$</span> where <span>$α$</span> is the dominant eigenvalue of the transfer matrix. It is this <span>$α$</span> that is returned when calling</p><pre><code class="language-julia hljs">dot(ψ₀, ψ₀)</code></pre><pre><code class="nohighlight hljs">1.0000000000000018 - 7.06078012856404e-16im</code></pre><p>so the loschmidth echo takes on the pleasant form</p><pre><code class="language-julia hljs">echo(ψ₀::InfiniteMPS, ψₜ::InfiniteMPS) = -2 * log(abs(dot(ψ₀, ψₜ)))
@assert isapprox(echo(ψ₀, ψ₀), 0, atol=1e-10)</code></pre><p>This time we cannot use a two-site scheme to grow the bond dimension, as this isn&#39;t implemented (yet). Instead, we have to make use of the changebonds machinery. Multiple algorithms are available, but we will only focus on <code>OptimalEpand()</code>. Growing the bond dimension by <span>$5$</span> can be done by calling:</p><pre><code class="language-julia hljs">ψₜ = deepcopy(ψ₀)
ψₜ, envs = changebonds(ψₜ, H₁, OptimalExpand(; trscheme=truncdim(5)));</code></pre><p>a single timestep is easy</p><pre><code class="language-julia hljs">dt = 0.01
ψₜ, envs = timestep(ψₜ, H₁, 0, dt, TDVP(), envs);</code></pre><p>With performance in mind we should once again try to re-use these &quot;envs&quot; cache objects. The final code is</p><pre><code class="language-julia hljs">function infinite_sim(dt=0.05, finaltime=5.0)
Expand All @@ -61,4 +72,4 @@
end

return times, echos
end</code></pre><pre><code class="nohighlight hljs">infinite_sim (generic function with 3 methods)</code></pre><p><img src="infinite_timeev.png" alt/></p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Tuesday 19 November 2024 01:09">Tuesday 19 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><pre><code class="nohighlight hljs">infinite_sim (generic function with 3 methods)</code></pre><p><img src="infinite_timeev.png" alt/></p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Friday 22 November 2024 12:37">Friday 22 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
6 changes: 3 additions & 3 deletions dev/examples/quantum1d/3.ising-dqpt/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
"version": "1.11.1"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.4",
"name": "julia-1.11",
"display_name": "Julia 1.11.1",
"language": "julia"
}
},
Expand Down
Loading

0 comments on commit 570ff2b

Please sign in to comment.