0% found this document useful (0 votes)
26 views2 pages

Quantum Energy Calculations in Python

The document contains Python code snippets demonstrating basic arithmetic operations (addition, multiplication, subtraction) and calculations related to quantum mechanics, specifically the energy of particles in infinite potential wells. It includes examples for calculating energy for different quantum states and for laser photons. Each code snippet is followed by its corresponding output.

Uploaded by

shreepranavg2014
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

Quantum Energy Calculations in Python

The document contains Python code snippets demonstrating basic arithmetic operations (addition, multiplication, subtraction) and calculations related to quantum mechanics, specifically the energy of particles in infinite potential wells. It includes examples for calculating energy for different quantum states and for laser photons. Each code snippet is followed by its corresponding output.

Uploaded by

shreepranavg2014
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

#sum of two numbers


a=6
b=7
c=a+b
print(c)
OUTPUT: 13
2. #multiplication of two numbers
a=6
b=7
c=a*b
print(c)
OUTPUT:42
3. #subtraction of two numbers
a=7
b=6
c=a-b
print(c)
OUTPUT:1
4. #Find the energy of the first quantum states of a particle in an infinite
potential well of width 2 nm
n=1
h=6.63e-34 #planck's constant in Js
m=9.1e-31 #mass of electron in KG
l=2e-9 #width of the well in m
E1=(n**2*h**2)/(8*m*l**2)
print(E1,"J")
OUTPUT: 1.5095089285714285e-20 J
5. #Estimate the energy of the third excited state for a particle in an infinite
well of width 1 A
n=4
h=6.63e-34 #planck's constant in Js
m=9.1e-31 #mass of electron in KG
l=1e-10 #width of the well in m
E1=(n**2*h**2)/(8*m*l**2)
print(E1,"J")
OUTPUT: 9.660857142857142e-17 J
6. #Estimate the energy of the particle in first two quantum states having a
width of 1 nm
n1=1
n2=2
h=6.63e-34 #planck's constant in Js
m=9.1e-31 #mass of electron in KG
l=1e-10 #width of the well in m
E1=(n1**2*h**2)/(8*m*l**2)
E2=(n2**2*h**2)/(8*m*l**2)
print(E1,"J")
print(E2,"J")
OUTPUT:
6.0380357142857135e-18 J
2.4152142857142854e-17 J
7. #Estimate the energy of the laser photons in He-Ne emitting a wavelength
of 632 nm
h=6.63e-34
c=3e8
l=632
e=(h*c)/l
print(e,"J")
OUTPUT: 3.147151898734177e-28 J

You might also like