QM Lab Animesh PDF
QM Lab Animesh PDF
QM Lab Animesh PDF
MECHANICS
LAB
SUBMITTED BY-
ANIMESH SAH
ROLL NO-6320
BSc(Hons)Physics V-sem
ANIMESH
//Aim1- A particle is represented by the wave function:-
PROGRAM-
clc
a=input("Enter the lower limit:- ")
b=input("Enter the upper limit:- ")
//calculating normalization constant A
hbar=1.05678971*(10^(-34))
A1=integrate('(4-x^2)*(4-x^2)','x',a,b)
A=1/(sqrt(A1))
mprintf("\n Normalization constant is :-")
disp(A)
//calculating expectation value of position x
x1=(integrate('(4-x^2)*x*(4-x^2)','x',a,b))*(A^2)
mprintf("\nExpectation value of position is :-")
disp(x1)
ANIMESH
//calculating expectation value of momentum squared P^2
p1=(integrate('(4-x^2)','x',a,b,[10^-4],[10^-4]))*(A^2)*2*(hbar^2)
mprintf("\nExpectation value of momentum squared is :-")
disp(p1)
OUTPUT-
Enter the lower limit:- -2
Enter the upper limit:- 2
Normalization constant is :-
0.1711633
Expectation value of position is :-
0.
ANIMESH
Expectation value of momentum is :-
0.
Expectation value of position squared is :-
0.5714286
Expectation value of momentum squared is :-
6.980D-69
Uncertainty in position is :-
0.7559289
Uncertainty in momentum is :-
8.355D-35
Product of uncertainty in momentum and uncertainty in position is :-
6.316D-35
The result is consistent with uncertainty principle
GRAPH-
ANIMESH
//Aim2- A particle is represented by a wave function at t=0
PROGRAM-
clc
A1=integrate('(x/2)*(x/2)','x',0,2)+integrate('(3-x)*(3-x)','x',2,3)
A=1/sqrt(A1)
mprintf("\n Normalization constant is :-")
disp(A)
x=[0:0.1:2]
//plotting the curve
y=A*x/2
plot(x,y)
x=[2:0.1:3]
y=A*(3-x)
plot(x,y)
ylabel("Wavefunction------->")
xlabel("Position----------->")
xtitle("The plot between position and wavefunction ")
xgrid(3,1,2)
ANIMESH
OUTPUT-
Normalization constant is :-
1.
GRAPH-
ANIMESH
//Aim3- Write a scilab code for the following :
Solve the s-wave Schrodinger equation for the ground state
and the first excited state of the hydrogen atom:
PROGRAM-
//constants
clc
clf
// Aim- SSOLVING SCHRODINGER EQUATION FOR S WAVE HYDROGEN ATOM
h=1973
m=.511*10^(6)
e=3.795
k=((h)^2)/(2*m)
//inputs
H=[]
xlow=input("Enter the lower value of position :- ")
xhigh=input("Enter the upper value of position :- ")
n=input("Enter the number of intervals :- ")
a=(xhigh-xlow)/(n)
mprintf(" \n\n CALCULATING ENERGY EIGEN VALUES AND FUNCTIONS \n\n ")
for i=1:n-1
for j=1:n-1
if i==j then
ANIMESH
H(i,j)=((2*k)/(a)^2)-((e^2)/(xlow+a*i))
elseif i==j+1 | j==i+1
H(i,j)=-k/(a^2)
else //if i>j+1 | j>i+1
H(i,j)=0
end
end
end
[ef,ev]=spec(H)
D=spec(H)
E1=D(1)
E2=D(2)
norm1=inttrap(L1)
mprintf("The normalisation of wave function X1 ∫(X1*X1)is %4.4f eV\n ",norm1)
norm2=inttrap(L2)
mprintf("The normalisation of wave function X2 ∫(X2*X2)is %4.4f eV\n ",norm2)
orth1=inttrap(O1)
mprintf("The ∫(X1*.X2) is %4.4f\n\n",orth1)
if abs(norm1-1)<0.02 & abs(norm2-1)<0.02 then
mprintf("The wave function is normalised\n")
else
mprintf("The wave function is not normalised\n")
end
if abs(orth1)<0.02 then
mprintf("The wave function is orhtogonal\n")
else
mprintf("The wave function is not orthogonal\n")
end
ANIMESH
mprintf("The expectation value of x^2 for ground state is %4.2f\n",exg1)
xrec=1./(x)
exg2=(inttrap(X1.*xrec.*X1))
exf2=(inttrap(X2.*xrec.*X2))
mprintf("The expectation value of 1/x for ground state is %4.2f\n",exg2)
ANIMESH
OUTPUT-
Enter the lower value of position :- 0
ANIMESH
GRAPH-
1.
2.
ANIMESH