-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Nov 15, 2023
1 parent
286b48c
commit 3aa338f
Showing
73 changed files
with
4,302 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>DMRG · ITensors.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script><link href="assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="ITensors.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">ITensors.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Introduction</a></li><li><span class="tocitem">Getting Started with ITensor</span><ul><li><a class="tocitem" href="getting_started/Installing.html">Installing Julia and ITensor</a></li><li><a class="tocitem" href="getting_started/RunningCodes.html">Running ITensor and Julia Codes</a></li><li><a class="tocitem" href="getting_started/DebugChecks.html">Enabling Debug Checks</a></li><li><a class="tocitem" href="getting_started/NextSteps.html">Next Steps</a></li></ul></li><li><span class="tocitem">Tutorials</span><ul><li><a class="tocitem" href="tutorials/DMRG.html">DMRG</a></li><li><a class="tocitem" href="tutorials/QN_DMRG.html">Quantum Number Conserving DMRG</a></li><li><a class="tocitem" href="tutorials/MPSTimeEvolution.html">MPS Time Evolution</a></li></ul></li><li><span class="tocitem">Code Examples</span><ul><li><a class="tocitem" href="examples/ITensor.html">ITensor Examples</a></li><li><a class="tocitem" href="examples/MPSandMPO.html">MPS and MPO Examples</a></li><li><a class="tocitem" href="examples/DMRG.html">DMRG Examples</a></li><li><a class="tocitem" href="examples/Physics.html">Physics (SiteType) System Examples</a></li></ul></li><li><span class="tocitem">Documentation</span><ul><li><a class="tocitem" href="IndexType.html">Index</a></li><li><a class="tocitem" href="IndexSetType.html">Index collections</a></li><li><a class="tocitem" href="ITensorType.html">ITensor</a></li><li><a class="tocitem" href="MPSandMPO.html">MPS and MPO</a></li><li><a class="tocitem" href="QN.html">QN</a></li><li><a class="tocitem" href="SiteType.html">SiteType and op, state, val functions</a></li><li><a class="tocitem" href="IncludedSiteTypes.html">SiteTypes Included with ITensor</a></li><li><input class="collapse-toggle" id="menuitem-5-8" type="checkbox" checked/><label class="tocitem" for="menuitem-5-8"><span class="docs-label">DMRG</span><i class="docs-chevron"></i></label><ul class="collapsed"><li class="is-active"><a class="tocitem" href="DMRG.html">DMRG</a></li><li><a class="tocitem" href="Sweeps.html">Sweeps</a></li><li><a class="tocitem" href="ProjMPO.html">ProjMPO</a></li><li><a class="tocitem" href="ProjMPOSum.html">ProjMPOSum</a></li><li><a class="tocitem" href="Observer.html">Observer System for DMRG</a></li><li><a class="tocitem" href="DMRGObserver.html">DMRGObserver</a></li></ul></li><li><a class="tocitem" href="OpSum.html">OpSum (AutoMPO)</a></li></ul></li><li><span class="tocitem">Frequently Asked Questions</span><ul><li><a class="tocitem" href="faq/JuliaAndCpp.html">Programming Language (Julia, C++, ...) FAQs</a></li><li><a class="tocitem" href="faq/DMRG.html">DMRG FAQs</a></li><li><a class="tocitem" href="faq/QN.html">Quantum Number (QN) FAQs</a></li><li><a class="tocitem" href="faq/Development.html">ITensor Development FAQs</a></li><li><a class="tocitem" href="faq/RelationshipToOtherLibraries.html">Relationship of ITensor to other tensor libraries FAQs</a></li><li><a class="tocitem" href="faq/JuliaPkg.html">Julia Package Manager FAQs</a></li><li><a class="tocitem" href="faq/HPC.html">High-Performance Computing FAQs</a></li></ul></li><li><span class="tocitem">Upgrade guides</span><ul><li><a class="tocitem" href="UpgradeGuide_0.1_to_0.2.html">Upgrading from 0.1 to 0.2</a></li></ul></li><li><a class="tocitem" href="Einsum.html">ITensor indices and Einstein notation</a></li><li><span class="tocitem">Advanced Usage Guide</span><ul><li><a class="tocitem" href="AdvancedUsageGuide.html">Advanced Usage Guide</a></li><li><a class="tocitem" href="Multithreading.html">Multithreading</a></li><li><a class="tocitem" href="QNTricks.html">Symmetric (QN conserving) tensors: background and usage</a></li><li><a class="tocitem" href="CodeTiming.html">Timing and profiling</a></li><li><a class="tocitem" href="ContractionSequenceOptimization.html">Contraction sequence optimization</a></li><li><a class="tocitem" href="HDF5FileFormats.html">HDF5 File Formats</a></li></ul></li><li><a class="tocitem" href="DeveloperGuide.html">Developer Guide</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Documentation</a></li><li><a class="is-disabled">DMRG</a></li><li class="is-active"><a href="DMRG.html">DMRG</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="DMRG.html">DMRG</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/ITensor/ITensors.jl/blob/main/docs/src/DMRG.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="DMRG"><a class="docs-heading-anchor" href="#DMRG">DMRG</a><a id="DMRG-1"></a><a class="docs-heading-anchor-permalink" href="#DMRG" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="ITensors.dmrg" href="#ITensors.dmrg"><code>ITensors.dmrg</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">dmrg(H::MPO, psi0::MPS; kwargs...) | ||
dmrg(H::MPO, psi0::MPS, sweeps::Sweeps; kwargs...)</code></pre><p>Use the density matrix renormalization group (DMRG) algorithm to optimize a matrix product state (MPS) such that it is the eigenvector of lowest eigenvalue of a Hermitian matrix <code>H</code>, represented as a matrix product operator (MPO).</p><pre><code class="nohighlight hljs">dmrg(Hs::Vector{MPO}, psi0::MPS; kwargs...) | ||
dmrg(Hs::Vector{MPO}, psi0::MPS, sweeps::Sweeps; kwargs...)</code></pre><p>Use the density matrix renormalization group (DMRG) algorithm to optimize a matrix product state (MPS) such that it is the eigenvector of lowest eigenvalue of a Hermitian matrix <code>H</code>. This version of <code>dmrg</code> accepts a representation of H as a Vector of MPOs, <code>Hs = [H1, H2, H3, ...]</code> such that <code>H</code> is defined <code>as H = H1 + H2 + H3 + ...</code> Note that this sum of MPOs is not actually computed; rather the set of MPOs <code>[H1,H2,H3,..]</code> is efficiently looped over at each step of the DMRG algorithm when optimizing the MPS.</p><pre><code class="nohighlight hljs">dmrg(H::MPO, Ms::Vector{MPS}, psi0::MPS; weight=1.0, kwargs...) | ||
dmrg(H::MPO, Ms::Vector{MPS}, psi0::MPS, sweeps::Sweeps; weight=1.0, kwargs...)</code></pre><p>Use the density matrix renormalization group (DMRG) algorithm to optimize a matrix product state (MPS) such that it is the eigenvector of lowest eigenvalue of a Hermitian matrix <code>H</code>, subject to the constraint that the MPS is orthogonal to each of the MPS provided in the Vector <code>Ms</code>. The orthogonality constraint is approximately enforced by adding to <code>H</code> terms of the form <code>w|M1><M1| + w|M2><M2| + ...</code> where <code>Ms=[M1, M2, ...]</code> and <code>w</code> is the "weight" parameter, which can be adjusted through the optional <code>weight</code> keyword argument.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p><code>dmrg</code> will report the energy of the operator <code>H + w|M1><M1| + w|M2><M2| + ...</code>, not the operator <code>H</code>. If you want the expectation value of the MPS eigenstate with respect to just <code>H</code>, you can compute it yourself with an observer or after DMRG is run with <code>inner(psi', H, psi)</code>.</p></div></div><p>The MPS <code>psi0</code> is used to initialize the MPS to be optimized.</p><p>The number of sweeps of thd DMRG algorithm is controlled by passing the <code>nsweeps</code> keyword argument. The keyword arguments <code>maxdim</code>, <code>cutoff</code>, <code>noise</code>, and <code>mindim</code> can also be passed to control the cost versus accuracy of the algorithm - see below for details.</p><p>Alternatively the number of sweeps and accuracy parameters can be passed through a <code>Sweeps</code> object, though this interface is no longer preferred.</p><p>Returns:</p><ul><li><code>energy::Number</code> - eigenvalue of the optimized MPS</li><li><code>psi::MPS</code> - optimized MPS</li></ul><p>Keyword arguments:</p><ul><li><code>nsweeps::Int</code> - number of "sweeps" of DMRG to perform</li></ul><p>Optional keyword arguments:</p><ul><li><code>maxdim</code> - integer or array of integers specifying the maximum size allowed for the bond dimension or rank of the MPS being optimized.</li><li><code>cutoff</code> - float or array of floats specifying the truncation error cutoff or threshold to use for truncating the bond dimension or rank of the MPS.</li><li><code>eigsolve_krylovdim::Int = 3</code> - maximum dimension of Krylov space used to locally solve the eigenvalue problem. Try setting to a higher value if convergence is slow or the Hamiltonian is close to a critical point. <sup class="footnote-reference"><a id="citeref-krylovkit" href="#footnote-krylovkit">[krylovkit]</a></sup></li><li><code>eigsolve_tol::Number = 1e-14</code> - Krylov eigensolver tolerance. <sup class="footnote-reference"><a id="citeref-krylovkit" href="#footnote-krylovkit">[krylovkit]</a></sup></li><li><code>eigsolve_maxiter::Int = 1</code> - number of times the Krylov subspace can be rebuilt. <sup class="footnote-reference"><a id="citeref-krylovkit" href="#footnote-krylovkit">[krylovkit]</a></sup></li><li><code>eigsolve_verbosity::Int = 0</code> - verbosity level of the Krylov solver. Warning: enabling this will lead to a lot of outputs to the terminal. <sup class="footnote-reference"><a id="citeref-krylovkit" href="#footnote-krylovkit">[krylovkit]</a></sup></li><li><code>ishermitian=true</code> - boolean specifying if dmrg should assume the MPO (or more general linear operator) represents a Hermitian matrix. <sup class="footnote-reference"><a id="citeref-krylovkit" href="#footnote-krylovkit">[krylovkit]</a></sup></li><li><code>noise</code> - float or array of floats specifying strength of the "noise term" to use to aid convergence.</li><li><code>mindim</code> - integer or array of integers specifying the minimum size of the bond dimension or rank, if possible.</li><li><code>outputlevel::Int = 1</code> - larger outputlevel values make DMRG print more information and 0 means no output.</li><li><code>observer</code> - object implementing the <a href="Observer.html#observer">Observer</a> interface which can perform measurements and stop DMRG early.</li><li><code>write_when_maxdim_exceeds::Int</code> - when the allowed maxdim exceeds this value, begin saving tensors to disk to free RAM memory in large calculations</li><li><code>write_path::String = tempdir()</code> - path to use to save files to disk (to save RAM) when maxdim exceeds the <code>write_when_maxdim_exceeds</code> option, if set</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ITensor/ITensors.jl/blob/f35bee8c4fb4dfe3ac4c6b84a3113f510adfb613/src/mps/dmrg.jl#L57-L155">source</a></section></article><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-krylovkit"><a class="tag is-link" href="#citeref-krylovkit">krylovkit</a>The <code>dmrg</code> function in <code>ITensors.jl</code> currently uses the <code>eigsolve</code> function in <code>KrylovKit.jl</code> as the internal the eigensolver. See the <code>KrylovKit.jl</code> documention on the <code>eigsolve</code> function for more details: <a href="https://jutho.github.io/KrylovKit.jl/stable/man/eig/#KrylovKit.eigsolve">KrylovKit.eigsolve</a>.</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="IncludedSiteTypes.html">« SiteTypes Included with ITensor</a><a class="docs-footer-nextpage" href="Sweeps.html">Sweeps »</a><div class="flexbox-break"></div><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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 15 November 2023 00:09">Wednesday 15 November 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.