  We generalize a recently proposed algebraic method in order to treat
non-Hermitian Hamiltonians. The approach is applied to several quadratic
Hamiltonians studied earlier by other authors. Instead of solving the
Schr\"odinger equation we simply obtain the eigenvalues of a suitable matrix
representation of the operator. We take into account the existence of unitary
and antiunitary symmetries in the quantum-mechanical problem.
