Superposition is an advanced Python-based tool designed to simulate and visualize quantum systems. This software allows users to solve the Schrödinger equation in one, two, or three dimensions with customizable potentials, adaptive mesh grids, parallel computing capabilities, and advanced visualization features. It is intended for researchers, educators, and students who wish to explore quantum mechanics numerically.
- Dimensional Flexibility: Solve quantum systems in 1D, 2D, or 3D.
- Custom Potentials: Define your own potential functions using mathematical expressions.
- Adaptive Mesh Grids: Utilize adaptive grids for improved accuracy in regions of interest.
- Parallel Computing: Accelerate computations using multiprocessing or MPI.
- Graphical User Interface (GUI): Intuitive GUI built with PyQt5 for easy interaction.
- Advanced Visualization: 2D and 3D plotting, animations of time-dependent simulations.
- Integration with Quantum Libraries: Leverages the QuTiP library for efficient quantum computations.
- Modular Design: Organized codebase for maintainability and extensibility.
The project is organized into several modules, each responsible for different functionalities:
main.py
: Entry point of the application.quantum_solver.py
: Handles numerical solutions of the Schrödinger equation.potential.py
: Manages user-defined potentials.mesh.py
: Implements spatial grids, including adaptive meshes.parallel_compute.py
: Facilitates parallel computations.visualization.py
: Provides tools for plotting and animating results.gui.py
: Contains the graphical user interface components.config.py
: Stores global configurations and constants.utils.py
: Utility functions for validation and other supportive tasks.
- Python 3.7 or higher
- NumPy
- SciPy
- Matplotlib
- QuTiP
- PyQt5
- mpi4py (for parallel computing with MPI)
- mayavi or Plotly (for enhanced 3D visualization)
-
Clone the Repository
git clone https://github.com/yourusername/quantum-mechanics-modeling-software.git cd quantum-mechanics-modeling-software
-
Create a Virtual Environment (Recommended)
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies
pip install -r requirements.txt
If
requirements.txt
is not provided, install dependencies manually:pip install numpy scipy matplotlib qutip pyqt5
-
Run the Application
python main.py
- Run
main.py
to launch the GUI. - Define the Potential: Enter a mathematical expression for the potential (e.g.,
0.5 * MASS * OMEGA**2 * (x**2 + y**2 + z**2)
for a 3D harmonic oscillator). - Set Mesh Parameters: Define spatial ranges and grid points.
- Configure Simulation Parameters: Set the number of energy states to compute and enable/disable parallel computing.
- Run the Simulation: Click the "Solve" button to start the computation. Results will be visualized upon completion.
- Coming Soon: CLI support for running simulations and batch processing.
-
Main Application (
main.py
)
Initializes the GUI and starts the application loop. -
Quantum Solver Module (
quantum_solver.py
)
Constructs the Hamiltonian and solves the Schrödinger equation. Supports time evolution for time-dependent potentials. -
Potential Module (
potential.py
)
Allows users to input custom potential functions. Can be extended to predefined potentials for common systems. -
Mesh Module (
mesh.py
)
Generates 1D, 2D, or 3D spatial grids. Includes adaptive mesh grids for efficient computations. -
Parallel Computing Module (
parallel_compute.py
)
Facilitates parallel computing using multiprocessing or MPI for large-scale simulations. -
Visualization Module (
visualization.py
)
Provides 2D/3D plotting and animation tools for visualizing results. -
GUI Module (
gui.py
)
Built with PyQt5 for an intuitive user experience. Manages user input and simulation settings. -
Utilities and Configurations
config.py
: Stores physical constants and simulation parameters.utils.py
: Provides utility functions for validation and mesh generation.