Quantum Mechanics Computation
Quantum Mechanics Computation
Comment: This is the basic form of the time-independent Schrödinger equation, where ħ is
the reduced Planck's constant, m is the particle's mass, ψ(x) is the wave function, V(x) is the
potential energy, and E is the energy of the system.
Comment: The potential V(x) is zero inside the box (the particle is free to move) and infinite
outside the box (the particle cannot exist outside the box).
Comment: These conditions ensure that the wave function vanishes at the boundaries of the
box, which reflects the fact that the particle cannot be found at the walls of the box.
1
Comment: In this form, the potential v(s) is 0 for 0 ≤ s ≤ 1 and infinite elsewhere. This
rescaled equation is dimensionless and simplifies the problem for both analytical and
numerical solutions.
Comment: These equations describe the quantization of energy levels for the particle in the
box. The energy levels are discrete and increase with n², where n is a positive integer.
Conclusion
This completes the derivation of the dimensional Schrödinger equation for a particle in a
one-dimensional box. The key result is that the energy levels of the particle are quantized,
and the wave functions are sinusoidal within the box.
2
Fortran Program: Project 05
This document contains the Fortran code for the assignment submission. The comments are
color-coded in green for better readability.
f1 = phi2
end function f1
end function f2
real(10) :: s
potential = 0.0
3
!Variable are used:: re=reduce_energy; rv=reduce_potential; phi2=d(phi)/ds; h=distance
between grid points; n=number of total grid points ;!k1, l1, k2, l2, k3, l3, k4, l4 all are
constant.
integer :: n, i, write_
real(10) :: norm_constant
do i = 1, n
rv = potential(s)
4
if (write_ == 1) write(1, *) phi, s
s=i*h
end do
write(4, *);write(4, *)
end subroutine rk
!Bisection method...
!Variable are used:: a,b are initial range used to find final value of energy(c) ; fa,fb,fc are the
value of phi(s) for corresponding energy valu a,b and c; error= a constant ,it's used for to
stop bisection after a certain error which we expect to be;
subroutine bisection(a, b, c)
real(10) :: s, phi2, rv
integer :: write_=4
5
call rk(s, fa, phi2, a, rv, write_)
c = (a + b) / 2
b=c
else
a=c
end if
else
stop !;goto 8
end if
error = abs(fc)
goto 7
end if
6
!screening method:: To findinig range of energy for nth order excited state.
![a1:b1] are energy range and fa1,fb1 is the value of phi for corresponding energy
a1,b1;rv=reduce_potential; phi2=d(phi)/ds
subroutine screening()
a1 = 1.0 ;energy_state = 0
b1 = a1 + 4.0
energy_state = energy_state + 1
end if
a1 = b1
end do
7
subroutine norm(norm_constant)
integer :: i
open(1, file="eigen_function.dat")
open(2, file="norm_eigen_function.dat")
do i = 1, 10000
read(1, *) phi_s(i)
end do
do i = 1, 4999
if(i==4999) sum=sum+(h/2)*((phi_s(1+2*i)**2+phi_s(1+(2*i+1))**2))
end do
8
norm_constant=sqrt(norm_constant)
do i = 1, 10000
end do
program sasdg1
real(10) :: a, b, c, norm_constant
integer :: write_
open(1, file="eigen_function.dat")
open(2, file="norm_eigen_function.dat")
open(4, file="guess_functon.dat")
call screening()
9
read*, a, b
call bisection(a, b, c)
print*, "reduce_energy=", c
write_ = 1
close(1)
call norm(norm_constant)
close(2)
10
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.
11
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.
12
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.
13
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.
14
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.
15
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.
16