No project description provided
Project description
atomSmltr - atomSimulator
A user-friendly python package to perform semi-classical atomic physics simulations.
Attention: this package is still under active development.
🚀 Installation notes
install latest stable release
🚨 Not implemented yet > when we go public 🚨
just pip it
pip install atomsmtlr
install current version
In our git development workflow, we have three main branches: main for stable relases, testing for development versions that should work most of the time and devel for the implementation of new, more experimental features. If you want to benefit from the latest features, we encourage you to use the testing branch.
First, clone the repository
git clone https://github.com/adareau/atomSmltr.git
cd atomSmltr
git checkout testing
We strongly encourage you to use a virtual environment
python3 -m venv __venv__
source ./__venv__/bin/activate
Then you can use pip
pip install .
That's it, you should be good to go !!
✨ Try atomsmtlr
Below is a minimal example. You should also check the examples in the provided documentations, that contains a collection of jupyter notebooks that will guide you into using atomsmtlr.
⏩ checkout ./docs/_notebook_examples
""" Minimal example for testing atomstmltr"""
import numpy as np
import matplotlib.pyplot as plt
from atomsmltr.environment import PlaneWaveLaserBeam
from atomsmltr.atoms import Ytterbium
from atomsmltr.simulation import Configuration, ScipyIVP_3D
# - setup atom
atom = Ytterbium()
main = atom.trans["main"] # get transition, to help setting up lasers
# - setup laser
laser_1 = PlaneWaveLaserBeam()
laser_1.direction = (0, 0, 1)
laser_1.set_power_from_I(main.Isat) # set power to reach Isat
laser_1.tag = "las1"
laser_2 = laser_1.copy() # create a copy
laser_2.direction = (0, 0, -1) # propagating in opposite direction
laser_2.tag = "las2"
# - config
config = Configuration()
config.atom = atom
config += laser_1, laser_2
config.add_atomlight_coupling("las1", "main", -0.5 * main.Gamma)
config.add_atomlight_coupling("las2", "main", -0.5 * main.Gamma)
# - simulation
sim = ScipyIVP_3D(config=config)
t = np.linspace(0, 0.1, 1000) # timesteps for integration
u0 = (0, 0, 0, 0, 0, 100) # atom starts with vz=100m/s
res = sim.integrate(u0, t)
# plot
fix, axes = plt.subplots(1, 2, figsize=(8, 3), tight_layout=True)
axes[0].plot(res.t * 1e3, res.y[2])
axes[0].set_ylabel("z (m)")
axes[1].plot(res.t * 1e3, res.y[5])
axes[1].set_ylabel("vz (m/s)")
for ax in axes:
ax.set_xlabel("t (ms)")
ax.grid()
plt.show()
🐍 How to contribute
atomsmltr is still under active development, and we would be more than happy to welcome contributions!
We encourage anyone willing to contribute to first have a look at the global architecture underlying atomsmtlr. Note that it is coded in a modular way.
The easiest way to contribute would then be to expand the collection of Environment objects (magnetic field profiles, laser beam types, etc.) or to add new types of integrators in simulation.simulator.
Contributions to the core structure of atomsmltr would also be welcome, but should be discussed with the main development team to ensure a good coordination of efforts.
In all cases, please make sure that you comply with our coding standards:
- comment your code: always include docstrings, add comments to tricky code parts, etc.
- add unit tests: whenever adding a new feature, please make sure that you write a corresponding unit test in the
testsfolder. - use black for code formatting.
- use poetry for dependency management.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomsmltr-0.1.0.tar.gz.
File metadata
- Download URL: atomsmltr-0.1.0.tar.gz
- Upload date:
- Size: 201.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eda702e52fad5e85672f44dcc972dfa0f336d25c05cbd96d08f7a7f08b25976b
|
|
| MD5 |
47ff92004ee34353a7cf7760f1192212
|
|
| BLAKE2b-256 |
c7c10f7888b822ac82891b69b262a0a761cd1b944515bed32c63f37c9b690939
|
File details
Details for the file atomsmltr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: atomsmltr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 266.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beb9684cc8b6ebc283869df5bfa9a087ca0d6f73b1ca6a5592bee9cea8ab305f
|
|
| MD5 |
c1b37f10070d4330b9670ef6f5f9e685
|
|
| BLAKE2b-256 |
f6cb1e0454eee5babd16276ff00e85ad40a0694cfcd58d2cad7e8c6ed030b528
|