Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

PERTURBATION THEORY IN 1D BOX

Name UID Roll.No.


James Vincent 212646 262
Ben Joe Kuriakose 212617 260

Name of the course : 28th August


Month and year of submission : SPHY05PR

1
INDEX
Sl. No. Contents Page No.

1 INTRODUCTION 3

2 AIM 3

3 APPARATUS 3

4 THEORY 3-4

5 ALGORITHM 4-5

6 CODE 5-7

7 RESULTS 8

8 CONCLUTION 8

2
INTRODUCTION
PerturbaBon theory within a 1-dimensional box deals with examining the impact of a
slight perturbing potenBal on the energy states and wave paSerns of a parBcle restricted to
the box. The perturbaBon is considered minor enough to be treated as a small adjustment to
the iniBal setup. This technique is commonly employed to esBmate alteraBons in quantum
systems and can offer understanding into how perturbaBons influence parBcle behavior inside
the box.

AIM
To find probability amplitude, probability densiBes, zeroth-order eigenfuncBon of POB
and zeroth-order probability density of POB.

APPARATUS
Computer, Jupyter Notebook, Spyder

THEORY
In quantum mechanics, the perturbaBon theory is used to find an approximate soluBon
for a quantum system that can be divided into an unperturbed part (which is relaBvely easy
to solve) and a perturbaBon (a smaller component that "perturbs" the system). The goal is to
find an approximaBon to the energy and wavefuncBon of the perturbed state by considering
how the perturbaBon affects the unperturbed state.

The general idea of perturbaBon theory involves expanding the Hamiltonian of the system
into a series of terms, usually in powers of a small parameter. The Hamiltonian of the full
system can be wriSen as:

H = H₀ + λV

Where :

• H is the full Hamiltonian.


• H₀ represents the unperturbed Hamiltonian, which describes a system that is easier to
solve.
• “λ” is a small parameter that quanBfies the strength of a perturbaBon.
• V represents the perturbaBon operator.

The energy correcBon to the nth order of perturbaBon theory is given by:

Eₙ = ⟨ψ⁰ₙ|V|ψ⁰ₙ⟩

3
Where:
• Eₙ is the nth order energy correcBon.
• |ψ⁰ₙ⟩ is the nth order unperturbed wavefuncBon.

The total energy of the perturbed state up to nth order is then the sum of the unperturbed
energy and the energy correcBons:

E_total = E⁰ + E₁ + E₂ + ... + Eₙ

Similarly, the nth order corrected wavefuncBon can be found using the perturbaBon
operator V and the unperturbed wavefuncBon:

|ψ_totalⁿ⟩ = |ψ⁰ⁿ⟩ + ∑(|ψⁱ⟩ * ⟨ψⁱ|V|ψ⁰ⁿ⟩ / (E⁰ - Eⁱ))

Where:

• |ψ_totalⁿ⟩ is the nth order corrected wavefuncBon.


• |ψ⁰ⁿ⟩ is the nth order unperturbed wavefuncBon.
• |ψⁱ⟩ represents the ith order unperturbed wavefuncBon.
• Eⁱ is the energy of the ith order unperturbed state.

ALGORITHM
1. ImporBng Libraries:
• NumPy: A library for numerical computaBons in Python.
• Matplotlib: A plovng library for creaBng visualizaBons

2. Constants and Parameters:


• hbar, m, and L: Constants represenBng the reduced Planck constant, mass of
the parBcle, and the length of the box, respecBvely.
• x: An array of posiBons within the box.

3. WavefuncBon and Eigenvalue FuncBons:


• psi0(n): Calculates the nth eigenfuncBon (wavefuncBon) of a parBcle in a box.
• E0(n): Calculates the nth eigenvalue (energy) of a parBcle in a box.

4. TesBng Inline FuncBons:


• Plots the nth and (n+1)th eigenfuncBons.
• Plots the squared probability density of the nth eigenfuncBon.
• Prints the energy eigenvalue and checks normalizaBon of the nth
eigenfuncBon.

5. PerturbaBon PotenBal:
• pert2(V0): Defines a perturbaBon potenBal that is proporBonal to x^2,
controlled by the parameter V0.

4
6. CalculaBng Energy CorrecBon:
• Chooses an nth zero-order wavefuncBon.
• Calculates the perturbaBon potenBal V(x) using pert2.
• Computes the 1st order energy correcBon.
• Prints the old energy, correcBon, and new energy.

7. CalculaBng Corrected WavefuncBon:


• Generates a list of zeroth-order wavefuncBons (from n=1 to n=kmax-1).
• IniBalizes a list cklist to store coefficients.
• Calculates the 1st-order coefficient for each zeroth-order eigenfuncBon and
updates the perturbed wavefuncBon.
• Prints the coefficient squared for each term.

8. NormalizaBon and Plovng:


• Normalizes the perturbed wavefuncBon.
• Plots the original and perturbed wavefuncBons side by side.
• Plots the original and perturbed probability densiBes side by side

CODE
import numpy as np
from numpy import linspace, sqrt, pi, sin, trapz, zeros, size
import matplotlib.pyplot as plt
from matplotlib.pyplot import plot, Btle, show, xlabel, ylabel, legend
hbar=1
m=1
L = 1.0
x = linspace(0,L,101)

# This inline funcBon returns the nth eigenfuncBon of a parBcle-in-a-box


def psi0(n):
A = sqrt(2/L)
kn = n*pi/L
psi = A*sin(kn*x)
return psi

# This inline funcBon returns the nth eigenvalue of a parBcle-in-a-box


def E0(n):

5
kn = n*pi/L
E = (hbar*kn)**2/(2*m)
return E

# TesBng the inline funcBons


n=1
plot(x,psi0(n+1))
Btle('zeroth-order eigenfuncBon of POB')
show()
plot(x,psi0(n)**2)
Btle('zeroth-order probability density of POB')
show()
print ("E = ", E0(n))
print ("NormalizaBon = ", trapz(psi0(n)**2,x))

# This inline funcBon defines a pertubraBon running from 0 to V0, proporBonal to x^2
def pert2(V0):
V = x**2*V0
return V

# Graph it to see what it looks like


#V = pert2(2)
#plot(x,V)
#ylabel('V(x) (au)')
#xlabel('x')
#Btle('PerturbaBon potenBal')

# Choose a zero-order wavefuncBon


n=5

# Calculate a perturbaBon potenBal, V(x)


V = pert2(0.1)

# Get the 1st order energy correcBon, <psi|V|psi>


E1n = trapz(psi0(n)**2*V,x)
print ("Old energy, correcBon, and new energy:", E0(n), E1n, E0(n)+E1n)

# Generate a list of zeroth-order wavefuncBons to sum over


kmax = 8
nlist = range(1,kmax)
cklist = zeros(size(nlist))
print (nlist)

# Loop to get a 1st-order corrected wavefuncBon (this is not normalized)


psi_perturbed = psi0(n) # Start off with the zeroth order wavefuncBon, with coefficient = 1
ik = 0
for k in nlist:

6
if k==n:
pass
else:
ck = trapz(psi0(n)*V*psi0(k))/(E0(n)-E0(k)) # Calculate the coefficient for the kth 0-order
eigenfuncBon
cklist[ik] = ck
psi_perturbed += ck*psi0(k) # Add that contribuBon to the corrected eigenfuncBon,
with appropriate coefficient
print (k, ck**2) # Print some results
ik += 1

print ("cklist =", cklist)

# Normalize
norm1 = trapz(psi_perturbed**2,x) # Get <psi|psi> for the corrected eigenfuncBon
psi_perturbed = psi_perturbed/norm1**.5 # Normalize this |psi>
norm2 = trapz(psi_perturbed**2,x) # Just checking that the new <psi|psi> equals 1
print ("Old, new normalizaBon:", norm1, norm2)

# Graph the zero-order and corrected eigenfuncBons side-by-side


plot(x,psi0(n))
plot(x,psi_perturbed)
Btle("probability amplitudes")
legend(['Old','New'])

show()

# Also the probabiliBes


plot(x,psi0(n)**2)
plot(x,psi_perturbed**2)
Btle("Probability densiBes")
legend(['Old','New'])
show()

7
RESULTS

CONCLUTION
The presented code exemplifies the pracBcal implementaBon of perturbaBon theory in
quantum mechanics. It showcases how even small perturbaBons can lead to significant
changes in energy eigenvalues and wavefuncBons. Through a step-by-step approach, the
code computes energy correcBons, coefficients, and perturbed wavefuncBons. The results
are visualized using plots, highlighBng the differences between original and perturbed
states.

You might also like