mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-21 11:53:31 +01:00
Update DIIS.mli
This commit is contained in:
parent
6d783999af
commit
47864a9fb7
@ -1,25 +1,29 @@
|
||||
(** Direct Inversion of the Iterative Subspace algorithm.
|
||||
|
||||
At each iteration, one has:
|
||||
At iteration {% $m$ %}, one has:
|
||||
|
||||
- {% $\mathbf{p}$ %}, a vector of parameters
|
||||
- {% $\mathbf{e}$ %}, an approximate error vector
|
||||
- {% $\mathbf{p}_m$ %}, a vector of parameters
|
||||
- {% $\mathbf{e}_m$ %}, an approximate error vector
|
||||
|
||||
The DIIS approximate solution for iteration $m+1$ is given by
|
||||
|
||||
The DIIS approximate solution is given by
|
||||
{% \begin{align*}
|
||||
\mathbf{p}^{\text{DIIS}} & = \sum_i c_i (\mathbf{p}^f + \mathbf{e}_i) \\
|
||||
& = \sum_i c_i \mathbf{p}^f + \sum_i c_i \mathbf{e}_i) \\
|
||||
\mathbf{p}_{m+1} & = \sum_{i=1}^m c_i (\mathbf{p}^f + \mathbf{e}_i) \\
|
||||
& = \sum_{i=1}^m c_i \mathbf{p}^f + \sum_i c_i \mathbf{e}_i
|
||||
\end{align*} %}
|
||||
where {% $\mathbf{p}^f$ %} is the exact solution, so one wants to minimize
|
||||
the norm of the error vector imposing the constraint that $\sum_i c_i = 1$ with
|
||||
a Langrange multiplier {% $\lambda$ %}.
|
||||
|
||||
where {% $\mathbf{p}^f$ %} is the exact solution. One wants to minimize the
|
||||
norm of the error vector imposing the constraint that {% $\sum_{i=1}^m c_i = 1$ %}
|
||||
with a Langrange multiplier {% $\lambda$ %}.
|
||||
|
||||
{%
|
||||
\begin{align*}
|
||||
\mathcal{L} & = ||\sum_i c_i \mathbf{e}_i)||^2 - \lambda \left(\sum_i c_i - 1\right) \\
|
||||
\mathcal{L} & = ||\sum_i c_i \mathbf{e}_i||^2 - \lambda \left(\sum_i c_i - 1\right) \\
|
||||
& = \sum_{ij} c_i c_j B_{ij} - \lambda \left(\sum_i c_i - 1\right)
|
||||
\end{align*}
|
||||
with {% $B_{ij} = \langle \mathbf{e}_i | \mathbf{e}_j \rangle$ %}.
|
||||
%}
|
||||
with
|
||||
{% $B_{ij} = \langle \mathbf{e}_i | \mathbf{e}_j \rangle$ %}.
|
||||
|
||||
Equating zero to the derivatives of {% $\mathcal{L}$ %} with respect to {% $c_i$ %} and {% $\lambda$ %} leads to
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user