1. An all-optical logic gate comprising: a linear optical section receiving at least two input wave fields X and Y, and linearly combining said inputs to produce an intermediary wave field output U; and at least one non-linear phase-erasing optical section receiving said intermediary output U of said linear optical section and producing a final output wave field V, wherein: the complex amplitude of said final output field V depends solely on the amplitude of said intermediary field output; wherein said at least two inputs X and Y and said final output waves V of said gate defined as complex two-valued logical alphabet that may be assigned the logic values True and False; and said final output wave V of said gate is a known result of a Boolean logic function of said inputs.