Recent Changes - Search:

HomePage

PmWiki

pmwiki.org

MpApplyOpt

The mp-apply-opt program calculates the solution of {$|x\rangle = A|\psi\rangle$}, by taking an existing guess solution for {$|x\rangle$} and optimizing it.

Matrix Product Toolkit version HEAD-0.7.4.0 (subversion tree rev 661M)
Compiled on Jun 25 2007 at 22:43:45
usage: mp-apply-opt [options] <operator> <rhs> <psi>
Allowed options:
  --help                    show this help message
  -2 [ --two-site ]         modify 2 neighboring sites at once
  --min-states arg          Minimum number of states to keep [default 1]
  -m [ --max-states ] arg   Maximum number of states to keep [default 10000]
  -r [ --trunc ] arg        Cutoff truncation error per site [default 0]
  -d [ --eigen-cutoff ] arg Cutoff threshold for density matrix eigenvalues [default -1]
  -f [ --mix-factor ] arg   Mixing coefficient for the density matrix [default 0.01]
  -s [ --sweeps ] arg       Number of half-sweeps to perform [default 2]
  --a2 arg                  Use this pre-computed value of <rhs|adjoint(A)*A|rhs> to speed up the residual calculation
  --no-resid                Don't calculate the final residual norm

The usual options for truncating the basis all work. In this case, they are applied relative. That is, because we usually don't know (and don't care much) what the norm of {$|x\rangle$} is, we usually want to set the truncation error or eigenvalue cutoff as if we had {$||x||=1$}.

By default (unless the --no-resid option is supplied), the program will calculate the squared norm of the residual {$|r\rangle = A|\psi\rangle - |x\rangle$}, and the angle {$\theta^2$}, which represents the angle between the exact and computed {$|x\rangle$}, given by {$|\langle x|A|\psi\rangle| = ||x|| \; ||A\psi|| \cos \theta$}. Usually {$\theta^2$} is the quantity we want to test, as the residual itself scales with the norm of {$|x\rangle$} but {$\theta^2$} does not.

Calculating the residual norm is an expensive operation however, because it requires knowing {$\langle \psi|A^\dagger A|\psi\rangle$}. If this value is already known, then it can instead be supplied with the --a2 option. The remaining calculation to get {$||r||^2$} and {$\theta^2$} is very fast.

If the guess vector is not expected to be very good, then adding a mixing factor works extremely well. Once the guess vector is a fairly good approximation, then it appears that the 2-site algorithm with no mixing factor produces an optimal solution very quickly.

Examples

Remember that we always require an existing wavefunction to use as a guess vector, and this must have the correct quantum numbers! If we don't have an appropriate wavefunction, then make a random one with mp-random.

Suppose we have a poor quality guess wavefunction, and we want to optimize {$|guess\rangle = lattice:A |input\rangle$}.

mp-apply-opt -m 150 -f 0.001 lattice:A input guess

Once {$|guess\rangle$} is reasonably good, then the 2-site algorithm with no mixing works extremely well, and seems to produce an essentially optimal wavefunction. For this second pass, we will also know what the expectation value of {$A^\dagger A$} is (it will be included in the output from the previous run).

mp-apply-opt -m 150 -f 0 -2 --a2=7.32879847982 lattice:A input guess

Here, we used the value of {$\langle input | A^\dagger A |input \rangle$} that was given by the previous run of mp-apply-opt. We also could have used mp-expectation input lattice:"adjoint(A)*A" to get this number.

Notes

It would be nice to have an option to do one half-sweep with a mixing factor, and then the return half-sweep with the 2-site algorithm. This should be added sometime. Doing just a single half-sweep with -s 1 doesn't have the same effect, because that will waste time rotating the wavefunction back to normal form after the half-sweep.

In fact, the way the truncations are done is not as precise as we would like. Relative truncation means each local operation is done relative to the local norm at each iteration. In fact it would be better to use the computed exact value of what {$||x||$} should be and do an absolute truncation based on this fixed number. In practice the difference is probably irrelevant.

The residual norm calculation will fail for a non-Abelian symmetry where the operator {$A$} is not a scalar. This isn't easy to fix, but it should be possible to supply the correct value with --a2, if that is known.

See Also

Edit - History - Print - Recent Changes - Search
Page last modified on July 16, 2007, at 10:49 PM