HO_wavefunctions

This code calculations the wavefunction(s) of the simple harmonic oscillator corresponding to an LC circuit.

Key References:
  • R. Shankar, “Principles of Quantum Mechanics”, Second Edition, Springer (1994)

  • or any other undergraduate quantum mechanics textbook)

Functions

wavefunction(L, C, n, x[, hbar])

Return the n-th energy eigenfunction of the LC (harmonic) oscillator.

wavefunction(L, C, n, x, hbar=1.0)[source]

Return the n-th energy eigenfunction of the LC (harmonic) oscillator.

The coordinate x is the capacitor charge \(Q\). With \(H = \Phi^2/2L + Q^2/2C\), the flux \(\Phi\) is the momentum conjugate to \(Q\), so the “mass” is \(L\) and

\[\omega = 1/\sqrt{LC}, \qquad \psi_n(Q) = \frac{1}{\sqrt{2^n n!}} \left(\frac{L\omega}{\pi\hbar}\right)^{1/4} e^{-L\omega Q^2/2\hbar}\, H_n\!\left(\sqrt{L\omega/\hbar}\,Q\right),\]

normalized so that \(\int |\psi_n|^2\,dQ = 1\). Note \(L\omega = \sqrt{L/C} = Z\), the characteristic impedance.

Parameters:
  • L (float) – The inductance of the inductor in an LC circuit.

  • C (float) – The capacitance of the capacitor in an LC circuit.

  • n (int) – The energy level (any non-negative integer).

  • x (float or array) – The charge at which the wavefunction is evaluated.

  • hbar (float) – Reduced Planck constant in the units of L, C and x. Defaults to 1 (natural units); pass scipy.constants.hbar for SI inputs.

Returns:

\(\psi_n(x)\).

Return type:

float or array