Skip to content

Python-based visualization of the Quantum Harmonic Oscillator. Explore wavefunctions, probability densities, and quantized energy levels in quantum mechanics. Includes customizable parameters and insightful plots for educational and research purposes.

Notifications You must be signed in to change notification settings

LINSANITY03/Quantum-Harmonic-Oscillation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Harmonic Oscillator

This repository provides a Python-based visualization of the quantum harmonic oscillator (QHO). The QHO is a fundamental system in quantum mechanics, describing particles bound in a parabolic potential well. This project models wavefunctions, and probability densities for the QHO using Hermite polynomials.

Table of Contents

  1. Introduction
  2. Mathematical Framework
  3. Code Features
  4. Setup Instructions
  5. Results and Visualizations
  6. Conclusion

Introduction

The quantum harmonic oscillator is a cornerstone in quantum mechanics, describing systems ranging from molecular vibrations to quantum fields. This project focuses on:

  • Visualizing the first few wavefunctions and their probability densities.
  • Computing and displaying energy levels.

Key components include:

  • Hermite polynomials for wavefunctions.
  • Normalization factors for physical accuracy.
  • Adjustable parameters (quantum state).

Mathematical Framework

WaveFunction

The wavefunctions of the QHO are expressed as: $\psi_n(X)=\frac{1}{\sqrt{2^nn!}\pi^\frac{1}{4}}H_n(X)e^\frac{-X^2}{2}$ where $H_n(X)$ is the Hermite Potential of order (n), and X is Dimensionless position variable.

Energy level

The energy of the nth quantum state is: $E_n=(n+\frac{1}{2})\hbar\omega$ where $\hbar$ is Reduced Planck's constant, and $\omega$ is the Angular frequency.

Probability Densities

The probability density is given by: $|\psi^2|$ where $\psi$ is the wavefunction.

Code Features

Implemented Functions

  1. Wavefunction Generation:

    • Computes $\psi_n(X)$ for given n and X.
  2. Probability Density:

    • Calculates $P(x)=\psi^*(x)\psi(x)$.
  3. Energy levels:

    • Computes $E_n$ for given value of n.

Adjustable Parameters

  • Dimensionless position (X): Position of the particle
  • Quantum state (n): Energy level for the given nth position.

Setup Instructions

To run this project on your local machine, ensure that you have the necessary dependencies installed. The following steps outline how to set up the project:

  1. Clone this repository:
git clone https://github.com/LINSANITY03/Quantum-Harmonic-Oscillation
  1. Create a virtual environment:
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Usage After installing the dependencies, go to notebooks folder:
cd notebooks

then, open the main.ipynb file.

The script will generate visualizations of the wavefunction for various quantum states, including energy levels and probability distributions.

You can modify the parameters in the script from config.yml to observe how the wavefunction changes with different particle energies level.

Results and Visualizations

Plot of the wavefunctions and probability density for the first four quantum states.

Algorithm_game

Algorithm_game

Conclusion

This project offers a detailed exploration of the quantum harmonic oscillator, a foundational concept in quantum mechanics. The following key insights were gained:

  1. Wavefunctions and Probability Densities:

    • Wavefunctions exhibit characteristic shapes defined by Hermite polynomials.
    • Probability densities highlight regions of high likelihood for particle localization, with increasing nodes as quantum number increases.
  2. Energy Levels:

    • The energy levels are evenly spaced, a hallmark of the harmonic oscillator potential.
    • The spacing between energy levels is directly proportional to the angular frequency (omega).

This visualization provides a robust foundation for understanding quantum oscillatory systems. It bridges theoretical concepts with computational insights, paving the way for future projects such as time evolution studies or comparisons with classical harmonic oscillators.

Collaboration

Feel free to use this codebase for your projects. If you want to talk more about this project or have found bugs, create a pull request or contact me on pujantamang92@gmail.com.

About

Python-based visualization of the Quantum Harmonic Oscillator. Explore wavefunctions, probability densities, and quantized energy levels in quantum mechanics. Includes customizable parameters and insightful plots for educational and research purposes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published