Quantum mechanics simulation library
Project description
QM_sim
Python library for simulation of quantum mechanical systems.
Features
- 1D and 2D systems
- Choice of finite difference scheme
- Stationary solutions
Planned features
- 3D systems
- Temporal simulation
- Time-variant potentials
- Example plots
Installation
pip install qm-sim
Usage
No potential
from qm_sim.hamiltonian import Hamiltonian
from qm_sim.nature_constants import me
N = (1000,) # Discretisation point count
L = (1e-9,) # System size
H = Hamiltonian(N, L, me) # Use electron mass
energies, states = H.eigen(5)
energies
is now a 5x1 array of eigenenergies, and states
is a 5x1000 array of the corresponding eigenstates
Quadratic potential
from qm_sim.hamiltonian import Hamiltonian
from qm_sim.nature_constants import me, e0
import numpy as np
N = (1000,) # Discretisation point count
L = (2e-9,) # System size
H = Hamiltonian(N, L, me) # Use electron mass
V = np.linspace(-L[0]/2, L[0]/2, N[0])**2 * e0
H.set_static_potential(V)
energies, states = H.eigen(5)
energies
is now a 5x1 array of eigenenergies, and states
is a 5x1000 array of the corresponding eigenstates
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qm_sim-0.0.1.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file qm_sim-0.0.1.tar.gz
.
File metadata
- Download URL: qm_sim-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecbd1ec63d431ecefd55059e7772e75309ee436d4186e9c48d10917c17aa1443 |
|
MD5 | 43034a0db4832532de8f2394c5f752ad |
|
BLAKE2b-256 | 0c39952c5bd47d321794b1f82931bad8246c176bb0ab4abc909e21ef8a6aec44 |
File details
Details for the file qm_sim-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: qm_sim-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f29f51b730beccbb0cde247b9bb031e139359ee404b0cb33ce74e318c92df92f |
|
MD5 | b64b59c79a99162be8c5a901f3a74d63 |
|
BLAKE2b-256 | ea831848eb3b466aba55ac3e44ee2cae243538b036b38e6717869e58c2c00820 |