Skip to content

A Python-based computational physics project that visualizes the 3D infinite potential well (quantum particle in a box). The code evaluates analytical eigenfunctions on a 3D grid, computes probability densities, verifies normalization numerically, with surface & contour visualizations for physical interpretation of quantum states and energy levels.

Notifications You must be signed in to change notification settings

VarunNair19/3D-Quantum-Well-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Quantum Well Simulator

A Python-based computational physics project that visualizes the quantum mechanical wavefunctions of a particle confined in a 3D infinite potential well (the “particle in a box” problem).

The program evaluates analytical eigenfunctions on a 3D spatial grid, computes the probability density, verifies normalization numerically, calculates the corresponding energy levels, and generates clear visualizations with colorbars for easy physical interpretation.

This project demonstrates how analytical quantum mechanics solutions can be explored and understood using numerical computation and scientific visualization.


Features

  • Analytical 3D infinite potential well wavefunction
  • Probability density calculation ( |\psi|^2 )
  • Numerical normalization check
    [ \int |\psi|^2 dV \approx 1 ]
  • Analytical energy level computation
  • 3D surface visualization of:
    • the wavefunction ( \psi )
    • the probability density ( |\psi|^2 )
  • 2D contour (top view) of probability density
  • Colorbars for quantitative interpretation of values

Physics Background

For a rectangular box of sizes (L_x, L_y, L_z), the stationary state solutions of the Schrödinger equation are

[ \psi_{n_x,n_y,n_z}(x,y,z) = \sqrt{\frac{2}{L_x}}\sin!\left(\frac{n_x \pi x}{L_x}\right) \sqrt{\frac{2}{L_y}}\sin!\left(\frac{n_y \pi y}{L_y}\right) \sqrt{\frac{2}{L_z}}\sin!\left(\frac{n_z \pi z}{L_z}\right) ]

where (n_x,n_y,n_z = 1,2,3,\dots)

The corresponding energy levels (in units where (\hbar^2/2m = 1)) are

[ E = \frac{\pi^2}{2}\left[ \left(\frac{n_x}{L_x}\right)^2 + \left(\frac{n_y}{L_y}\right)^2 + \left(\frac{n_z}{L_z}\right)^2 \right] ]

Nodes (zero-probability planes) appear whenever any quantum number is greater than 1.


Requirements

  • Python 3.x
  • numpy
  • matplotlib

Install dependencies with:

pip install -r requirements.txt

About

A Python-based computational physics project that visualizes the 3D infinite potential well (quantum particle in a box). The code evaluates analytical eigenfunctions on a 3D grid, computes probability densities, verifies normalization numerically, with surface & contour visualizations for physical interpretation of quantum states and energy levels.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages