  The purpose of this paper is to describe the numerical solution of the
Hamilton-Jacobi-Bellman (HJB) for an optimal control problem for quantum spin
systems. This HJB equation is a first order nonlinear partial differential
equation defined on a Lie group. We employ recent extensions of the theory of
viscosity solutions from Euclidean space to Riemannian manifolds to interpret
possibly non-differentiable solutions to this equation. Results from
differential topology on the triangulation of manifolds are then used to
develop a finite difference approximation method, which is shown to converge
using viscosity solution techniques. An example is provided to illustrate the
method.
