Quantum multimeters: A programmable state discriminator