  A generalization of the quantum XOR-gate is presented which operates in
arbitrary dimensional Hilbert spaces. Together with one-particle Fourier
transforms this gate is capable of performing a variety of tasks which are
important for quantum information processing in arbitrary dimensional Hilbert
spaces. Among these tasks are the preparation of Bell states, quantum
teleportation and quantum state purification. A physical realization of this
generalized XOR-gate is proposed which is based on non-linear optical elements.
