-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9232ef
commit ddf7785
Showing
23 changed files
with
331 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. _alg_arnoldi: | ||
|
||
******************************* | ||
Restarted Arnoldi iteration | ||
******************************* | ||
|
||
This is a Krylov method whose update rule expands the function in a Krylov basis | ||
:math:`\mathcal{K}_L = \mathrm{lin}\{\ket{\psi_k}, H\ket{\psi_{k}},\ldots,H^{L-1}\ket{\psi_{k}}\}`, | ||
|
||
.. math:: | ||
\psi_{k+1} = \sum_{i=0}^{L-1} c_i H^i \psi_k. | ||
This Arnoldi method estimates the energy functional using two matrices, `A` and `N`---included due to MPS finite-precision---, containing | ||
the matrix elements of `H` and the identity computed in the Krylov basis | ||
|
||
.. math:: | ||
E[\chi] = E(\boldsymbol{v}) = \frac{\boldsymbol{v}^\dagger A \boldsymbol{v}}{\boldsymbol{v}^\dagger N \boldsymbol{v}}. | ||
This is the cost function for the optimization, whose critical points | ||
|
||
.. math:: | ||
\frac{\delta E}{\delta \boldsymbol{v}^*} = \frac{1}{\boldsymbol{v}^\dagger N \boldsymbol{v}}\left(A \boldsymbol{v} - E(\boldsymbol{v}) N\boldsymbol{v}\right) = 0. | ||
This leads to the generalized eigenvalue equation | ||
|
||
.. math:: | ||
A \boldsymbol{v} = \lambda N \boldsymbol{v}, | ||
where the minimum eigenvalue :math:`\lambda = E(\boldsymbol{v})` gives the optimal energy for the $k$-th step, and the associated direction | ||
:math:`\mathbf{v}` provides the steepest descent on the plane. | ||
|
||
This procedure could be enhanced with additional approaches. We introdce a specific restart method, | ||
which halts the expansion of the Krylov basis when either the maximum desired size $n_v$ is attained, or when the condition number of | ||
the scalar product matrix $N$ exceeds a certain threshold. This occurs when there is a risk of adding a vector that is linearly dependent | ||
on the previous ones. In such a scenario, we can solve the generalized eigenvalue problem to obtain | ||
the next best estimate in a smaller basis. Another approach to enhance the convergence of eigenvalues is to extrapolate the next vector | ||
based on previous estimates, using the formula :math:`|{\xi_{k+1}}\rangle=(1-\gamma)|{\psi_{k+1}}\rangle+|{\psi_k}\rangle`, with the | ||
memory factor :math:`\gamma=-0.75`. | ||
|
||
|
||
The rule in :ref:`alg_descent` is a particular case of the Arnoldi iteration with a Krylov basis with $L=2$. | ||
|
||
This algorithm can be used both in a context of global optimazation and evolution. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
~seemps.optimization.arnoldi | ||
~seemps.evolution.arnoldi | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
seemps.evolution.arnoldi | ||
======================== | ||
|
||
.. currentmodule:: seemps.evolution | ||
|
||
|
||
|
||
.. autofunction:: seemps.evolution.arnoldi | ||
|
11 changes: 11 additions & 0 deletions
11
...algorithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.H.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.H | ||
====================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.H | ||
|
11 changes: 11 additions & 0 deletions
11
...algorithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.N.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.N | ||
====================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.N | ||
|
11 changes: 11 additions & 0 deletions
11
...algorithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.V.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.V | ||
====================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.V | ||
|
11 changes: 11 additions & 0 deletions
11
...s/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.add_vector.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.add\_vector | ||
================================================================ | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.add_vector | ||
|
11 changes: 11 additions & 0 deletions
11
...ted/seemps.optimization.arnoldi.MPSArnoldiRepresentation.build_Krylov_basis.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.build\_Krylov\_basis | ||
========================================================================= | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.build_Krylov_basis | ||
|
11 changes: 11 additions & 0 deletions
11
.../generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.eigenvector.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.eigenvector | ||
================================================================ | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.eigenvector | ||
|
11 changes: 11 additions & 0 deletions
11
...rithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.empty.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.empty | ||
========================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.empty | ||
|
11 changes: 11 additions & 0 deletions
11
...ed/seemps.optimization.arnoldi.MPSArnoldiRepresentation.energy_and_variance.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.energy\_and\_variance | ||
========================================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.energy_and_variance | ||
|
11 changes: 11 additions & 0 deletions
11
.../generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.exponential.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.exponential | ||
================================================================ | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.exponential | ||
|
11 changes: 11 additions & 0 deletions
11
...rithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.gamma.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.gamma | ||
========================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.gamma | ||
|
11 changes: 11 additions & 0 deletions
11
...hms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.operator.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.operator | ||
============================================================= | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.operator | ||
|
11 changes: 11 additions & 0 deletions
11
...enerated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.orthogonalize.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.orthogonalize | ||
================================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.orthogonalize | ||
|
11 changes: 11 additions & 0 deletions
11
...mps.optimization.arnoldi.MPSArnoldiRepresentation.restart_with_ground_state.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.restart\_with\_ground\_state | ||
================================================================================= | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.restart_with_ground_state | ||
|
11 changes: 11 additions & 0 deletions
11
...ed/seemps.optimization.arnoldi.MPSArnoldiRepresentation.restart_with_vector.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.restart\_with\_vector | ||
========================================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
method | ||
|
||
.. automethod:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.restart_with_vector | ||
|
39 changes: 39 additions & 0 deletions
39
docs/algorithms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
seemps.optimization.arnoldi.MPSArnoldiRepresentation | ||
==================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
.. autoclass:: MPSArnoldiRepresentation | ||
|
||
|
||
|
||
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. | ||
.. autosummary:: | ||
:toctree: | ||
MPSArnoldiRepresentation.add_vector | ||
MPSArnoldiRepresentation.build_Krylov_basis | ||
MPSArnoldiRepresentation.eigenvector | ||
MPSArnoldiRepresentation.energy_and_variance | ||
MPSArnoldiRepresentation.exponential | ||
MPSArnoldiRepresentation.restart_with_ground_state | ||
MPSArnoldiRepresentation.restart_with_vector | ||
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. | ||
.. autosummary:: | ||
:toctree: | ||
MPSArnoldiRepresentation.empty | ||
MPSArnoldiRepresentation.operator | ||
MPSArnoldiRepresentation.H | ||
MPSArnoldiRepresentation.N | ||
MPSArnoldiRepresentation.V | ||
MPSArnoldiRepresentation.strategy | ||
MPSArnoldiRepresentation.tol_ill_conditioning | ||
MPSArnoldiRepresentation.gamma | ||
MPSArnoldiRepresentation.orthogonalize | ||
11 changes: 11 additions & 0 deletions
11
...hms/generated/seemps.optimization.arnoldi.MPSArnoldiRepresentation.strategy.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.strategy | ||
============================================================= | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.strategy | ||
|
11 changes: 11 additions & 0 deletions
11
...d/seemps.optimization.arnoldi.MPSArnoldiRepresentation.tol_ill_conditioning.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
seemps.optimization.arnoldi.MPSArnoldiRepresentation.tol\_ill\_conditioning | ||
=========================================================================== | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
attribute | ||
|
||
.. autoattribute:: seemps.optimization.arnoldi.MPSArnoldiRepresentation.tol_ill_conditioning | ||
|
11 changes: 11 additions & 0 deletions
11
docs/algorithms/generated/seemps.optimization.arnoldi.arnoldi_eigh.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
seemps.optimization.arnoldi.arnoldi\_eigh | ||
========================================= | ||
|
||
.. currentmodule:: seemps.optimization.arnoldi | ||
|
||
|
||
|
||
.. autofunction:: seemps.optimization.arnoldi.arnoldi_eigh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
seemps.optimization.arnoldi | ||
=========================== | ||
|
||
.. automodule:: seemps.optimization.arnoldi | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
:toctree: | ||
|
||
arnoldi_eigh | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
:toctree: | ||
|
||
MPSArnoldiRepresentation | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ Index of algorithms | |
tensor_split | ||
mps_simplification | ||
gradient_descent | ||
arnoldi | ||
dmrg | ||
tebd_evolution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters