  We develop a sufficient condition for the least-squares measurement (LSM), or
the square-root measurement, to minimize the probability of a detection error
when distinguishing between a collection of mixed quantum states. Using this
condition we derive the optimal measurement for state sets with a broad class
of symmetries.
  We first consider geometrically uniform (GU) state sets with a possibly
nonabelian generating group, and show that if the generator satisfies a certain
constraint, then the LSM is optimal. In particular, for pure-state GU ensembles
the LSM is shown to be optimal. For arbitrary GU state sets we show that the
optimal measurement operators are GU with generator that can be computed very
efficiently in polynomial time, within any desired accuracy.
  We then consider compound GU (CGU) state sets which consist of subsets that
are GU. When the generators satisfy a certain constraint, the LSM is again
optimal. For arbitrary CGU state sets the optimal measurement operators are
shown to be CGU with generators that can be computed efficiently in polynomial
time.
