Fock States

Matlab routines to evaluate eigenstates of the quantum harmonic oscillator and Hermite polynomials
44 Downloads
Updated 10 Jan 2019

These routines evaluate the wave function for an eigenstate of the quantum harmonic oscillator, and for linear combinations of those eigenstates.

The eigenstates are closely related to Hermite polynomials. Besides these routines, they could be evaluated by hermiteH from the symbolic toolbox, or by the numerical hermite routines posted on File Exchange by Avan Suinesiaputra and Paul Fricker, and HermitePoly by David Terr. The current code has the following advantages:

1. When evaluating eigenstates n = 180 and above, the values of the Hermite polynomials are too big to represent as double precision numbers.

2. These routines are two orders of magnitude faster than hermiteH.

3. The numerical Hermite polynomial routines mentioned above become unstable around n = 60. The current routines evaluate correct eigenstates for n = 1e7, so the Hermite polynomials derived from them will overflow long before the routines become unstable. Users with sufficient patience are encouraged to test them further.

Cite As

Rodney Polkinghorne (2024). Fock States (https://github.com/thisrod/fockstates), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Numerical Integration and Differential Equations in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.1

Added image

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.