learn-physics-0.6.0.0: Haskell code for learning physics

Physics.Learn.Schrodinger1D

Description

This module contains functions to solve the (time dependent) Schrodinger equation in one spatial dimension for a given potential function.

Synopsis

# Potentials

Arguments

 :: Double position -> Double potential energy

Free potential. The potential energy is zero everywhere.

Arguments

 :: Double spring constant -> Double position -> Double potential energy

Harmonic potential. This is the potential energy of a linear spring.

Arguments

 :: Double well width -> Double energy height of well -> Double position -> Double potential energy

Finite square well potential. Potential is zero inside the well, and constant outside the well. Well is centered at the origin.

Arguments

 :: Double width (for both wells and well separation) -> Double energy height of barrier between wells -> Double position -> Double potential energy

A double well potential. Potential energy is a quartic function of position that gives two wells, each approximately harmonic at the bottom of the well.

Arguments

 :: Double energy height of barrier (to the right of origin) -> Double position -> Double potential energy

A step barrier potential. Potential is zero to left of origin.

Arguments

 :: Double thickness of wall -> Double energy height of barrier -> Double position of center of barrier -> Double position -> Double potential energy

A potential barrier with thickness and height.

# Initial wavefunctions

Arguments

 :: Int nonnegative integer n identifying stationary state -> Double x sqrt(hbar(m * omega)), i.e. position in units of sqrt(hbar/(m * omega)) -> C complex amplitude

Harmonic oscillator stationary state

Arguments

 :: Double mass of particle -> Double angular frequency -> Complex Double parameter z -> Double -> Complex Double wavefunction

Arguments

 :: Double width parameter -> Double center of wave packet -> Double -> Complex Double wavefunction

Arguments

 :: Double width parameter -> Double center of wave packet -> Double momentum -> Double -> Complex Double wavefunction

# Utilities

Arguments

 :: R lowest x -> R highest x -> Int dimension of state vector -> (R -> C) wavefunction -> Vector C state vector

Transform a wavefunction into a state vector.

Arguments

 :: R lowest x -> R highest x -> Int dimension of state vector -> R hbar -> R mass -> (R -> R) potential energy function -> Matrix C Hamiltonian Matrix

Arguments

 :: Vector C state vector -> Vector R vector of x values -> R X, expectation value of X

Arguments

 :: (Double, Double) y range -> [Double] xs -> Vector C state vector -> Picture

Produce a gloss `Picture` of state vector for 1D wavefunction.