We present quadratic dynamical invariant and evaluate Berry's phase for the time-dependent Schroedinger equation with the most general variable quadratic Hamiltonian.
The most general time-dependence Hamiltonian for a harmonic oscillator is both linear and quadratic in the coordinate and the canonical momentum. It describes in general a harmonic oscillator with a time-dependent mass, a time-dependent friction (or antifriction) 'constant', and a time-dependent spring constant, acted upon by a time-dependent force. The energy, whose time derivative is the power, is in general different from the Hamiltonian. The generalized Berry phase for a given energy eigenstate has a state-dependent part, which vanishes if there is no damping, and an arbitrary state-independent part. If the Hamiltonian is identified as the energy, both the energy eigenvalues and the generalized Berry phase are different. In the adiabatic limit both approaches give the same total phase, which is the sum of the dynamical and Berry phases.
A generalisation of the Berry phase, which reduces to the usual Berry phase in the adiabatic and cyclic case is derived in a gauge-invariant way. This generalised Berry phase, unlike the Berry phase, is invariant under unitary transformations. A time-dependent generalised harmonic oscillator with a cross term in the Hamiltonian is taken as an example. The Hamiltonian of this system is not in general the energy. An energy, the time derivative of which is the power, is obtained from the equation of motion. When the system is quantised, the generalised Berry phase is zero, and remains invariant under unitary transformations. On the other hand, if the energy is chosen to be the Hamiltonian, a non-zero generalised Berry phase is obtained, but the power is given incorrectly. In this case the total phase, which includes the dynamical phase and the generalised Berry phase, is equal in the adiabatic limit to the correct total phase.
Exact Schr\"odinger wave functions of a time-dependent harmonic oscillator are found in analytically closed forms for the eigenstates of the generalized invariant and the instantaneous Hamiltonian. The cyclic initial state (CIS) and corresponding nonadiabatic Berry phase are also found exactly for a $\ensuremath{\tau}$-periodic Hamiltonian. There may exist $N\ensuremath{\tau}$-periodic CISs and corresponding Berry phases, but the cases with unstable classical motions do not have CISs in which cases Berry phases do not exist.