/QTransferMatrix [ module ]

[ Top ] [ module ]

NAME

QTransferMatrix

AUTHOR

W. Hergert

PACKAGE

QPack.m

USAGE

QTransferMatrix[x_,v_,en_] calculates the transfer matrix of the given potential at a certain energy

INPUT

OUTPUT

list containing the transfer matrix

ERROR MESSAGES

OPTIONS

QPotential : "constant" - piecewise constant potential

LITERATURE

SOURCE

31 QTransferMatrix[x_,pot_,en_,OptionsPattern[{QPotential->"constant"}]] := Module[{lx,lpot,di,i,kappa},
32 lx=Length[x]; lpot=Length[pot];tmat:=IdentityMatrix[2];kappa:={};
33 If[OptionValue[QPotential]=="constant",
34 If[lx === lpot,
35 Do[kappa=Append[kappa, Sqrt[2*(pot[[i]]-en)] ]; di:=0 ; 
36 tmat=tmat . QTm[kappa[[i]],di] ; di:= x[[i+1]]-x[[i]];
37 tmat=tmat . QTmI[kappa[[i]],di] , {i,1,lx-1} ]
38 ,Print["--> QTransferMatrix - Error : Listen haben falsche Laenge !"] ];Return[tmat],
39 Print["--> QTransferMatrix - Error : Option nicht implementiert"]]
40 ]