  Deterministic discrimination of nonorthogonal states is forbidden by quantum
measurement theory. However, if we do not want to succeed all the time, i.e.
allow for inconclusive outcomes to occur, then unambiguous discrimination
becomes possible with a certain probability of success. A variant of the
problem is set discrimination: the states are grouped in sets and we want to
determine to which particular set a given pure input state belongs. We consider
here the simplest case, termed quantum state filtering, when the $N$ given
non-orthogonal states, $\{|\psi_{1} >,..., |\psi_{N} > \}$, are divided into
two sets and the first set consists of one state only while the second consists
of all of the remaining states. We present the derivation of the optimal
measurement strategy, in terms of a generalized measurement (POVM), to
distinguish $|\psi_1>$ from the set $\{|\psi_2 >,...,|\psi_N > \}$ and the
corresponding optimal success and failure probabilities. The results, but not
the complete derivation, were presented previously [\prl {\bf 90}, 257901
(2003)] as the emphasis there was on appplication of the results to novel
probabilistic quantum algorithms. We also show that the problem is equivalent
to the discrimination of a pure state and an arbitrary mixed state.
