/QBandStructure [ module ]

[ Top ] [ module ]

NAME

QTransferMatrix

AUTHOR

W. Hergert

PACKAGE

QPack.m

MODIFICATION HISTORY

April 2013 : New formulation for the book "Einfuehrung in die Quantphysik"

USAGE

QTransferMatrix[x_,v_,vl_,vr_] plots a piecewise constant or linear potetential

INPUT

vl : constant potential on the left hand side vr : constant potential on the right hand side x : list of points, defining the intervalls in the potentials {x1,x2,...xN} v : list of potential values vi at the points xi

OUTPUT

plot of the potential

ERROR MESSAGES

if lists x and v have different length or symbols appear in the input if options "linear", "constant" are not correct

OPTIONS

QPlotRange : length of constant potential at the left and right hand side QPotential : "constant" - piecewise constant potential

               "linear"   - piecewise linear potential 

DESCRIPTION see source code

LITERATURE

TODO

PROBLEMS

SOURCE

41 QBandStructure[x_,pot_,k_,OptionsPattern[{QPotential->"constant"}]] := Module[{ml,mr,kl,kr,ma,lx,lpot} ,
42 lx=Length[x];lpot=Length[pot];Clear[e];tmat:=IdentityMatrix[2];kappa:={};
43 If[OptionValue[QPotential]=="constant",
44         If[lx === lpot,
45 Do[kappa=Sqrt[2*(pot[[i]]-en)] di=0 ; 
46 tmat=tmat . QTm[kappa,di] ; di= x[[i+1]]-x[[i]];
47 tmat=tmat . QTmI[kappa,di] , {i,2,lx-1} ]
48 kappa=Sqrt[2*(pot[[1]]-en)] di=x[[2]]-x[[1]]; di=x[[lx]]-x]]1]];
49 tmat=QTm[kappa,di]-tmat*Exp[I*k*di],Return[Det[tmat]]
50 ,Print["--> QBandStructure - Error : Listen haben falsche Laenge !"] ]
51 ,
52 Print["--> QBandStrucutre - Error : Option nicht implementiert"]]
53 ]