  We present a generic study of unambiguous discrimination between two mixed
quantum states. We derive operational optimality conditions and show that the
optimal measurements can be classified according to their rank. In Hilbert
space dimensions smaller or equal to five this leads to the complete optimal
solution. We demonstrate our method with a physical example, namely the
unambiguous comparison of n quantum states, and find the optimal success
probability.
