With a single-photon representation of the quantum states and a multirail optical network for performing the unitary transformation, we give a scheme for an optical implementation of the universal programmable quantum state discriminator that unambiguously discriminates between two unknown states with optimal probability of success.