We discuss the theory of extracting an interaction Hamiltonian from a preassigned unitary transformation of quantum states. Such a procedure is of significance in quantum computations and other optical information processing tasks. We particularize the problem to the construction of totally symmetric 2N ports as introduced by Zeilinger and his collaborators [A. Zeilinger, M. Zukowski, M. A. Horne, H. J. Bernstein, and D. M. Greenberger, in Fundamental Aspects of Quantum Theory, edited by J. Anandan and J. J. Safko (World Scientific, Singapore, 1994)]. These are realized by the discrete Fourier transform, which simplifies the construction of the Hamiltonian by known methods of linear algebra. The Hamiltonians found are discussed and alternative realizations of the Zeilinger class transformations are presented. We briefly discuss the applicability of the method to more general devices.