  We construct the optimal strategy for the estimation of an unknown unitary
transformation $U\in SU(d)$. This includes, in addition to a convenient
measurement on a probe system, finding which is the best initial state on which
$U$ is to act. When $U\in SU(2)$, such an optimal strategy can be applied to
estimate simultaneously both the direction and the strength of a magnetic
field, and shows how to use a spin 1/2 particle to transmit information about a
whole coordinate system instead of only a direction in space.
