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)

This function calculates the nth wavefunction of the harmonic oscillator for a given value of inductance (L) and capacitance (C) at a charge x.

wavefunction(L, C, n, x)#

This function calculates the nth wavefunction of the harmonic oscillator for a given value of inductance (L) and capacitance (C) at a charge x.

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 state of the harmonic oscillator.

  • x (float) – The value of charge (independent variable) for which the wavefunction is calculated.

Returns:

Calculated wavefunction

Return type:

float