diff --git a/.github/workflows/DocumentationCleanup.yml b/.github/workflows/DocumentationCleanup.yml new file mode 100644 index 000000000..5be23b964 --- /dev/null +++ b/.github/workflows/DocumentationCleanup.yml @@ -0,0 +1,33 @@ +name: Doc Preview Cleanup + +on: + pull_request: + types: [closed] + +# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time +concurrency: + group: doc-preview-cleanup + cancel-in-progress: false + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "${preview_dir}" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "${preview_dir}" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + preview_dir: previews/PR${{ github.event.number }} diff --git a/Project.toml b/Project.toml index 5d5c7a088..e49759e8d 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "0.12.0" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" BlockTensorKit = "5f87ffc2-9cf1-4a46-8172-465d160bd8cd" +DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" FLoops = "cc61a311-1640-44b5-9fba-1b764f453329" FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" FoldsThreads = "9c68100b-dfe1-47cf-94c8-95104e173443" @@ -28,6 +29,7 @@ VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" Accessors = "0.1" Aqua = "0.8.9" BlockTensorKit = "0.1.1" +DocStringExtensions = "0.9.3" FLoops = "0.1, 0.2" FastClosures = "0.3" FoldsThreads = "0.1" diff --git a/docs/Project.toml b/docs/Project.toml index cbe427a7b..83ae9b5ef 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,5 +1,7 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656" KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" diff --git a/docs/make.jl b/docs/make.jl index 83870f8d1..982ecb25f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -9,7 +9,10 @@ end using MPSKit using Documenter +using DocumenterCitations +using DocumenterInterLinks +# examples example_dir = joinpath(@__DIR__, "src", "examples") classic_pages = map(readdir(joinpath(example_dir, "classic2d"))) do dir return joinpath("examples", "classic2d", dir, "index.md") @@ -18,6 +21,15 @@ quantum_pages = map(readdir(joinpath(example_dir, "quantum1d"))) do dir return joinpath("examples", "quantum1d", dir, "index.md") end +# bibliography +bibpath = joinpath(@__DIR__, "src", "assets", "mpskit.bib") +bib = CitationBibliography(bibpath; style=:authoryear) + +# interlinks +links = InterLinks("TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/", + "TensorOperations" => "https://jutho.github.io/TensorOperations.jl/stable/", + "KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/") + # include MPSKit in all doctests DocMeta.setdocmeta!(MPSKit, :DocTestSetup, :(using MPSKit, TensorKit); recursive=true) @@ -26,7 +38,6 @@ mathengine = MathJax3(Dict(:loader => Dict("load" => ["[tex]/physics"]), "tags" => "ams", "packages" => ["base", "ams", "autoload", "physics"]))) makedocs(; - modules=[MPSKit], sitename="MPSKit.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true", @@ -41,7 +52,9 @@ makedocs(; "man/parallelism.md", "man/lattices.md"], "Examples" => "examples/index.md", - "Library" => "lib/lib.md"], - warnonly=true) + "Library" => "lib/lib.md", + "References" => "references.md"], + checkdocs=:exports, + plugins=[bib, links]) -deploydocs(; repo="github.com/QuantumKitHub/MPSKit.jl.git") +deploydocs(; repo="github.com/QuantumKitHub/MPSKit.jl.git", push_preview=true) diff --git a/docs/src/assets/mpskit.bib b/docs/src/assets/mpskit.bib new file mode 100644 index 000000000..11b22006a --- /dev/null +++ b/docs/src/assets/mpskit.bib @@ -0,0 +1,457 @@ +@article{belyansky2024, + title = {High-{{Energy Collision}} of {{Quarks}} and {{Mesons}} in the {{Schwinger Model}}: {{From Tensor Networks}} to {{Circuit QED}}}, + shorttitle = {High-{{Energy Collision}} of {{Quarks}} and {{Mesons}} in the {{Schwinger Model}}}, + author = {Belyansky, Ron and Whitsitt, Seth and Mueller, Niklas and Fahimniya, Ali and Bennewitz, Elizabeth R. and Davoudi, Zohreh and Gorshkov, Alexey V.}, + year = {2024}, + month = feb, + journal = {Physical Review Letters}, + volume = {132}, + number = {9}, + pages = {091903}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.132.091903}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.132.091903}, + abstract = {With the aim of studying nonperturbative out-of-equilibrium dynamics of high-energy particle collisions on quantum simulators, we investigate the scattering dynamics of lattice quantum electrodynamics in 1+1 dimensions. Working in the bosonized formulation of the model and in the thermodynamic limit, we use uniform-matrix-product-state tensor networks to construct multiparticle wave-packet states, evolve them in time, and detect outgoing particles post collision. This facilitates the numerical simulation of scattering experiments in both confined and deconfined regimes of the model at different energies, giving rise to rich phenomenology, including inelastic production of quark and meson states, meson disintegration, and dynamical string formation and breaking. We obtain elastic and inelastic scattering cross sections, together with time-resolved momentum and position distributions of the outgoing particles. Furthermore, we propose an analog circuit-QED implementation of the scattering process that is native to the platform, requires minimal ingredients and approximations, and enables practical schemes for particle wave-packet preparation and evolution. This study highlights the role of classical and quantum simulation in enhancing our understanding of scattering processes in quantum field theories in real time.} +} + +@article{capponi2025, + title = {Non-{{Landau}} Quantum Phase Transition in Modulated {{SU}}(\${{N}}\$) {{Heisenberg}} Spin Chains}, + author = {Capponi, Sylvain and Devos, Lukas and Lecheminant, Philippe and Totsuka, Keisuke and Vanderstraeten, Laurens}, + year = {2025}, + month = jan, + journal = {Physical Review B}, + volume = {111}, + number = {2}, + pages = {L020404}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.111.L020404}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.111.L020404}, + abstract = {We investigate the nature of the quantum phase transition in modulated Heisenberg spin chains. In the odd- case, the transition separates a trivial nondegenerate phase to a doubly degenerate gapped chiral symmetry-protected topological (SPT) phase which breaks spontaneously the inversion symmetry. The transition is not an Ising transition associated to the breaking of the inversion symmetry, but is governed by the delocalization of the edge states of the SPT phase. In this respect, a modulated Heisenberg spin chain provides a simple example in one dimension of a non-Landau phase transition which is described by the conformal field theory. We show that the chiral SPT phase exhibits fractionalized spinon excitations, which can be confined by slightly changing the model parameters.} +} + +@article{chepiga2017, + title = {Excitation Spectrum and Density Matrix Renormalization Group Iterations}, + author = {Chepiga, Natalia and Mila, Fr{\'e}d{\'e}ric}, + year = {2017}, + month = aug, + journal = {Physical Review B}, + volume = {96}, + number = {5}, + pages = {054425}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.96.054425}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.96.054425}, + abstract = {We show that, in certain circumstances, exact excitation energies appear as locally site-independent (or flat) modes if one records the excitation spectrum of the effective Hamiltonian while sweeping through the lattice in the variational matrix-product-state formulation of the density matrix renormalization group, a remarkable property since the effective Hamiltonian is only constructed to target the ground state. Conversely, modes that are very flat over several consecutive iterations are systematically found to correspond to faithful excitations. We suggest to use this property to extract accurate information about excited states using the standard ground-state algorithm. The results are spectacular for critical systems, for which the low-energy conformal tower of states can be obtained very accurately at essentially no additional cost, as demonstrated by confirming the predictions of boundary conformal field theory for two simple minimal models: the transverse-field Ising model and the critical three-state Potts model. This approach is also very efficient to detect the quasidegenerate low-energy excitations in topological phases and to identify localized excitations in systems with impurities. Finally, using the variance of the Hamiltonian as a criterion, we assess the accuracy of the resulting matrix-product-state representations of the excited states.} +} + +@article{crotti2024, + title = {Nonequilibrium Steady-State Dynamics of {{Markov}} Processes on Graphs}, + author = {Crotti, Stefano and Barthel, Thomas and Braunstein, Alfredo}, + year = {2024}, + month = dec, + journal = {arXiv.2411.19100}, + eprint = {2411.19100}, + primaryclass = {cond-mat}, + doi = {10.48550/arXiv.2411.19100}, + url = {http://arxiv.org/abs/2411.19100}, + abstract = {We propose an analytic approach for the steady-state dynamics of Markov processes on locally tree-like graphs. It is based on the definition of a probability distribution for infinite edge trajectories in terms of infinite matrix products. For homogeneous ensembles on regular graphs, the distribution is parametrized by a single \$d{\textbackslash}times d{\textbackslash}times r{\textasciicircum}2\$ tensor, where \$r\$ is the number of states per variable and \$d\$ is the matrix-product bond dimension. While the approach becomes exact in the large-\$d\$ limit, it usually produces extremely accurate results even for small \$d\$. The \$d{\textasciicircum}2r{\textasciicircum}2\$ parameters are found by solving a fixed point equation, for which we provide an efficient belief-propagation procedure. We apply it to a variety of models, including Ising-Glauber dynamics with symmetric and asymmetric couplings and the SIS model. Even for small \$d\$, the results are compatible with Monte Carlo estimates and accurately reproduce known exact solutions. The method gives access to accurate temporal correlations which, in some regimes, may be virtually impossible to estimate by sampling.}, + archiveprefix = {arXiv}, + keywords = {Condensed Matter - Disordered Systems and Neural Networks,Condensed Matter - Statistical Mechanics} +} + +@article{devos2022, + title = {Haldane Gap in the {{SU}}(3) [3 0 0] {{Heisenberg}} Chain}, + author = {Devos, Lukas and Vanderstraeten, Laurens and Verstraete, Frank}, + year = {2022}, + month = oct, + journal = {Physical Review B}, + volume = {106}, + number = {15}, + pages = {155103}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.106.155103}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.106.155103}, + abstract = {We calculate the Haldane gap of the SU⁡(3) spin [300] Heisenberg model using variational uniform fully symmetric SU⁡(3) matrix product states, and find that the minimal gap {$\Delta$}/{$J$}=0.0263 is obtained in the [210] sector at momentum 2⁢{$\pi$}/3. We also discuss the symmetry protected topological order of the ground state, and determine the full dispersion relation of the elementary excitations and the correlation lengths of the system.} +} + +@article{haegeman2011, + title = {Time-{{Dependent Variational Principle}} for {{Quantum Lattices}}}, + author = {Haegeman, Jutho and Cirac, J. Ignacio and Osborne, Tobias J. and Pi{\v z}orn, Iztok and Verschelde, Henri and Verstraete, Frank}, + year = {2011}, + month = aug, + journal = {Physical Review Letters}, + volume = {107}, + number = {7}, + pages = {070601}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.107.070601}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.107.070601}, + abstract = {We develop a new algorithm based on the time-dependent variational principle applied to matrix product states to efficiently simulate the real- and imaginary-time dynamics for infinite one-dimensional quantum lattices. This procedure (i) is argued to be optimal, (ii) does not rely on the Trotter decomposition and thus has no Trotter error, (iii) preserves all symmetries and conservation laws, and (iv) has low computational complexity. The algorithm is illustrated by using both an imaginary-time and a real-time example.} +} + +@article{haegeman2013, + title = {Elementary {{Excitations}} in {{Gapped Quantum Spin Systems}}}, + author = {Haegeman, Jutho and Michalakis, Spyridon and Nachtergaele, Bruno and Osborne, Tobias J. and Schuch, Norbert and Verstraete, Frank}, + year = {2013}, + month = aug, + journal = {Physical Review Letters}, + volume = {111}, + number = {8}, + pages = {080401}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.111.080401}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.111.080401}, + abstract = {For quantum lattice systems with local interactions, the Lieb-Robinson bound serves as an alternative for the strict causality of relativistic systems and allows the proof of many interesting results, in particular, when the energy spectrum exhibits an energy gap. In this Letter, we show that for translation invariant systems, simultaneous eigenstates of energy and momentum with an eigenvalue that is separated from the rest of the spectrum in that momentum sector can be arbitrarily well approximated by building a momentum superposition of a local operator acting on the ground state. The error satisfies an exponential bound in the size of the support of the local operator, with a rate determined by the gap below and above the targeted eigenvalue. We show this explicitly for the Affleck-Kennedy-Lieb-Tasaki model and discuss generalizations and applications of our result.} +} + +@article{halimeh2021, + title = {Local Measures of Dynamical Quantum Phase Transitions}, + author = {Halimeh, Jad C. and Trapin, Daniele and Van Damme, Maarten and Heyl, Markus}, + year = {2021}, + month = aug, + journal = {Physical Review B}, + volume = {104}, + number = {7}, + pages = {075130}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.104.075130}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.104.075130}, + abstract = {In recent years, dynamical quantum phase transitions (DQPTs) have emerged as a useful theoretical concept to characterize nonequilibrium states of quantum matter. DQPTs are marked by singular behavior in an effective free energy {$\lambda$}⁡({$t$}), which, however, is a global measure, making its experimental or theoretical detection challenging in general. We introduce two local measures for the detection of DQPTs with the advantage of requiring fewer resources than the full effective free energy. The first, called the real-local effective free energy {$\lambdaM$}⁡({$t$}), is defined in real space and is therefore suitable for systems where locally resolved measurements are directly accessible such as in quantum-simulator experiments involving Rydberg atoms or trapped ions. We test {$\lambdaM$}⁡({$t$}) in Ising chains with nearest-neighbor and power-law interactions, and find that this measure allows extraction of the universal critical behavior of DQPTs. The second measure we introduce is the momentum-local effective free energy {$\lambdak$}⁡({$t$}), which is targeted at systems where momentum-resolved quantities are more naturally accessible, such as through time-of-flight measurements in ultracold atoms. We benchmark {$\lambdak$}⁡({$t$}) for the Kitaev chain, a paradigmatic system for topological quantum matter, in the presence of weak interactions. Our introduced local measures for effective free energies can further facilitate the detection of DQPTs in modern quantum-simulator experiments.} +} + +@article{halimeh2022, + title = {Achieving the Quantum Field Theory Limit in Far-from-Equilibrium Quantum Link Models}, + author = {Halimeh, Jad C. and Damme, Maarten Van and Zache, Torsten V. and Banerjee, Debasish and Hauke, Philipp}, + year = {2022}, + month = dec, + journal = {Quantum}, + volume = {6}, + pages = {878}, + issn = {2521-327X}, + doi = {10.22331/q-2022-12-19-878}, + url = {https://quantum-journal.org/papers/q-2022-12-19-878/}, + abstract = {Realizations of gauge theories in setups of quantum synthetic matter open up the possibility of probing salient exotic phenomena in condensed matter and high-energy physics, along with potential applications in quantum information and science technologies. In light of the impressive ongoing efforts to achieve such realizations, a fundamental question regarding quantum link model regularizations of lattice gauge theories is how faithfully they capture the quantum field theory limit of gauge theories. Recent work {\textbackslash}cite\{zache2021achieving\} has shown through analytic derivations, exact diagonalization, and infinite matrix product state calculations that the low-energy physics of 1 + 1 D U ( 1 ) quantum link models approaches the quantum field theory limit already at small link spin length S . Here, we show that the approach to this limit also lends itself to the far-from-equilibrium quench dynamics of lattice gauge theories, as demonstrated by our numerical simulations of the Loschmidt return rate and the chiral condensate in infinite matrix product states, which work directly in the thermodynamic limit. Similar to our findings in equilibrium that show a distinct behavior between half-integer and integer link spin lengths, we find that criticality emerging in the Loschmidt return rate is fundamentally different between half-integer and integer spin quantum link models in the regime of strong electric-field coupling. Our results further affirm that state-of-the-art finite-size ultracold-atom and NISQ-device implementations of quantum link lattice gauge theories have the real potential to simulate their quantum field theory limit even in the far-from-equilibrium regime.}, + langid = {english} +} + +@article{hauru2021, + title = {Riemannian Optimization of Isometric Tensor Networks}, + author = {Hauru, Markus and Van Damme, Maarten and Haegeman, Jutho}, + year = {2021}, + month = feb, + journal = {SciPost Physics}, + volume = {10}, + number = {2}, + pages = {040}, + issn = {2542-4653}, + doi = {10.21468/SciPostPhys.10.2.040}, + url = {https://scipost.org/10.21468/SciPostPhys.10.2.040}, + abstract = {SciPost Journals Publication Detail SciPost Phys. 10, 040 (2021) Riemannian optimization of isometric tensor networks}, + langid = {english} +} + +@article{jeckelmann2002, + title = {Dynamical Density-Matrix Renormalization-Group Method}, + author = {Jeckelmann, Eric}, + year = {2002}, + month = jul, + journal = {Physical Review B}, + volume = {66}, + number = {4}, + pages = {045114}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.66.045114}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.66.045114}, + abstract = {A density-matrix renormalization-group (DMRG) method for calculating dynamical properties and excited states in low-dimensional lattice quantum many-body systems is presented. The method is based on an exact variational principle for dynamical correlation functions and the excited states contributing to them. This dynamical DMRG is an alternate formulation of the correction vector DMRG but is both simpler and more accurate. The finite-size scaling of spectral functions is discussed and a method for analyzing the scaling of dense spectra is described. The key idea of the method is a size-dependent broadening of the spectrum. The dynamical DMRG and the finite-size scaling analysis are demonstrated on the optical conductivity of the one-dimensional Peierls-Hubbard model. Comparisons with analytical results show that the spectral functions of infinite systems can be reproduced almost exactly with these techniques. The optical conductivity of the Mott-Peierls insulator is investigated and it is shown that its spectrum is qualitatively different from the simple spectra observed in Peierls (band) insulators and one-dimensional Mott-Hubbard insulators.} +} + +@article{mortier2025, + title = {Fermionic Tensor Network Methods}, + author = {Mortier, Quinten and Devos, Lukas and Burgelman, Lander and Vanhecke, Bram and Bultinck, Nick and Verstraete, Frank and Haegeman, Jutho and Vanderstraeten, Laurens}, + year = {2025}, + month = jan, + journal = {SciPost Physics}, + volume = {18}, + number = {1}, + pages = {012}, + issn = {2542-4653}, + doi = {10.21468/SciPostPhys.18.1.012}, + url = {https://scipost.org/SciPostPhys.18.1.012}, + abstract = {SciPost Journals Publication Detail SciPost Phys. 18, 012 (2025) Fermionic tensor network methods}, + langid = {english} +} + +@article{paeckel2019, + title = {Time-Evolution Methods for Matrix-Product States}, + author = {Paeckel, Sebastian and K{\"o}hler, Thomas and Swoboda, Andreas and Manmana, Salvatore R. and Schollw{\"o}ck, Ulrich and Hubig, Claudius}, + year = {2019}, + month = dec, + journal = {Annals of Physics}, + volume = {411}, + pages = {167998}, + issn = {0003-4916}, + doi = {10.1016/j.aop.2019.167998}, + url = {https://www.sciencedirect.com/science/article/pii/S0003491619302532}, + abstract = {Matrix-product states have become the de facto standard for the representation of one-dimensional quantum many body states. During the last few years, numerous new methods have been introduced to evaluate the time evolution of a matrix-product state. Here, we will review and summarize the recent work on this topic as applied to finite quantum systems. We will explain and compare the different methods available to construct a time-evolved matrix-product state, namely the time-evolving block decimation, the MPO WI,II method, the global Krylov method, the local Krylov method and the one- and two-site time-dependent variational principle. We will also apply these methods to four different representative examples of current problem settings in condensed matter physics.}, + keywords = {Density matrix renormalization group (DMRG),Matrix-product states (MPS),Strongly-correlated systems,Time-dependent variational principle (TDVP),Time-evolution methods,Time-evolving block decimation (TEBD)} +} + +@article{pollmann2009, + title = {Theory of {{Finite-Entanglement Scaling}} at {{One-Dimensional Quantum Critical Points}}}, + author = {Pollmann, Frank and Mukerjee, Subroto and Turner, Ari M. and Moore, Joel E.}, + year = {2009}, + month = jun, + journal = {Physical Review Letters}, + volume = {102}, + number = {25}, + pages = {255701}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.102.255701}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.102.255701}, + abstract = {Studies of entanglement in many-particle systems suggest that most quantum critical ground states have infinitely more entanglement than noncritical states. Standard algorithms for one-dimensional systems construct model states with limited entanglement, which are a worse approximation to quantum critical states than to others. We give a quantitative theory of previously observed scaling behavior resulting from finite entanglement at quantum criticality. Finite-entanglement scaling in one-dimensional systems is governed not by the scaling dimension of an operator but by the "central charge" of the critical point. An important ingredient is the universal distribution of density-matrix eigenvalues at a critical point [P. Calabrese and A. Lefevre, Phys. Rev. A 78, 032329 (2008)]. The parameter-free theory is checked against numerical scaling at several quantum critical points.} +} + +@article{rogerson2024, + title = {Quantum {{Circuit Optimization}} Using {{Differentiable Programming}} of {{Tensor Network States}}}, + author = {Rogerson, David and Roy, Ananda}, + year = {2024}, + month = aug, + journal = {arXiv:2408.12583}, + eprint = {2408.12583}, + primaryclass = {quant-ph}, + doi = {10.48550/arXiv.2408.12583}, + url = {http://arxiv.org/abs/2408.12583}, + abstract = {Efficient quantum circuit optimization schemes are central to quantum simulation of strongly interacting quantum many body systems. Here, we present an optimization algorithm which combines machine learning techniques and tensor network methods. The said algorithm runs on classical hardware and finds shallow, accurate quantum circuits by minimizing scalar cost functions. The gradients relevant for the optimization process are computed using the reverse mode automatic differentiation technique implemented on top of the time-evolved block decimation algorithm for matrix product states. A variation of the ADAM optimizer is utilized to perform a gradient descent on the manifolds of charge conserving unitary operators to find the optimal quantum circuit. The efficacy of this approach is demonstrated by finding the ground states of spin chain Hamiltonians for the Ising, three-state Potts and the massive Schwinger models for system sizes up to L=100. The first ten excited states of these models are also obtained for system sizes L=24. All circuits achieve high state fidelities within reasonable CPU time and modest memory requirements.}, + archiveprefix = {arXiv}, + keywords = {Quantum Physics} +} + +@article{roose2019, + title = {Anomalous Domain Wall Condensation in a Modified {{Ising}} Chain}, + author = {Roose, Gertian and Vanderstraeten, Laurens and Haegeman, Jutho and Bultinck, Nick}, + year = {2019}, + month = may, + journal = {Physical Review B}, + volume = {99}, + number = {19}, + pages = {195132}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.99.195132}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.99.195132}, + abstract = {We construct a one-dimensional local spin Hamiltonian with an intrinsically nonlocal, and therefore anomalous, global {$\mathbb{Z}$}2 symmetry. The model is closely related to the quantum Ising model in a transverse magnetic field, and contains a parameter that can be tuned to spontaneously break the nonlocal {$\mathbb{Z}$}2 symmetry. The Hamiltonian is constructed to capture the unconventional properties of the domain walls in the symmetry-broken phase. Using uniform matrix product states, we obtain the phase diagram that results from condensing the domain walls. We find that the complete phase diagram includes a gapless phase that is separated from the ordered ferromagnetic phase by a Berezinskii-Kosterlitz-Thouless transition, and from the ordered antiferromagnetic phase by a first-order phase transition.} +} + +@article{roose2021, + title = {Lattice Regularisation and Entanglement Structure of the {{Gross-Neveu}} Model}, + author = {Roose, Gertian and Bultinck, Nick and Vanderstraeten, Laurens and Verstraete, Frank and Van Acoleyen, Karel and Haegeman, Jutho}, + year = {2021}, + month = jul, + journal = {Journal of High Energy Physics}, + volume = {2021}, + number = {7}, + pages = {207}, + issn = {1029-8479}, + doi = {10.1007/JHEP07(2021)207}, + url = {https://link.springer.com/10.1007/JHEP07(2021)207}, + abstract = {We construct a Hamiltonian lattice regularisation of the N -flavour GrossNeveu model that manifestly respects the full O(2N ) symmetry, preventing the appearance of any unwanted marginal perturbations to the quantum field theory. In the context of this lattice model, the dynamical mass generation is intimately related to the Coleman-MerminWagner and Lieb-Schultz-Mattis theorems. In particular, the model can be interpreted as lying at the first order phase transition line between a trivial and symmetry-protected topological (SPT) phase, which explains the degeneracy of the elementary kink excitations. We show that our Hamiltonian model can be solved analytically in the large N limit, producing the correct expression for the mass gap. Furthermore, we perform extensive numerical matrix product state simulations for N = 2, thereby recovering the emergent Lorentz symmetry and the proper non-perturbative mass gap scaling in the continuum limit. Finally, our simulations also reveal how the continuum limit manifests itself in the entanglement spectrum. As expected from conformal field theory we find two conformal towers, one tower spanned by the linear representations of O(4), corresponding to the trivial phase, and the other by the projective (i.e. spinor) representations, corresponding to the SPT phase.}, + langid = {english} +} + +@article{roose2022, + title = {The Chiral {{Gross-Neveu}} Model on the Lattice via a {{Landau-forbidden}} Phase Transition}, + author = {Roose, Gertian and Haegeman, Jutho and Van Acoleyen, Karel and Vanderstraeten, Laurens and Bultinck, Nick}, + year = {2022}, + month = jun, + journal = {Journal of High Energy Physics}, + volume = {2022}, + number = {6}, + pages = {19}, + issn = {1029-8479}, + doi = {10.1007/JHEP06(2022)019}, + url = {https://link.springer.com/10.1007/JHEP06(2022)019}, + abstract = {We study the phase diagram of the (1 + 1)-dimensional Gross-Neveu model with both gx2({$\psi$}{\textasciimacron}{$\psi$})2 and gy2({$\psi$}{\textasciimacron}i{$\gamma$}5{$\psi$})2 interaction terms on a spatial lattice. The continuous chiral symmetry, which is present in the continuum model when gx2 = gy2, has a mixed 't Hooft anomaly with the charge conservation symmetry, which guarantees the existence of a massless mode. However, the same 't Hooft anomaly also implies that the continuous chiral symmetry is broken explicitly in our lattice model. Nevertheless, from numerical matrix product state simulations we find that for certain parameters of the lattice model, the continuous chiral symmetry reemerges in the infrared fixed point theory, even at strong coupling. We argue that, in order to understand this phenomenon, it is crucial to go beyond mean-field theory (or, equivalently, beyond the leading order term in a 1/N expansion). Interestingly, on the lattice, the chiral Gross-Neveu model appears at a Landau-forbidden second order phase transition separating two distinct and unrelated symmetry-breaking orders. We point out the crucial role of two different 't Hooft anomalies or Lieb-Schultz-Mattis obstructions for this Landau-forbidden phase transition to occur.}, + langid = {english} +} + +@article{ueda2024, + title = {Chiral {{Edge States Emerging}} on {{Anyon-Net}}}, + author = {Ueda, Atsushi and Inamura, Kansei and Ohmori, Kantaro}, + year = {2024}, + month = nov, + journal = {arXiv:2408.02724}, + eprint = {2408.02724}, + primaryclass = {cond-mat}, + doi = {10.48550/arXiv.2408.02724}, + url = {http://arxiv.org/abs/2408.02724}, + abstract = {We propose a symmetry-based approach to constructing lattice models for chiral topological phases, focusing on non-Abelian anyons. Using a 2+1D version of anyon chains and modular tensor categories(MTCs), we ensure exact MTC symmetry at the microscopic level. Numerical simulations using tensor networks demonstrate chiral edge modes for topological phases with Ising and Fibonacci anyons. Our method contrasts with conventional solvability approaches, providing a new theoretical avenue to explore strongly coupled 2+1D systems, revealing chiral edge states in non-Abelian anyonic systems.}, + archiveprefix = {arXiv}, + keywords = {Condensed Matter - Statistical Mechanics,Condensed Matter - Strongly Correlated Electrons,High Energy Physics - Theory} +} + +@article{vandamme2021, + title = {Efficient Matrix Product State Methods for Extracting Spectral Information on Rings and Cylinders}, + author = {Van Damme, Maarten and Vanhove, Robijn and Haegeman, Jutho and Verstraete, Frank and Vanderstraeten, Laurens}, + year = {2021}, + month = sep, + journal = {Physical Review B}, + volume = {104}, + number = {11}, + pages = {115142}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.104.115142}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.104.115142}, + abstract = {Based on the matrix product state (MPS) formalism, we introduce an ansatz for capturing excited states in finite systems with open boundary conditions, providing a very efficient method for computing, e.g., the spectral gap of quantum spin chains. This method can be straightforwardly implemented on top of an existing density-matrix renormalization group or MPS ground-state code. Although this approach is built on open-boundary MPSs, we also apply it to systems with periodic boundary conditions. Despite the explicit breaking of translation symmetry by the MPS representation, we show that momentum emerges as a good quantum number and can be exploited for labeling excitations on top of MPS ground states. We apply our method to the critical Ising chain on a ring and the classical Potts model on a cylinder. Finally, we apply the same idea to compute excitation spectra for 2D quantum systems on infinite cylinders. Again, despite the explicit breaking of translation symmetry in the periodic direction, we recover momentum as a good quantum number for labeling excitations. We apply this method to the 2D transverse-field Ising model and the half-filled Hubbard model; for the latter, we obtain accurate results for, e.g., the hole dispersion for cylinder circumferences up to eight sites.} +} + +@article{vandamme2022, + title = {Dynamical Quantum Phase Transitions in Spin-\${{S U}}(1)\$ Quantum Link Models}, + author = {Van Damme, Maarten and Zache, Torsten V. and Banerjee, Debasish and Hauke, Philipp and Halimeh, Jad C.}, + year = {2022}, + month = dec, + journal = {Physical Review B}, + volume = {106}, + number = {24}, + pages = {245110}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.106.245110}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.106.245110}, + abstract = {Dynamical quantum phase transitions (DQPTs) are a powerful concept of probing far-from-equilibrium criticality in quantum many-body systems. With the strong ongoing experimental drive to quantum simulate lattice gauge theories, it becomes important to investigate DQPTs in these models in order to better understand their far-from-equilibrium properties. In this work, we use infinite matrix product state techniques to study DQPTs in spin-{$S$} {$U$}⁡(1) quantum link models. Although we are able to reproduce literature results directly connecting DQPTs to a sign change in the dynamical order parameter in the case of {$S$}=1/2 for quenches starting in a vacuum initial state, we find that for different quench protocols or different values of the link spin length {$S>$}1/2 this direct connection is no longer present. In particular, we find that there is an abundance of different types of DQPTs not directly associated with any sign change of the order parameter. Our findings indicate that DQPTs are fundamentally different between the Wilson-Kogut-Susskind limit and its representation through the quantum link formalism.} +} + +@article{vandamme2024, + title = {Efficient Higher-Order Matrix Product Operators for Time Evolution}, + author = {Van Damme, Maarten and Haegeman, Jutho and McCulloch, Ian and Vanderstraeten, Laurens}, + year = {2024}, + month = nov, + journal = {SciPost Physics}, + volume = {17}, + number = {5}, + pages = {135}, + issn = {2542-4653}, + doi = {10.21468/SciPostPhys.17.5.135}, + url = {https://scipost.org/SciPostPhys.17.5.135}, + abstract = {SciPost Journals Publication Detail SciPost Phys. 17, 135 (2024) Efficient higher-order matrix product operators for time evolution}, + langid = {english} +} + +@article{vanderstraeten2019, + title = {Tangent-Space Methods for Uniform Matrix Product States}, + author = {Vanderstraeten, Laurens and Haegeman, Jutho and Verstraete, Frank}, + year = {2019}, + month = jan, + journal = {SciPost Physics Lecture Notes}, + pages = {7}, + issn = {2590-1990}, + doi = {10.21468/SciPostPhysLectNotes.7}, + url = {https://scipost.org/10.21468/SciPostPhysLectNotes.7}, + abstract = {In these lecture notes we give a technical overview of tangent-space methods for matrix product states in the thermodynamic limit. We introduce the manifold of uniform matrix product states, show how to compute different types of observables, and discuss the concept of a tangent space. We explain how to variationally optimize ground-state approximations, implement real-time evolution and describe elementary excitations for a given model Hamiltonian. Also, we explain how matrix product states approximate fixed points of one-dimensional transfer matrices. We show how all these methods can be translated to the language of continuous matrix product states for one-dimensional field theories. We conclude with some extensions of the tangent-space formalism and with an outlook to new applications.} +} + +@article{vanhecke2021, + title = {Tangent-Space Methods for Truncating Uniform {{MPS}}}, + author = {Vanhecke, Bram and Van Damme, Maarten and Haegeman, Jutho and Vanderstraeten, Laurens and Verstraete, Frank}, + year = {2021}, + month = feb, + journal = {SciPost Physics Core}, + volume = {4}, + number = {1}, + pages = {004}, + issn = {2666-9366}, + doi = {10.21468/SciPostPhysCore.4.1.004}, + url = {https://scipost.org/SciPostPhysCore.4.1.004}, + abstract = {SciPost Journals Publication Detail SciPost Phys. Core 4, 004 (2021) Tangent-space methods for truncating uniform MPS}, + langid = {english} +} + +@article{vanhove2022, + title = {Critical {{Lattice Model}} for a {{Haagerup Conformal Field Theory}}}, + author = {Vanhove, Robijn and Lootens, Laurens and Van Damme, Maarten and Wolf, Ramona and Osborne, Tobias J. and Haegeman, Jutho and Verstraete, Frank}, + year = {2022}, + month = jun, + journal = {Physical Review Letters}, + volume = {128}, + number = {23}, + pages = {231602}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.128.231602}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.128.231602}, + abstract = {We use the formalism of strange correlators to construct a critical classical lattice model in two dimensions with the Haagerup fusion category {$\mathcal{H}$}3 as input data. We present compelling numerical evidence in the form of finite entanglement scaling to support a Haagerup conformal field theory (CFT) with central charge {$c$} =2. Generalized twisted CFT spectra are numerically obtained through exact diagonalization of the transfer matrix, and the conformal towers are separated in the spectra through their identification with the topological sectors. It is further argued that our model can be obtained through an orbifold procedure from a larger lattice model with input {$Z$}⁡({$\mathcal{H}$}3), which is the simplest modular tensor category that does not admit an algebraic construction. This provides a counterexample for the conjecture that all rational CFT can be constructed from standard methods.} +} + +@article{weerda2024, + title = {Fractional Quantum {{Hall}} States with Variational Projected Entangled-Pair States: {{A}} Study of the Bosonic {{Harper-Hofstadter}} Model}, + shorttitle = {Fractional Quantum {{Hall}} States with Variational Projected Entangled-Pair States}, + author = {Weerda, Erik Lennart and Rizzi, Matteo}, + year = {2024}, + month = jun, + journal = {Physical Review B}, + volume = {109}, + number = {24}, + pages = {L241117}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.109.L241117}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.109.L241117}, + abstract = {An important class of model Hamiltonians for investigation of topological phases of matter consists of mobile, interacting particles on a lattice subject to a semiclassical gauge field, as exemplified by the bosonic Harper-Hofstadter model. A unique method for investigations of two-dimensional quantum systems are the infinite projected-entangled pair states, as they avoid spurious finite-size effects that can alter the phase structure. However, due to no-go theorems in related cases, this was often conjectured to be impossible in the past. In this Letter, we show that upon variational optimization, the infinite projected-entangled pair states can be used to this end by identifying fractional Hall states in the bosonic Harper-Hofstadter model. The obtained states are characterized by showing exponential decay of bulk correlations, as dictated by a bulk gap, as well as chiral edge modes via the entanglement spectrum.} +} + +@article{yu2021, + title = {Closing of the {{Haldane}} Gap in a Spin-1 {{XXZ}} Chain}, + author = {Yu, Chan and Lee, Ji-Woo}, + year = {2021}, + month = nov, + journal = {Journal of the Korean Physical Society}, + volume = {79}, + number = {9}, + pages = {841--845}, + issn = {1976-8524}, + doi = {10.1007/s40042-021-00283-z}, + url = {https://doi.org/10.1007/s40042-021-00283-z}, + abstract = {We study the energy gaps of a spin-1 XXZ model in one dimension. Using an infinite-size density matrix renormalization group (iDMRG) and a variational uniform matrix product state algorithm (vuMPS), we obtained the energy gaps (\$\$E\_{\textbackslash}mathrm\{g\}\$\$) as a function of anisotropy \$\${\textbackslash}Delta \$\$. We found that the closing point of the energy gap changes as we increase the bond dimension. By scaling the energy gaps, we find the critical points for the Haldane-antiferromagnetic (H\$\${\textbackslash}rightarrow \$\$AF) transition and the Haldane-XY (H\$\${\textbackslash}rightarrow \$\$XY) phase transition. From the gap scaling formulae, \$\$E\_{\textbackslash}mathrm\{g\}({\textbackslash}mathrm\{H\} {\textbackslash}rightarrow {\textbackslash}mathrm\{AF\}) = A({\textbackslash}Delta \_\{c1\} - {\textbackslash}Delta ){\textasciicircum}\{z{\textbackslash}nu \}\$\$and \$\$E\_{\textbackslash}mathrm\{g\}( {\textbackslash}mathrm\{H\} {\textbackslash}rightarrow {\textbackslash}mathrm\{XY\}) = a {\textbackslash}exp (- bz' / {\textbackslash}sqrt\{{\textbackslash}Delta -{\textbackslash}Delta \_\{c2\}\}) \$\$where \$\$z, z'\$\$are dynamical critical exponents, \$\${\textbackslash}nu \$\$is a correlation length critical exponent, \$\${\textbackslash}Delta \_\{c1(2)\}\$\$is the critical point for each transition and A, a, and b are scaling parameters, we obtained information regarding the critical points and the scaling parameters.}, + langid = {english}, + keywords = {Matrix product states,Quantum phase transition,XXZ model} +} + +@article{zaletel2015, + title = {Time-Evolving a Matrix Product State with Long-Ranged Interactions}, + author = {Zaletel, Michael P. and Mong, Roger S. K. and Karrasch, Christoph and Moore, Joel E. and Pollmann, Frank}, + year = {2015}, + month = apr, + journal = {Physical Review B}, + volume = {91}, + number = {16}, + pages = {165112}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.91.165112}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.91.165112}, + abstract = {We introduce a numerical algorithm to simulate the time evolution of a matrix product state under a long-ranged Hamiltonian in moderately entangled systems. In the effectively one-dimensional representation of a system by matrix product states, long-ranged interactions are necessary to simulate not just many physical interactions but also higher-dimensional problems with short-ranged interactions. Since our method overcomes the restriction to short-ranged Hamiltonians of most existing methods, it proves particularly useful for studying the dynamics of both power-law interacting, one-dimensional systems, such as Coulombic and dipolar systems, and quasi-two-dimensional systems, such as strips or cylinders. First, we benchmark the method by verifying a long-standing theoretical prediction for the dynamical correlation functions of the Haldane-Shastry model. Second, we simulate the time evolution of an expanding cloud of particles in the two-dimensional Bose-Hubbard model, a subject of several recent experiments.} +} + +@article{zauner-stauber2018, + title = {Variational Optimization Algorithms for Uniform Matrix Product States}, + author = {{Zauner-Stauber}, V. and Vanderstraeten, L. and Fishman, M. T. and Verstraete, F. and Haegeman, J.}, + year = {2018}, + month = jan, + journal = {Physical Review B}, + volume = {97}, + number = {4}, + pages = {045145}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.97.045145}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.97.045145}, + abstract = {We combine the density matrix renormalization group (DMRG) with matrix product state tangent space concepts to construct a variational algorithm for finding ground states of one-dimensional quantum lattices in the thermodynamic limit. A careful comparison of this variational uniform matrix product state algorithm (VUMPS) with infinite density matrix renormalization group (IDMRG) and with infinite time evolving block decimation (ITEBD) reveals substantial gains in convergence speed and precision. We also demonstrate that VUMPS works very efficiently for Hamiltonians with long-range interactions and also for the simulation of two-dimensional models on infinite cylinders. The new algorithm can be conveniently implemented as an extension of an already existing DMRG implementation.} +} + +@article{zhang2023, + title = {Universal {{Scaling}} of {{Klein Bottle Entropy}} near {{Conformal Critical Points}}}, + author = {Zhang, Yueshui and Hulsch, Anton and Zhang, Hua-Chen and Tang, Wei and Wang, Lei and Tu, Hong-Hao}, + year = {2023}, + month = apr, + journal = {Physical Review Letters}, + volume = {130}, + number = {15}, + pages = {151602}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevLett.130.151602}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.130.151602}, + abstract = {We show that the Klein bottle entropy [H.-H. Tu, Phys. Rev. Lett. 119, 261603 (2017)] for conformal field theories perturbed by a relevant operator is a universal function of the dimensionless coupling constant. The universal scaling of the Klein bottle entropy near criticality provides an efficient approach to extract the scaling dimension of lattice operators via data collapse. As paradigmatic examples, we validate the universal scaling of the Klein bottle entropy for Ising and {$\mathbb{Z}$}3 parafermion conformal field theories with various perturbations using numerical simulation with continuous matrix product operator approach.} +} diff --git a/docs/src/index.md b/docs/src/index.md index 7e2c3bbdf..18c8c5813 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -201,23 +201,3 @@ not be fully documented yet. If you encounter any issues or have questions, plea library's [issue tracker](https://github.com/QuantumKitHub/MPSKit.jl/issues) on the GitHub repository and open a new issue. -## Publications using MPSKit - -Below you can find a list of publications that have made use of MPSKit. If you have used -this package and wish to have your publication added to this list, please open a pull -request or an issue on the [GitHub repository](https://github.com/QuantumKitHub/MPSKit.jl/). - -- R. Belyansky et al., *“High-Energy Collision of Quarks and Hadrons in the Schwinger Model: From Tensor Networks to Circuit QED,”* 2023, doi: 10.48550/ARXIV.2307.02522. -- L. Devos, L. Vanderstraeten, and F. Verstraete, *“Haldane gap in the SU(3) [3 0 0] Heisenberg chain,”* Phys. Rev. B, vol. 106, no. 15, p. 155103, Oct. 2022, doi: 10.1103/PhysRevB.106.155103. -- J. C. Halimeh, M. V. Damme, T. V. Zache, D. Banerjee, and P. Hauke, *“Achieving the quantum field theory limit in far-from-equilibrium quantum link models,”* Quantum, vol. 6, p. 878, Dec. 2022, doi: 10.22331/q-2022-12-19-878. -- J. C. Halimeh, D. Trapin, M. Van Damme, and M. Heyl, *“Local measures of dynamical quantum phase transitions,”* Phys. Rev. B, vol. 104, no. 7, p. 075130, Aug. 2021, doi: 10.1103/PhysRevB.104.075130. -- M. Hauru, M. Van Damme, and J. Haegeman, *“Riemannian optimization of isometric tensor networks,”* SciPost Physics, vol. 10, no. 2, p. 040, Feb. 2021, doi: 10.21468/SciPostPhys.10.2.040. -- M. Van Damme, R. Vanhove, J. Haegeman, F. Verstraete, and L. Vanderstraeten, *“Efficient matrix product state methods for extracting spectral information on rings and cylinders,”* Phys. Rev. B, vol. 104, no. 11, p. 115142, Sep. 2021, doi: 10.1103/PhysRevB.104.115142. -- M. Van Damme, T. V. Zache, D. Banerjee, P. Hauke, and J. C. Halimeh, *“Dynamical quantum phase transitions in spin-$S$ $\text{U}(1)$ quantum link models,”* Phys. Rev. B, vol. 106, no. 24, p. 245110, Dec. 2022, doi: 10.1103/PhysRevB.106.245110. -- E. L. Weerda and M. Rizzi, *“Fractional quantum Hall states with variational Projected Entangled-Pair States: a study of the bosonic Harper-Hofstadter model,”* 2023, doi: 10.48550/ARXIV.2309.12811. -- C. Yu and J.-W. Lee, *“Closing of the Haldane gap in a spin-1 XXZ chain,”* J. Korean Phys. Soc., vol. 79, no. 9, pp. 841–845, Nov. 2021, doi: 10.1007/s40042-021-00283-z. -- Y. Zhang, A. Hulsch, H.-C. Zhang, W. Tang, L. Wang, and H.-H. Tu, *“Universal Scaling of Klein Bottle Entropy near Conformal Critical Points,”* Phys. Rev. Lett., vol. 130, no. 15, p. 151602, Apr. 2023, doi: 10.1103/PhysRevLett.130.151602. -- Gertian Roose, Laurens Vanderstraeten, Jutho Haegeman, and Nick Bultinck. Anomalous domain wall condensation in a modified ising chain. Phys. Rev. B, 99: 195132, May 2019. 10.1103/​PhysRevB.99.195132. -https:/​/​doi.org/​10.1103/​PhysRevB.99.195132 -- Roose, G., Bultinck, N., Vanderstraeten, L. et al. Lattice regularisation and entanglement structure of the Gross-Neveu model. J. High Energ. Phys. 2021, 207 (2021). https://doi.org/10.1007/JHEP07(2021)207 -- Roose, G., Haegeman, J., Van Acoleyen, K. et al. The chiral Gross-Neveu model on the lattice via a Landau-forbidden phase transition. J. High Energ. Phys. 2022, 19 (2022). https://doi.org/10.1007/JHEP06(2022)019 diff --git a/docs/src/lib/lib.md b/docs/src/lib/lib.md index 64bc81294..b1645c273 100644 --- a/docs/src/lib/lib.md +++ b/docs/src/lib/lib.md @@ -1,92 +1,5 @@ # Library documentation -## [States](@id lib_states) -```@docs -FiniteMPS -InfiniteMPS -WindowMPS -MultilineMPS -``` - -## Operators -```@docs -AbstractMPO -MPO -MPOHamiltonian -``` - -## Environments -```@docs -MPSKit.AbstractMPSEnvironments -MPSKit.AbstractInfiniteEnvironments -MPSKit.InfiniteMPOEnvironments -MPSKit.InfiniteMPOHamiltonianEnvironments -MPSKit.FiniteEnvironments -MPSKit.IDMRGEnvironments -``` - -## Algorithms -```@docs -find_groundstate -timestep -leading_boundary -dynamicaldmrg -changebonds -excitations -approximate -``` - -### [Groundstate algorithms](@id lib_gs_alg) -```@docs -VUMPS -IDMRG1 -IDMRG2 -DMRG -DMRG2 -GradientGrassmann -``` - -### [Time evolution algorithms](@id lib_time_alg) -```@docs -TDVP -TDVP2 -TaylorCluster -WII -``` - -### [Leading boundary algorithms](@id lib_bound_alg) -```@docs -VUMPS -VOMPS -GradientGrassmann -``` - -### [Bond change algorithms](@id lib_bc_alg) -```@docs -OptimalExpand -RandExpand -VUMPSSvdCut -SvdCut -``` - -### [Excitations](@id lib_ex_alg) -```@docs -QuasiparticleAnsatz -FiniteExcited -``` - -## Utility -```@docs -left_virtualspace -right_virtualspace -physicalspace -add_util_leg -expectation_value -variance -entanglement_spectrum -entropy -transfer_spectrum -correlation_length -entanglementplot -transferplot +```@autodocs +Modules = [MPSKit] ``` diff --git a/docs/src/man/intro.md b/docs/src/man/intro.md index 1bcbac33d..acd2de67e 100644 --- a/docs/src/man/intro.md +++ b/docs/src/man/intro.md @@ -1,8 +1,8 @@ # Prerequisites The following sections describe the prerequisites for using MPSKit. If you are already -familiar with the concepts of MPSKit and TensorKit, you can skip to the [Overview](@ref) -section. +familiar with the concepts of MPSKit and TensorKit, you can skip to the [Conventions](@ref) +sections. ## TensorKit diff --git a/docs/src/man/operators.md b/docs/src/man/operators.md index d6721ca87..4246f52ab 100644 --- a/docs/src/man/operators.md +++ b/docs/src/man/operators.md @@ -2,7 +2,7 @@ In analogy to how we can define matrix product states as a contraction of local tensors, a similar construction exist for operators. To that end, a Matrix Product Operator (MPO) is -nothing more than a collection of local [`MPOTensor`](@ref) objects, contracted along a +nothing more than a collection of local [`MPOTensor`](@ref MPSKit.MPOTensor) objects, contracted along a line. Again, we can distinguish between finite and infinite operators, with the latter being represented by a periodic array of MPO tensors. @@ -13,7 +13,7 @@ These objects can be created either directly from a vector of `MPOTensor`s, or s a dense operator (a subtype of `AbstractTensorMap{S,N,N}`), which is then decomposed into a product of local tensors. -![](mpo.svg) +![](../assets/mpo.svg) ```@setup operators using TensorKit, MPSKit diff --git a/docs/src/references.md b/docs/src/references.md new file mode 100644 index 000000000..ad16f6d57 --- /dev/null +++ b/docs/src/references.md @@ -0,0 +1,67 @@ +# References + +## Publications using MPSKit + +Below you can find a list of publications that have made use of MPSKit. If you have used +this package and wish to have your publication added to this list, please open a pull +request or an issue on the [GitHub repository](https://github.com/QuantumKitHub/MPSKit.jl/). + +### 2025 + +```@bibliography +Pages = [] +capponi2025 +mortier2025 +``` +### 2024 + +```@bibliography +Pages = [] +belyansky2024 +crotti2024 +rogerson2024 +ueda2024 +weerda2024 +``` + +### 2023 + +```@bibliography +Pages = [] +zhang2023 +``` + +### 2022 + +```@bibliography +Pages = [] +devos2022 +halimeh2022 +roose2022 +vandamme2022 +vanhove2022 +``` + +### 2021 + +```@bibliography +Pages = [] +halimeh2021 +hauru2021 +roose2021 +vandamme2021 +yu2021 +``` + +### 2019 + +```@bibliography +Pages = [] +roose2019 +``` + +## Full list of references + +```@bibliography +``` + diff --git a/examples/classic2d/1.hard-hexagon/main.jl b/examples/classic2d/1.hard-hexagon/main.jl index 91aa6d45e..3b97873ab 100644 --- a/examples/classic2d/1.hard-hexagon/main.jl +++ b/examples/classic2d/1.hard-hexagon/main.jl @@ -51,7 +51,7 @@ println("F = $F\tS = $S\tξ = $ξ") md""" ## The scaling hypothesis -The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a [scaling hypothesis](https://arxiv.org/pdf/0812.2903.pdf), which in turn allows to extract the central charge. +The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a [pollmann2009](@cite), which in turn allows to extract the central charge. First we need to know the entropy and correlation length at a bunch of different bond dimensions. Our approach will be to re-use the previous approximated dominant eigenvector, and then expanding its bond dimension and re-running VUMPS. According to the scaling hypothesis we should have ``S \propto \frac{c}{6} log(ξ)``. Therefore we should find ``c`` using diff --git a/src/MPSKit.jl b/src/MPSKit.jl index 129dc2e0c..ecad4dcf3 100644 --- a/src/MPSKit.jl +++ b/src/MPSKit.jl @@ -3,7 +3,9 @@ module MPSKit using TensorKit using TensorKit: BraidingTensor using BlockTensorKit -using KrylovKit, OptimKit, FastClosures +using KrylovKit +using KrylovKit: KrylovAlgorithm +using OptimKit, FastClosures using Base.Threads, FLoops, Transducers, FoldsThreads using Base.Iterators using RecipesBase @@ -11,6 +13,7 @@ using VectorInterface using Accessors using HalfIntegers import TupleTools as TT +using DocStringExtensions using LinearAlgebra: diag, Diagonal using LinearAlgebra: LinearAlgebra @@ -62,8 +65,7 @@ export exact_diagonalization export TransferMatrix export transfer_left, transfer_right -# Abstract type defs -abstract type Algorithm end +include("algorithms/algorithm.jl") # submodules include("utility/dynamictols.jl") diff --git a/src/algorithms/algorithm.jl b/src/algorithms/algorithm.jl new file mode 100644 index 000000000..910fed6a4 --- /dev/null +++ b/src/algorithms/algorithm.jl @@ -0,0 +1,22 @@ +""" +$(TYPEDEF) + +Abstract supertype for all algorithm structs. +These can be thought of as `NamedTuple`s that hold the settings for a given algorithm, +which can be used for dispatch. +Additionally, the constructors can be used to provide default values and input sanitation. +""" +abstract type Algorithm end + +function Base.show(io::IO, ::MIME"text/plain", alg::Algorithm) + if get(io, :compact, false) + println(io, "$typeof(alg)(...)") + return nothing + end + println(io, typeof(alg), ":") + iocompact = IOContext(io, :compact => true) + for f in propertynames(alg) + println(iocompact, " * ", f, ": ", getproperty(alg, f)) + end + return nothing +end diff --git a/src/algorithms/approximate/idmrg.jl b/src/algorithms/approximate/idmrg.jl index 04b5e3bba..ba63230b2 100644 --- a/src/algorithms/approximate/idmrg.jl +++ b/src/algorithms/approximate/idmrg.jl @@ -2,10 +2,11 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili alg::IDMRG1, envs=environments(ψ, toapprox)) log = IterLog("IDMRG") ϵ::Float64 = 2 * alg.tol + local iter LoggingExtras.withlevel(; alg.verbosity) do @infov 2 loginit!(log, ϵ) - for iter in 1:(alg.maxiter) + for outer iter in 1:(alg.maxiter) C_current = ψ.C[:, 0] # left to right sweep @@ -46,8 +47,9 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili end # TODO: immediately compute in-place - nst = MultilineMPS(map(x -> x, ψ.AR); tol=alg.tol_gauge) - copy!(ψ, nst) # ensure output destination is unchanged + alg_gauge = updatetol(alg.alg_gauge, iter, ϵ) + ψ′ = MultilineMPS(map(x -> x, ψ.AR); alg_gauge.tol, alg_gauge.maxiter) + copy!(ψ, ψ′) # ensure output destination is unchanged recalculate!(envs, ψ, toapprox) return ψ, envs, ϵ @@ -59,10 +61,11 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili ϵ::Float64 = 2 * alg.tol log = IterLog("IDMRG2") O, ϕ = toapprox + local iter LoggingExtras.withlevel(; alg.verbosity) do @infov 2 loginit!(log, ϵ) - for iter in 1:(alg.maxiter) + for outer iter in 1:(alg.maxiter) C_current = ψ.C[:, 0] # sweep from left to right @@ -123,9 +126,10 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili end # TODO: immediately compute in-place - nst = MultilineMPS(map(x -> x, ψ.AR); tol=alg.tol_gauge) - copy!(ψ, nst) # ensure output destination is unchanged - recalculate!(envs, ψ, toapprox) + alg_gauge = updatetol(alg.alg_gauge, iter, ϵ) + ψ′ = MultilineMPS(map(x -> x, ψ.AR); alg_gauge.tol, alg_gauge.maxiter) + copy!(ψ, ψ′) # ensure output destination is unchanged + recalculate!(envs, ψ, toapprox) return ψ, envs, ϵ end diff --git a/src/algorithms/changebonds/optimalexpand.jl b/src/algorithms/changebonds/optimalexpand.jl index 4b542eb69..171fec588 100644 --- a/src/algorithms/changebonds/optimalexpand.jl +++ b/src/algorithms/changebonds/optimalexpand.jl @@ -1,15 +1,16 @@ """ - struct OptimalExpand <: Algorithm end +$(TYPEDEF) -An algorithm that expands the given mps using the algorithm given in the -[VUMPS paper](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.97.045145), by -selecting the dominant contributions of a two-site updated MPS tensor, orthogonal to the -original ψ. +An algorithm that expands the given mps as described in +[Zauner-Stauber et al. Phys. Rev. B 97 (2018)](@cite zauner-stauber2018), by selecting the +dominant contributions of a two-site updated MPS tensor, orthogonal to the original ψ. -# Fields -- `trscheme::TruncationScheme = truncdim(1)` : The truncation scheme to use. +## Fields + +$(TYPEDFIELDS) """ @kwdef struct OptimalExpand <: Algorithm + "algorithm used for truncating the expanded space" trscheme::TruncationScheme = truncdim(1) end diff --git a/src/algorithms/changebonds/randexpand.jl b/src/algorithms/changebonds/randexpand.jl index 28c128288..c2c5f7cd9 100644 --- a/src/algorithms/changebonds/randexpand.jl +++ b/src/algorithms/changebonds/randexpand.jl @@ -1,14 +1,16 @@ """ - struct RandExpand <: Algorithm end +$(TYPEDEF) An algorithm that expands the bond dimension by adding random unitary vectors that are orthogonal to the existing state. This is achieved by performing a truncated SVD on a random two-site MPS tensor, which is made orthogonal to the existing state. -# Fields -- `trscheme::TruncationScheme = truncdim(1)` : The truncation scheme to use. +## Fields + +$(TYPEDFIELDS) """ @kwdef struct RandExpand <: Algorithm + "algorithm used for [truncation](@extref TensorKit.tsvd] the expanded space" trscheme::TruncationScheme = truncdim(1) end diff --git a/src/algorithms/changebonds/svdcut.jl b/src/algorithms/changebonds/svdcut.jl index e7cc1d871..330b7ef06 100644 --- a/src/algorithms/changebonds/svdcut.jl +++ b/src/algorithms/changebonds/svdcut.jl @@ -1,12 +1,14 @@ """ - struct SvdCut <: Algorithm end +$(TYPEDEF) An algorithm that uses truncated SVD to change the bond dimension of a ψ. -# Fields -- `trscheme::TruncationScheme = notrunc()` : The truncation scheme to use. +## Fields + +$(TYPEDFIELDS) """ @kwdef struct SvdCut <: Algorithm + "algorithm used for [truncation][@extref TensorKit.tsvd] of the gauge tensors" trscheme::TruncationScheme = notrunc() end diff --git a/src/algorithms/changebonds/vumpssvd.jl b/src/algorithms/changebonds/vumpssvd.jl index e79dfaf25..83f45837d 100644 --- a/src/algorithms/changebonds/vumpssvd.jl +++ b/src/algorithms/changebonds/vumpssvd.jl @@ -1,19 +1,19 @@ """ - struct VUMPSSvdCut <: Algorithm end +$(TYPEDEF) -An algorithm that uses an IDMRG2 step to change the bond dimension of a state. +An algorithm that uses a two-site update step to change the bond dimension of a state. -# Fields -- `tol_gauge::Real = Defaults.tolgauge` : The tolerance for the gauge. -- `tol::Real = Defaults.tol` : The tolerance for the Galerkin truncation. -- `tol_eigenval::Real = Defaults.tol` : The tolerance for the eigenvalue solver. -- `trscheme::TruncationScheme = notrunc()` : The truncation scheme to use. +## Fields + +$(TYPEDFIELDS) """ @kwdef struct VUMPSSvdCut <: Algorithm + "tolerance for gauging algorithm" tol_gauge = Defaults.tolgauge - tol = Defaults.tol + "tolerance for the eigenvalue solver" tol_eigenval = Defaults.tol - trscheme = notrunc() + "algorithm used for [truncation][@extref TensorKit.tsvd] of the two-site update" + trscheme::TruncationScheme = notrunc() end function changebonds_1(state::InfiniteMPS, H, alg::VUMPSSvdCut, diff --git a/src/algorithms/excitation/chepigaansatz.jl b/src/algorithms/excitation/chepigaansatz.jl index 784e8a34b..374abb757 100644 --- a/src/algorithms/excitation/chepigaansatz.jl +++ b/src/algorithms/excitation/chepigaansatz.jl @@ -1,12 +1,11 @@ - """ - ChepigaAnsatz <: Algorithm +$(TYPEDEF) -Optimization algorithm for excitations on top of MPS groundstates, as -introduced in this [paper](https://doi.org/10.1103/PhysRevB.96.054425). +Single-site optimization algorithm for excitations on top of MPS groundstates. ## Fields -- `alg::A = Defaults.eigsolver`: algorithm to use for the eigenvalue problem. + +$(TYPEDFIELDS) ## Constructors @@ -15,9 +14,14 @@ introduced in this [paper](https://doi.org/10.1103/PhysRevB.96.054425). ChepigaAnsatz(alg) Create a `ChepigaAnsatz` algorithm with the given eigensolver, or by passing the -keyword arguments to `Arnoldi`. +keyword arguments to [`Arnoldi`][@extref KrylovKit.Arnoldi]. + +## References + +- [Chepiga et al. Phys. Rev. B 96 (2017)](@cite chepiga2017) """ -struct ChepigaAnsatz{A} <: Algorithm +struct ChepigaAnsatz{A<:KrylovAlgorithm} <: Algorithm + "algorithm used for the eigenvalue solvers" alg::A end function ChepigaAnsatz(; kwargs...) @@ -60,8 +64,7 @@ end """ ChepigaAnsatz2 <: Algorithm -Optimization algorithm for excitations on top of MPS groundstates, as -introduced in this [paper](https://doi.org/10.1103/PhysRevB.96.054425). +Two-site optimization algorithm for excitations on top of MPS groundstates. ## Fields - `alg::A = Defaults.eigsolver`: algorithm to use for the eigenvalue problem. @@ -75,8 +78,12 @@ introduced in this [paper](https://doi.org/10.1103/PhysRevB.96.054425). Create a `ChepigaAnsatz2` algorithm with the given eigensolver and truncation, or by passing the keyword arguments to `Arnoldi`. + +## References + +- [Chepiga et al. Phys. Rev. B 96 (2017)](@cite chepiga2017) """ -struct ChepigaAnsatz2{A} <: Algorithm +struct ChepigaAnsatz2{A<:KrylovAlgorithm} <: Algorithm alg::A trscheme::Any end diff --git a/src/algorithms/excitation/dmrgexcitation.jl b/src/algorithms/excitation/dmrgexcitation.jl index 958cd4585..8b92dae6b 100644 --- a/src/algorithms/excitation/dmrgexcitation.jl +++ b/src/algorithms/excitation/dmrgexcitation.jl @@ -1,14 +1,20 @@ """ - FiniteExcited{A} <: Algorithm +$(TYPEDEF) -Variational optimization algorithm for excitations of finite Matrix Product States by minimizing the energy of ``H - λᵢ |ψᵢ><ψᵢ|``. +Variational optimization algorithm for excitations of finite MPS by minimizing the energy of -# Fields -- `gsalg::A`: optimization algorithm. -- `weight::Float64`: energy penalty for previous states. +```math +H - λᵢ |ψᵢ⟩⟨ψᵢ| +``` + +## Fields + +$(TYPEDFIELDS) """ @kwdef struct FiniteExcited{A} <: Algorithm + "optimization algorithm" gsalg::A = DMRG() + "energy penalty for enforcing orthogonality with previous states" weight::Float64 = 10.0 end diff --git a/src/algorithms/excitation/quasiparticleexcitation.jl b/src/algorithms/excitation/quasiparticleexcitation.jl index 2a5c26925..53b124e3c 100644 --- a/src/algorithms/excitation/quasiparticleexcitation.jl +++ b/src/algorithms/excitation/quasiparticleexcitation.jl @@ -3,13 +3,13 @@ the first and the last are virtual, the second is physical, the third is the utility leg =# """ - QuasiparticleAnsatz <: Algorithm +$(TYPEDEF) -Optimization algorithm for quasiparticle excitations on top of MPS groundstates, as -introduced in this [paper](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.111.080401). +Optimization algorithm for quasi-particle excitations on top of MPS groundstates. ## Fields -- `alg::A = Defaults.eigsolver`: algorithm to use for the eigenvalue problem + +$(TYPEDFIELDS) ## Constructors @@ -19,8 +19,13 @@ introduced in this [paper](https://journals.aps.org/prl/abstract/10.1103/PhysRev Create a `QuasiparticleAnsatz` algorithm with the given algorithm, or by passing the keyword arguments to `Arnoldi`. + +## References + +- [Haegeman et al. Phys. Rev. Let. 111 (2013)](@cite haegeman2013) """ struct QuasiparticleAnsatz{A} <: Algorithm + "algorithm used for the eigenvalue solvers" alg::A end function QuasiparticleAnsatz(; kwargs...) diff --git a/src/algorithms/groundstate/dmrg.jl b/src/algorithms/groundstate/dmrg.jl index 0d1c922ce..0ea686faa 100644 --- a/src/algorithms/groundstate/dmrg.jl +++ b/src/algorithms/groundstate/dmrg.jl @@ -1,28 +1,29 @@ """ - DMRG{A,F} <: Algorithm +$(TYPEDEF) -Single site DMRG algorithm for finding groundstates. +Single-site DMRG algorithm for finding the dominant eigenvector. -# Fields -- `tol::Float64`: tolerance for convergence criterium -- `eigalg::A`: eigensolver algorithm or a NamedTuple with the eigensolver settings -- `maxiter::Int`: maximum number of outer iterations -- `verbosity::Int`: display progress information -- `finalize::F`: user-supplied function which is applied after each iteration, with - signature `finalize(iter, ψ, H, envs) -> ψ, envs` +## Fields + +$(TYPEDFIELDS) """ struct DMRG{A,F} <: Algorithm + "tolerance for convergence criterium" tol::Float64 + "maximal amount of iterations" maxiter::Int - eigalg::A - verbosity::Int + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" finalize::F + "setting for how much information is displayed" + verbosity::Int + "algorithm used for the eigenvalue solvers" + eigalg::A end function DMRG(; tol=Defaults.tol, maxiter=Defaults.maxiter, eigalg=(;), verbosity=Defaults.verbosity, finalize=Defaults._finalize) eigalg′ = eigalg isa NamedTuple ? Defaults.alg_eigsolve(; eigalg...) : eigalg - return DMRG{typeof(eigalg′),typeof(finalize)}(tol, maxiter, eigalg′, verbosity, - finalize) + return DMRG{typeof(eigalg′),typeof(finalize)}(tol, maxiter, finalize, verbosity, + eigalg′) end function find_groundstate!(ψ::AbstractFiniteMPS, H, alg::DMRG, envs=environments(ψ, H)) @@ -61,35 +62,36 @@ function find_groundstate!(ψ::AbstractFiniteMPS, H, alg::DMRG, envs=environment end """ - DMRG2{A,F} <: Algorithm - -2-site DMRG algorithm for finding groundstates. - -# Fields -- `tol::Float64`: tolerance for convergence criterium -- `eigalg::A`: eigensolver algorithm or a NamedTuple with the eigensolver settings -- `maxiter::Int`: maximum number of outer iterations -- `verbosity::Int`: display progress information -- `finalize::F`: user-supplied function which is applied after each iteration, with - signature `finalize(iter, ψ, H, envs) -> ψ, envs` -- `trscheme`: truncation algorithm for [tsvd][TensorKit.tsvd](@ref) +$(TYPEDEF) + +Two-site DMRG algorithm for finding the dominant eigenvector. + +## Fields + +$(TYPEDFIELDS) """ struct DMRG2{A,F} <: Algorithm + "tolerance for convergence criterium" tol::Float64 + "maximal amount of iterations" maxiter::Int + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" + finalize::F + "setting for how much information is displayed" + verbosity::Int + + "algorithm used for the eigenvalue solvers" eigalg::A + "algorithm used for [truncation](@extref TensorKit.tsvd) of the two-site update" trscheme::TruncationScheme - verbosity::Int - finalize::F end # TODO: find better default truncation function DMRG2(; tol=Defaults.tol, maxiter=Defaults.maxiter, eigalg=(;), trscheme=truncerr(1e-6), verbosity=Defaults.verbosity, finalize=Defaults._finalize) eigalg′ = eigalg isa NamedTuple ? Defaults.alg_eigsolve(; eigalg...) : eigalg - return DMRG2{typeof(eigalg′),typeof(finalize)}(tol, maxiter, eigalg′, trscheme, - verbosity, - finalize) + return DMRG2{typeof(eigalg′),typeof(finalize)}(tol, maxiter, finalize, verbosity, + eigalg′, trscheme) end function find_groundstate!(ψ::AbstractFiniteMPS, H, alg::DMRG2, envs=environments(ψ, H)) diff --git a/src/algorithms/groundstate/gradient_grassmann.jl b/src/algorithms/groundstate/gradient_grassmann.jl index 56117a86a..0e44c86a1 100644 --- a/src/algorithms/groundstate/gradient_grassmann.jl +++ b/src/algorithms/groundstate/gradient_grassmann.jl @@ -1,14 +1,17 @@ """ - GradientGrassmann <: Algorithm +$(TYPEDEF) Variational gradient-based optimization algorithm that keeps the MPS in left-canonical form, as points on a Grassmann manifold. The optimization is then a Riemannian gradient descent with a preconditioner to induce the metric from the Hilbert space inner product. ## Fields -- `method::OptimKit.OptimizationAlgorithm`: algorithm to perform the gradient search -- `finalize!`: user-supplied callable which is applied after each iteration, with - signature `finalize!(x::GrassmannMPS.ManifoldPoint, f, g, numiter) -> x, f, g` + +$(TYPEDFIELDS) + +## References + +* [Hauru et al. SciPost Phys. 10 (2021)](@cite hauru2021) --- @@ -24,7 +27,9 @@ with a preconditioner to induce the metric from the Hilbert space inner product. - `verbosity::Int`: level of information display """ struct GradientGrassmann{O<:OptimKit.OptimizationAlgorithm,F} <: Algorithm + "optimization algorithm" method::O + "callback function applied after each iteration, of signature `finalize!(x, f, g, numiter) -> x, f, g`" finalize!::F function GradientGrassmann(; method=ConjugateGradient, (finalize!)=OptimKit._finalize!, diff --git a/src/algorithms/groundstate/idmrg.jl b/src/algorithms/groundstate/idmrg.jl index 7c6575d26..4f5eb0933 100644 --- a/src/algorithms/groundstate/idmrg.jl +++ b/src/algorithms/groundstate/idmrg.jl @@ -1,37 +1,39 @@ """ - IDMRG1{A} <: Algorithm +$(TYPEDEF) -Single site infinite DMRG algorithm for finding groundstates. +Single site infinite DMRG algorithm for finding the dominant eigenvector. -# Fields -- `tol::Float64`: tolerance for convergence criterium -- `tol_gauge::Float64`: tolerance for gauging algorithm -- `eigalg::A`: eigensolver algorithm -- `maxiter::Int`: maximum number of outer iterations -- `verbosity::Int`: display progress information +## Fields + +$(TYPEDFIELDS) """ -struct IDMRG1{A} <: Algorithm - tol::Float64 - tol_gauge::Float64 - eigalg::A - maxiter::Int - verbosity::Int -end -function IDMRG1(; tol=Defaults.tol, tol_gauge=Defaults.tolgauge, eigalg=(;), - maxiter=Defaults.maxiter, verbosity=Defaults.verbosity) - eigalg′ = eigalg isa NamedTuple ? Defaults.alg_eigsolve(; eigalg...) : eigalg - return IDMRG1{typeof(eigalg′)}(tol, tol_gauge, eigalg′, maxiter, verbosity) +@kwdef struct IDMRG1{A} <: Algorithm + "tolerance for convergence criterium" + tol::Float64 = Defaults.tol + + "maximal amount of iterations" + maxiter::Int = Defaults.maxiter + + "setting for how much information is displayed" + verbosity::Int = Defualts.verbosity + + "algorithm used for gauging the MPS" + alg_gauge = Defaults.alg_gauge() + + "algorithm used for the eigenvalue solvers" + alg_eigsolve::A = Defaults.alg_eigsolve() end function find_groundstate(ost::InfiniteMPS, H, alg::IDMRG1, envs=environments(ost, H)) ϵ::Float64 = calc_galerkin(ost, H, ost, envs) ψ = copy(ost) log = IterLog("IDMRG") + local iter LoggingExtras.withlevel(; alg.verbosity) do @infov 2 loginit!(log, ϵ, expectation_value(ψ, H, envs)) - for iter in 1:(alg.maxiter) - alg_eigsolve = updatetol(alg.eigalg, iter, ϵ) + for outer iter in 1:(alg.maxiter) + alg_eigsolve = updatetol(alg.alg_eigsolve, iter, ϵ) C_current = ψ.C[0] # left to right sweep @@ -67,38 +69,40 @@ function find_groundstate(ost::InfiniteMPS, H, alg::IDMRG1, envs=environments(os end end - nst = InfiniteMPS(ψ.AR[1:end]; tol=alg.tol_gauge) - recalculate!(envs, nst, H, nst) + alg_gauge = updatetol(alg.alg_gauge, iter, ϵ) + ψ′ = InfiniteMPS(ψ.AR[1:end]; alg_gauge.tol, alg_gauge.maxiter) + recalculate!(envs, ψ′, H, ψ′) - return nst, envs, ϵ + return ψ′, envs, ϵ end """ - IDMRG2{A} <: Algorithm +$(TYPEDEF) -2-site infinite DMRG algorithm for finding groundstates. +Two-site infinite DMRG algorithm for finding the dominant eigenvector. -# Fields -- `tol::Float64`: tolerance for convergence criterium -- `tol_gauge::Float64`: tolerance for gauging algorithm -- `eigalg::A`: eigensolver algorithm -- `maxiter::Int`: maximum number of outer iterations -- `verbosity::Int`: display progress information -- `trscheme::TruncationScheme`: truncation algorithm for [tsvd][TensorKit.tsvd](@ref) +## Fields + +$(TYPEDFIELDS) """ -struct IDMRG2{A} <: Algorithm - tol::Float64 - tol_gauge::Float64 - eigalg::A - maxiter::Int - verbosity::Int - trscheme::TruncationScheme -end -function IDMRG2(; tol=Defaults.tol, tol_gauge=Defaults.tolgauge, eigalg=(;), - maxiter=Defaults.maxiter, verbosity=Defaults.verbosity, - trscheme=truncerr(1e-6)) - eigalg′ = eigalg isa NamedTuple ? Defaults.alg_eigsolve(; eigalg...) : eigalg - return IDMRG2{typeof(eigalg′)}(tol, tol_gauge, eigalg′, maxiter, verbosity, trscheme) +@kwdef struct IDMRG2{A} <: Algorithm + "tolerance for convergence criterium" + tol::Float64 = Defaults.tol + + "maximal amount of iterations" + maxiter::Int = Defaults.maxiter + + "setting for how much information is displayed" + verbosity::Int = Defualts.verbosity + + "algorithm used for gauging the MPS" + alg_gauge = Defaults.alg_gauge() + + "algorithm used for the eigenvalue solvers" + alg_eigsolve::A = Defaults.alg_eigsolve() + + "algorithm used for [truncation](@extref TensorKit.tsvd) of the two-site update" + trscheme::TruncationScheme = truncerr(1e-6) end function find_groundstate(ost::InfiniteMPS, H, alg::IDMRG2, envs=environments(ost, H)) @@ -107,11 +111,12 @@ function find_groundstate(ost::InfiniteMPS, H, alg::IDMRG2, envs=environments(os ψ = copy(ost) log = IterLog("IDMRG2") + local iter LoggingExtras.withlevel(; alg.verbosity) do @infov 2 loginit!(log, ϵ) - for iter in 1:(alg.maxiter) - alg_eigsolve = updatetol(alg.eigalg, iter, ϵ) + for outer iter in 1:(alg.maxiter) + alg_eigsolve = updatetol(alg.alg_eigsolve, iter, ϵ) C_current = ψ.C[0] # sweep from left to right @@ -208,7 +213,8 @@ function find_groundstate(ost::InfiniteMPS, H, alg::IDMRG2, envs=environments(os end end - ψ′ = InfiniteMPS(ψ.AR[1:end]; tol=alg.tol_gauge) + alg_gauge = updatetol(alg.alg_gauge, iter, ϵ) + ψ′ = InfiniteMPS(ψ.AR[1:end]; alg_gauge.tol, alg_gauge.maxiter) recalculate!(envs, ψ′, H, ψ′) return ψ′, envs, ϵ diff --git a/src/algorithms/groundstate/vumps.jl b/src/algorithms/groundstate/vumps.jl index 504311207..ae5e22aaf 100644 --- a/src/algorithms/groundstate/vumps.jl +++ b/src/algorithms/groundstate/vumps.jl @@ -1,29 +1,38 @@ """ - VUMPS{F} <: Algorithm +$(TYPEDEF) -Variational optimization algorithm for uniform matrix product states, as introduced in -https://arxiv.org/abs/1701.07035. +Variational optimization algorithm for uniform matrix product states, based on the combination of DMRG with matrix product state tangent space concepts. -# Fields -- `tol::Float64`: tolerance for convergence criterium -- `maxiter::Int`: maximum amount of iterations -- `finalize::F`: user-supplied function which is applied after each iteration, with - signature `finalize(iter, ψ, H, envs) -> ψ, envs` -- `verbosity::Int`: display progress information +## Fields -- `alg_gauge=Defaults.alg_gauge()`: algorithm for gauging -- `alg_eigsolve=Defaults.alg_eigsolve()`: algorithm for eigensolvers -- `alg_environments=Defaults.alg_environments()`: algorithm for updating environments +$(TYPEDFIELDS) + +## References + +* [Zauner-Stauber et al. Phys. Rev. B 97 (2018)](@cite zauner-stauber2018) +* [Vanderstraeten et al. SciPost Phys. Lect. Notes 7 (2019)](@cite vanderstraeten2019) """ @kwdef struct VUMPS{F} <: Algorithm + "tolerance for convergence criterium" tol::Float64 = Defaults.tol + + "maximal amount of iterations" maxiter::Int = Defaults.maxiter - finalize::F = Defaults._finalize + + "setting for how much information is displayed" verbosity::Int = Defaults.verbosity + "algorithm used for gauging the `InfiniteMPS`" alg_gauge = Defaults.alg_gauge() + + "algorithm used for the eigenvalue solvers" alg_eigsolve = Defaults.alg_eigsolve() + + "algorithm used for the MPS environments" alg_environments = Defaults.alg_environments() + + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" + finalize::F = Defaults._finalize end function find_groundstate(ψ::InfiniteMPS, H, alg::VUMPS, envs=environments(ψ, H)) diff --git a/src/algorithms/propagator/corvector.jl b/src/algorithms/propagator/corvector.jl index 1a4816616..0b778b765 100644 --- a/src/algorithms/propagator/corvector.jl +++ b/src/algorithms/propagator/corvector.jl @@ -1,30 +1,34 @@ """ - abstract type DDMRG_Flavour end +$(TYPEDEF) Abstract supertype for the different flavours of dynamical DMRG. """ abstract type DDMRG_Flavour end """ - struct DynamicalDMRG{F,S} <: Algorithm end +$(TYPEDEF) A dynamical DMRG method for calculating dynamical properties and excited states, based on a variational principle for dynamical correlation functions. -The algorithm is described in detail in https://arxiv.org/pdf/cond-mat/0203500.pdf. +## Fields -# Fields -- `flavour::F = NaiveInvert` : The flavour of the algorithm to use. Currently only `NaiveInvert` and `Jeckelmann` are implemented. -- `solver::S = Defaults.linearsolver` : The linear solver to use for the linear systems. -- `tol::Float64 = Defaults.tol * 10` : The stopping criterium. -- `maxiter::Int = Defaults.maxiter` : The maximum number of iterations. -- `verbosity::Int = Defaults.verbosity` : Whether to print information about the progress of the algorithm. +$(TYPEDFIELDS) + +## References + +* [Jeckelmann. Phys. Rev. B 66 (2002)](@cite jeckelmann2002) """ @kwdef struct DynamicalDMRG{F<:DDMRG_Flavour,S} <: Algorithm - flavour::F = NaiveInvert + "flavour of the algorithm to use, either of type [`NaiveInvert`](@ref) or [`Jeckelmann`](@ref)" + flavour::F = NaiveInvert() + "algorithm used for the linear solvers" solver::S = Defaults.linearsolver + "tolerance for convergence criterium" tol::Float64 = Defaults.tol * 10 + "maximal amount of iterations" maxiter::Int = Defaults.maxiter + "setting for how much information is displayed" verbosity::Int = Defaults.verbosity end @@ -37,13 +41,20 @@ algorithm. function propagator end """ - struct NaiveInvert <: DDMRG_Flavour end +$(TYPEDEF) An alternative approach to the dynamical DMRG algorithm, without quadratic terms but with a less controlled approximation. - -This algorithm essentially minimizes ``<ψ|(H - E)|ψ> - <ψ|ψ₀> - <ψ₀|ψ>``, which is -equivalent to the original approach if ``|ψ₀> = (H - E)|ψ>``. +This algorithm minimizes the following cost function +```math +<ψ|(H - E)|ψ> - <ψ|ψ₀> - <ψ₀|ψ> +``` +which is equivalent to the original approach if +```math +|ψ₀> = (H - E)|ψ> +``` + +See also [`Jeckelmann`](@ref) for the original approach. """ struct NaiveInvert <: DDMRG_Flavour end @@ -90,11 +101,18 @@ function propagator(A::AbstractFiniteMPS, z::Number, H::FiniteMPOHamiltonian, end """ - struct Jeckelmann <: DDMRG_Flavour end +$(TYPEDEF) + +The original flavour of dynamical DMRG, which minimizes the following (quadratic) cost function: +```math +|| (H - E) |ψ₀> - |ψ> || +``` + +See also [`NaiveInvert`](@ref) for a less costly but less accurate alternative. + +## References -The original flavour of dynamical DMRG, as described in -https://arxiv.org/pdf/cond-mat/0203500.pdf. The algorithm minimizes -``||(H - E)|ψ₀> - |ψ>||``, thus containing quadratic terms in ``H - E``. +* [Jeckelmann. Phys. Rev. B 66 (2002)](@cite jeckelmann2002) """ struct Jeckelmann <: DDMRG_Flavour end diff --git a/src/algorithms/statmech/vomps.jl b/src/algorithms/statmech/vomps.jl index 310c4d7cf..7bbae7627 100644 --- a/src/algorithms/statmech/vomps.jl +++ b/src/algorithms/statmech/vomps.jl @@ -1,27 +1,36 @@ """ - VOMPS{F} <: Algorithm - -Power method algorithm for infinite MPS. -[SciPost:4.1.004](https://scipost.org/SciPostPhysCore.4.1.004) +$(TYPEDEF) +Power method algorithm for finding dominant eigenvectors of infinite MPOs. +This method works by iteratively approximating the product of an operator and a state +with a new state of the same bond dimension. + ## Fields -- `tol::Float64`: tolerance for convergence criterium -- `maxiter::Int`: maximum amount of iterations -- `finalize::F`: user-supplied function which is applied after each iteration, with - signature `finalize(iter, ψ, toapprox, envs) -> ψ, envs` -- `verbosity::Int`: display progress information - -- `alg_gauge=Defaults.alg_gauge()`: algorithm for gauging -- `alg_environments=Defaults.alg_environments()`: algorithm for updating environments + +$(TYPEDFIELDS) + +## References + +* [Vanhecke et al. SciPost Phys. Core 4 (2021)](@cite vanhecke2021) """ @kwdef struct VOMPS{F} <: Algorithm + "tolerance for convergence criterium" tol::Float64 = Defaults.tol + + "maximal amount of iterations" maxiter::Int = Defaults.maxiter - finalize::F = Defaults._finalize + + "setting for how much information is displayed" verbosity::Int = Defaults.verbosity + "algorithm used for gauging the `InfiniteMPS`" alg_gauge = Defaults.alg_gauge() + + "algorithm used for the MPS environments" alg_environments = Defaults.alg_environments() + + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" + finalize::F = Defaults._finalize end function leading_boundary(ψ::MultilineMPS, O::MultilineMPO, alg::VOMPS, diff --git a/src/algorithms/timestep/tdvp.jl b/src/algorithms/timestep/tdvp.jl index 715da66ae..115503597 100644 --- a/src/algorithms/timestep/tdvp.jl +++ b/src/algorithms/timestep/tdvp.jl @@ -1,20 +1,27 @@ """ - TDVP{A} <: Algorithm +$(TYPEDEF) -Single site [TDVP](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.107.070601) -algorithm for time evolution. +Single site MPS time-evolution algorithm based on the Time-Dependent Variational Principle. -# Fields -- `integrator::A`: integration algorithm (defaults to Lanczos exponentiation) -- `tolgauge::Float64`: tolerance for gauging algorithm -- `gaugemaxiter::Int`: maximum amount of gauging iterations -- `finalize::F`: user-supplied function which is applied after each timestep, with - signature `finalize(t, Ψ, H, envs) -> Ψ, envs` +## Fields + +$(TYPEDFIELDS) + +## References + +* [Haegeman et al. Phys. Rev. Lett. 107 (2011)](@cite haegeman2011) """ @kwdef struct TDVP{A,F} <: Algorithm + "algorithm used in the exponential solvers" integrator::A = Defaults.alg_expsolve() + + "tolerance for gauging algorithm" tolgauge::Float64 = Defaults.tolgauge + + "maximal amount of iterations for gauging algorithm" gaugemaxiter::Int = Defaults.maxiter + + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" finalize::F = Defaults._finalize end @@ -94,24 +101,32 @@ function timestep!(ψ::AbstractFiniteMPS, H, t::Number, dt::Number, alg::TDVP, end """ - TDVP2{A} <: Algorithm - -2-site [TDVP](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.107.070601) -algorithm for time evolution. - -# Fields -- `integrator::A`: integrator algorithm (defaults to Lanczos exponentiation) -- `tolgauge::Float64`: tolerance for gauging algorithm -- `gaugemaxiter::Int`: maximum amount of gauging iterations -- `trscheme`: truncation algorithm for [tsvd][TensorKit.tsvd](@ref) -- `finalize::F`: user-supplied function which is applied after each timestep, with - signature `finalize(t, Ψ, H, envs) -> Ψ, envs` +$(TYPEDEF) + +Two-site MPS time-evolution algorithm based on the Time-Dependent Variational Principle. + +## Fields + +$(TYPEDFIELDS) + +## References + +* [Haegeman et al. Phys. Rev. Lett. 107 (2011)](@cite haegeman2011) """ @kwdef struct TDVP2{A,F} <: Algorithm + "algorithm used in the exponential solvers" integrator::A = Defaults.alg_expsolve() + + "tolerance for gauging algorithm" tolgauge::Float64 = Defaults.tolgauge + + "maximal amount of iterations for gauging algorithm" gaugemaxiter::Int = Defaults.maxiter - trscheme = truncerr(1e-3) + + "algorithm used for truncation of the two-site update" + trscheme::TruncationScheme = truncerr(1e-3) + + "callback function applied after each iteration, of signature `finalize(iter, ψ, H, envs) -> ψ, envs`" finalize::F = Defaults._finalize end diff --git a/src/algorithms/timestep/timeevmpo.jl b/src/algorithms/timestep/timeevmpo.jl index 27c3756cf..b7e2cde65 100644 --- a/src/algorithms/timestep/timeevmpo.jl +++ b/src/algorithms/timestep/timeevmpo.jl @@ -1,19 +1,43 @@ -#https://arxiv.org/pdf/1901.05824.pdf +""" +$(TYPEDEF) + +Generalization of the Euler approximation of the operator exponential for MPOs. + +## Fields + +$(TYPEDFIELDS) + +## References +* [Zaletel et al. Phys. Rev. B 91 (2015)](@cite zaletel2015) +* [Paeckel et al. Ann. of Phys. 411 (2019)](@cite paeckel2019) +""" @kwdef struct WII <: Algorithm + "tolerance for convergence criterium" tol::Float64 = Defaults.tol + "maximal number of iterations" maxiter::Int = Defaults.maxiter end """ - TaylorCluster(; N=2, extension=true, compression=true) +$(TYPEDEF) + +Algorithm for constructing the `N`th order time evolution MPO using the Taylor cluster expansion. + +## Fields + +$(TYPEDFIELDS) + +## References -Algorithm for constructing the Nth order time evolution MPO using the Taylor cluster expansion. -This is based on the paper [arXiv:2302.14181](https://arxiv.org/abs/2302.14181). +* [Van Damme et al. SciPost Phys. 17 (2024)](@cite vandamme2024) """ @kwdef struct TaylorCluster <: Algorithm + "order of the Taylor expansion" N::Int = 2 + "include higher-order corrections" extension::Bool = true + "approximate compression of corrections, accurate up to order `N`" compression::Bool = true end diff --git a/src/algorithms/unionalg.jl b/src/algorithms/unionalg.jl index 416abe018..040f2b517 100644 --- a/src/algorithms/unionalg.jl +++ b/src/algorithms/unionalg.jl @@ -1,8 +1,16 @@ -" - Take the union of 2 algorithms using & -" +""" +$(TYPEDEF) + +Algorithm wrapper representing the sequential application of two algorithms. + +## Fields + +$(TYPEDFIELDS) +""" struct UnionAlg{A,B} <: Algorithm + "first algorithm" alg1::A + "second algorithm" alg2::B end diff --git a/src/operators/mpohamiltonian.jl b/src/operators/mpohamiltonian.jl index 854a7dd74..80aebe1e9 100644 --- a/src/operators/mpohamiltonian.jl +++ b/src/operators/mpohamiltonian.jl @@ -3,7 +3,7 @@ MPOHamiltonian(lattice::AbstractArray{<:VectorSpace}) MPOHamiltonian(x::AbstractArray{<:Any,3}) -MPO representation of a hamiltonian. This is a specific form of a [`SparseMPO`](@ref), where +MPO representation of a hamiltonian. This is a specific form of an [`AbstractMPO`](@ref), where all the sites are represented by an upper triangular block matrix of the following form: ```math diff --git a/src/operators/multilinempo.jl b/src/operators/multilinempo.jl index 938281062..cced2e0e7 100644 --- a/src/operators/multilinempo.jl +++ b/src/operators/multilinempo.jl @@ -1,7 +1,7 @@ # MultilineMPO # ------------ """ - const MultilineMPO = Multiline{<:Union{SparseMPO,DenseMPO}} + const MultilineMPO = Multiline{<:AbstractMPO} Type that represents multiple lines of `MPO` objects. @@ -9,7 +9,7 @@ Type that represents multiple lines of `MPO` objects. MultilineMPO(mpos::AbstractVector{<:Union{SparseMPO,DenseMPO}}) MultilineMPO(Os::AbstractMatrix{<:MPOTensor}) -See also: [`Multiline`](@ref), [`SparseMPO`](@ref), [`DenseMPO`](@ref) +See also: [`Multiline`](@ref), [`AbstractMPO`](@ref) """ const MultilineMPO = Multiline{<:AbstractMPO} diff --git a/src/states/abstractmps.jl b/src/states/abstractmps.jl index 2d8221a8a..f5dcfd449 100644 --- a/src/states/abstractmps.jl +++ b/src/states/abstractmps.jl @@ -2,6 +2,12 @@ Tensor types ===========================================================================================# +""" + MPOTensor{S} + +Tensor type for representing local MPO tensors, with the index convention `W ⊗ S ← N ⊗ E`, +where `N`, `E`, `S` and `W` denote the north, east, south and west virtual spaces respectively. +""" const MPOTensor{S} = AbstractTensorMap{T,S,2,2} where {T} const MPSBondTensor{S} = AbstractTensorMap{T,S,1,1} where {T} const GenericMPSTensor{S,N} = AbstractTensorMap{T,S,N,1} where {T} # some functions are also defined for "general mps tensors" (used in peps code) diff --git a/src/states/ortho.jl b/src/states/ortho.jl index 68c91d867..260e69631 100644 --- a/src/states/ortho.jl +++ b/src/states/ortho.jl @@ -4,42 +4,70 @@ const _GAUGE_ALG_EIGSOLVE = Defaults.alg_eigsolve(; ishermitian=false, tol_factor=1) """ - struct LeftCanonical <: Algorithm +$(TYPEDEF) Algorithm for bringing an `InfiniteMPS` into the left-canonical form. + +## Fields + +$(TYPEDFIELDS) """ @kwdef struct LeftCanonical <: Algorithm + "tolerance for convergence criterium" tol::Float64 = Defaults.tolgauge + "maximal amount of iterations" maxiter::Int = Defaults.maxiter + "setting for how much information is displayed" verbosity::Int = VERBOSE_WARN + "algorithm used for orthogonalization of the tensors" alg_orth = QRpos() + "algorithm used for the eigensolver" alg_eigsolve = _GAUGE_ALG_EIGSOLVE + "minimal amount of iterations before using the eigensolver steps" eig_miniter::Int = 10 end """ - struct RightCanonical <: Algorithm +$(TYPEDEF) Algorithm for bringing an `InfiniteMPS` into the right-canonical form. + +## Fields + +$(TYPEDFIELDS) """ @kwdef struct RightCanonical <: Algorithm + "tolerance for convergence criterium" tol::Float64 = Defaults.tolgauge + "maximal amount of iterations" maxiter::Int = Defaults.maxiter + "setting for how much information is displayed" verbosity::Int = VERBOSE_WARN + "algorithm used for orthogonalization of the tensors" alg_orth = LQpos() + "algorithm used for the eigensolver" alg_eigsolve = _GAUGE_ALG_EIGSOLVE + "minimal amount of iterations before using the eigensolver steps" eig_miniter::Int = 10 end """ - struct MixedCanonical <: Algorithm +$(TYPEDEF) + +Algorithm for bringing an `InfiniteMPS` into the mixed-canonical form. + +## Fields +$(TYPEDFIELDS) """ struct MixedCanonical <: Algorithm + "algorithm for bringing an `InfiniteMPS` into left-canonical form." alg_leftcanonical::LeftCanonical + "algorithm for bringing an `InfiniteMPS` into right-canonical form." alg_rightcanonical::RightCanonical + "order in which to apply the canonicalizations, should be `:L`, `:R`, `:LR` or `:RL`" order::Symbol end diff --git a/src/utility/dynamictols.jl b/src/utility/dynamictols.jl index 34c3190d8..fedb06bf9 100644 --- a/src/utility/dynamictols.jl +++ b/src/utility/dynamictols.jl @@ -2,6 +2,7 @@ module DynamicTols import ..MPSKit: Algorithm using Accessors +using DocStringExtensions export updatetol, DynamicTol @@ -17,16 +18,24 @@ updatetol(alg, iter::Integer, ϵ::Real) = alg # ---------------------------------------- """ - DynamicTol{A}(alg, tol_min, tol_max, tol_factor) +$(TYPEDEF) Algorithm wrapper with dynamically adjusted tolerances. +## Fields + +$(TYPEDFIELDS) + See also [`updatetol`](@ref). """ struct DynamicTol{A} <: Algorithm + "parent algorithm" alg::A + "minimal value of the dynamic tolerance" tol_min::Float64 + "maximal value of the dynamic tolerance" tol_max::Float64 + "tolerance factor for updating relative to current algorithm error" tol_factor::Float64 function DynamicTol(alg::A, tol_min::Real, tol_max::Real, tol_factor::Real) where {A} diff --git a/src/utility/periodicarray.jl b/src/utility/periodicarray.jl index 6acfeb007..3cdb912b7 100644 --- a/src/utility/periodicarray.jl +++ b/src/utility/periodicarray.jl @@ -38,8 +38,21 @@ function PeriodicArray{T,N}(initializer, args...) where {T,N} return PeriodicArray(Array{T,N}(initializer, args...)) end +""" + PeriodicVector{T} + +One-dimensional dense array with elements of type `T` and periodic boundary conditions. +Alias for [`PeriodicArray{T,1}`](@ref). +""" const PeriodicVector{T} = PeriodicArray{T,1} PeriodicVector(data::AbstractVector{T}) where {T} = PeriodicVector{T}(data) + +""" + PeriodicMatrix{T} + +Two-dimensional dense array with elements of type `T` and periodic boundary conditions. +Alias for [`PeriodicArray{T,2}`](@ref). +""" const PeriodicMatrix{T} = PeriodicArray{T,2} PeriodicMatrix(data::AbstractMatrix{T}) where {T} = PeriodicMatrix{T}(data) diff --git a/src/utility/utility.jl b/src/utility/utility.jl index 5075ec5aa..8ab925709 100644 --- a/src/utility/utility.jl +++ b/src/utility/utility.jl @@ -151,7 +151,7 @@ end """ tensorexpr(name::Symbol, ind_out, [ind_in]) -Generates expressions for use within [`@tensor`](@ref TensorOperations.@tensor) environments +Generates expressions for use within [`@tensor`](@extref TensorOperations.@tensor) environments of the form `name[ind_out...; ind_in]`. """ tensorexpr(name::Symbol, inds) = Expr(:ref, name, inds...)