This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int step = 10; //# of pixels between computed Psi values | |
int time = 0; | |
int d=81; // = 81 = the dimensionality of this discretized Hilbert space | |
float[] Psi = new float[d]; // = |<x|Psi>|^2, the probability density indexed by position representation | |
float[] E = new float[d]; // = <E|Psi>, i.e. the state vector in energy representation (pre-normalization) | |
int[][] Herm = new int[d][d]; // Herm[i][j] = jth power of ksi in ith Hermite polynomial | |
float[] C = new float[d]; // = factor 1/(sqrt(2^n * n!)), the normalization constant for nth Hermite polynomial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- boilerplate functions | |
natToInt : Nat -> Int | |
natToInt Z = 0 | |
natToInt (S n) = 1 + (natToInt n) | |
natToString : Nat -> String | |
natToString n = show (natToInt n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Sigmas Module ~ Higher Sigma operators and their operator algebra | |
-- Cliff Harvey | |
-- February 2014 | |
module Sigmas where | |
import Control.Applicative | |
-- 4 basic complex phases: 1, -1, i, -i | |
data Phase = P1 | M1 | Pi | Mi deriving Eq |
NewerOlder