Optical implementation of two programmable quantum measurement devices