Photon Logic