  A three-dimensional anisotropic quantum well placed in an adiabatically
precessing uniform magnetic field is considered and an explicit formula for the
Berry phase is obtained. To get the Berry phase, a purely algebraic algorithm
of reducing a quadratic Hamiltonian to the canonical form via symplectic
transformations of the phase space is presented.
