Realization of Multi-Valued Logic Using Optical Quantum Computing