function grad=getgrad(W)
Input:
- W: Expansion coefficients for
unconstrained wave functions, stored as an
matrix
Output:
- grad:
matrix containing the
derivatives
Global variable:
- gbl_f: State fillings stored as an
column vector.
Modify getgrad() as above to employ the appropriate formula for the
case of variable fillings,
where
,
,
, and
is the operator which the function
in Appendix A computes.1 Note that the parentheses have been arranged
here again to minimize the size and cost of the calculation of
intermediate expressions and that
may be computed
in octave as sqrtm(inv(U)). (Don't forget the ``m'' in
``sqrtm''! It specifies the matrix-square root as opposed to simply
taking the square root of each element of the matrix.)
Subsections
Tomas Arias
2006-04-26