# 4: Principles of quantum mechanics¶

## Example number 4.1, Page number 4.30¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
E=2000;     #energy(eV)

#Calculation
lamda=h/math.sqrt(2*m*E*e);     #wavelength(m)

#Result
print "wavelength is",round(lamda*10**9,4),"nm"

wavelength is 0.0275 nm


## Example number 4.2, Page number 4.30¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.626*10**-34;    #planck's constant
lamda=1.66*10**-10;    #wavelength(m)

#Calculation
v=h/(m*lamda);     #velocity(m/s)
E=h**2/(2*m*e*lamda**2);    #kinetic energy(eV)

#Result
print "velocity is",round(v/10**4,1),"*10**4 m/s"
print "answer varies due to rounding off errors"
print "kinetic energy is",round(E,2),"eV"

velocity is 438.6 *10**4 m/s
answer varies due to rounding off errors
kinetic energy is 54.71 eV


## Example number 4.3, Page number 4.31¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=1*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)
E2=4*E1;      #energy value in 1st state(eV)
E3=9*E1;      #energy value in 2nd state(eV)

#Result
print "energy value in ground state is",round(E1,4),"eV"
print "energy value in 1st state is",round(E2,2),"eV"
print "energy value in 2nd state is",round(E3,4),"eV"

energy value in ground state is 37.7377 eV
energy value in 1st state is 150.95 eV
energy value in 2nd state is 339.6395 eV


## Example number 4.4, Page number 4.31¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=4*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)

#Result
print "minimum energy is",round(E1,4),"eV"

minimum energy is 2.3586 eV


## Example number 4.5, Page number 4.32¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
V=15*10**3;    #voltage(V)

#Calculation
lamda=1.227/math.sqrt(V);     #wavelength(nm)

#Result
print "wavelength is",round(lamda,2),"nm"

wavelength is 0.01 nm


## Example number 4.6, Page number 4.32¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=0.05*10**-9;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)

#Result
print "minimum energy is",round(E1,2),"eV"

minimum energy is 150.95 eV


## Example number 4.8, Page number 4.32¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=3*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)

#Result
print "minimum energy is",round(E1,1),"eV"

minimum energy is 4.2 eV


## Example number 4.9, Page number 4.33¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
me=1.676*10**-27;    #mass(kg)
mn=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant

#Calculation
lamda_n=h/math.sqrt(4*mn*me);      #de broglie wavelength(m)

#Result
print "de broglie wavelength is",int(lamda_n*10**9),"nm"

de broglie wavelength is 8488 nm


## Example number 4.10, Page number 4.33¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=2*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)
E2=2**2*E1;      #energy value in 2nd quantum state(eV)
E4=4**2*E1;      #energy value in 2nd quantum state(eV)

#Result
print "energy value in 2nd quantum state is",round(E2,3),"eV"
print "energy value in 4th quantum state is",round(E4,2),"eV"
print "answer varies due to rounding off errors"

energy value in 2nd quantum state is 37.738 eV
energy value in 4th quantum state is 150.95 eV
answer varies due to rounding off errors


## Example number 4.11, Page number 4.34¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
e=1.6*10**-19;
m=9.1*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
V=344;          #potemtial(V)
n=1;
theta=60;     #angle(degrees)

#Calculation
d=n*h/(2*math.sin(theta)*math.sqrt(2*m*V*e));     #interplanar spacing(m)

#Result
print "interplanar spacing is",round(d*10**10,3),"angstrom"

interplanar spacing is 0.382 angstrom


## Example number 4.12, Page number 4.34¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.11*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=1*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)
E3=3**2*E1;      #energy value in 2nd quantum state(eV)
E=E3-E1;       #energy required to pump an electron(eV)

#Result
print "energy required to pump an electron is",round(E,2),"eV"
print "answer varies due to rounding off errors"

energy required to pump an electron is 301.57 eV
answer varies due to rounding off errors


## Example number 4.13, Page number 4.34¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;
e=1.6*10**-19;
m=9.11*10**-31;    #mass(kg)
h=6.63*10**-34;    #planck's constant
L=2*10**-10;       #width(m)

#Calculation
E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)

#Result
print "minimum energy is",round(E1,3),"eV"
print "answer varies due to rounding off errors"

minimum energy is 9.424 eV
answer varies due to rounding off errors


## Example number 4.14, Page number 4.35¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
V=1600;    #voltage(V)

#Calculation
lamda=1.227/math.sqrt(V);     #wavelength(nm)

#Result
print "wavelength is",round(lamda*10,2),"angstrom"

wavelength is 0.31 angstrom