Harmonic Oscillator#
Quantarhei package (http://www.github.com/quantarhei)
ho (harmonic oscillator) module
- class quantarhei.qm.oscillators.ho.fcstorage[source]#
Bases:
SaveableFC factor look-up class
Once Frank-Condon factors for some value of the shift are calculated they can be stored here, and retrieved when needed again
- class quantarhei.qm.oscillators.ho.operator_factory(N: int = 100)[source]#
Bases:
SaveableClass providing useful operators
Creation and anihilation operators
- shift_operator(dd_: Any) ndarray[source]#
Calculates the Shift Operator based on the size N_ of the basis of states and the shift dd_.
The shift operator is defined as
\[D_{\alpha} = e^{-\alpha \frac{\partial}{\partial Q}}\]where \(Q\) is the dimensionless coordinate of the Harmonic oscillator with Hamiltonian
\[H = \frac{\hbar\omega}{2}\left(P^2 + Q^2\right).\]In this definition, the shift operator acts on a statevector \(\psi(Q)\) in \(Q\)-representation is such a way that it shifts it by the value \(\alpha\) along the its coordinate \(Q\), i.e.
\[D_{\alpha}\psi(Q) = \psi(Q-\alpha).\]This definition is consistent with the definition of a shift operator as defined in Wikipedia (look for shift operator). It shifts the function to the right along the coordite \(Q\) axis (unlike in the definition in Wikipedia - this seems to be more natural for physicists.)
The dimensionless coordite \(Q\) and dimensionless momentum \(P\) are related to creation and annihilation operators as
\[a = \frac{1}{\sqrt{2}}\left(Q+iP\right)\]\[a^{\dagger} = \frac{1}{\sqrt{2}}\left(Q-iP\right)\]\[Q = \frac{1}{\sqrt{2}}\left(a + a^{\dagger}\right)\]\[P = \frac{1}{i\sqrt{2}}\left(a-a^{\dagger}\right).\]With these definitions we have
\[H = \hbar\omega\left(a^{\dagger}a + \frac{1}{2}\right)\]As we have \(P=-i\frac{\partial}{\partial Q}\), the shift operator reads as
\[D_{\alpha} = e^{-i\alpha P} = e^{-\frac{\alpha}{\sqrt{2}}\left(a-a^{\dagger}\right)}\]The operator can be generalized for complex values of \(\alpha\) to read
\[D_{\alpha} = e^{\frac{1}{\sqrt{2}}\left(\alpha a^{\dagger}-\alpha^{*}a\right)},\]where \(*\) represents complex conjugation. This is the definition implemented in Quantarhei.
The definition differs by the factor of \(\sqrt{2}\) from what is usually used in literature, but for applications in molecular physics, this definition seems to be more reasonable.
- class quantarhei.qm.oscillators.ho.qrepresentation(qaxis: Any)[source]#
Bases:
objectCoordinate representation of the HO wavefunctions
- get_ho_ground_state() DFunction[source]#
Returns the ground state wavefunction of the Harmonic oscillator