We construct the optimal strategy for the estimation of an unknown unitary
transformation U is an element of SU(d). This includes, in addition to a co
nvenient measurement on a probe system, finding which is the best initial s
tate on which U is to act. When U is an element of SU(2), such an optimal s
trategy can be applied to simultaneously estimate both the direction and th
e 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 dir
ection in space.