  We study a class of nonlinear Hamiltonians, with applications in quantum
optics. The interaction terms of these Hamiltonians are generated by taking a
linear combination of powers of a simple `beam splitter' Hamiltonian. The
entanglement properties of the eigenstates are studied. Finally, we show how to
use this class of Hamiltonians to perform special tasks such as conditional
state swapping, which can be used to generate optical cat states and to sort
photons.
