Skip to content

Commit

Permalink
add nuclear basis tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
liwt31 committed Dec 4, 2024
1 parent 2988280 commit b882466
Show file tree
Hide file tree
Showing 5 changed files with 341 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
pip install nbconvert
pip install nbconvert matplotlib
pip install --upgrade pip ipython ipykernel
ipython kernel install --name "python3" --user
sudo apt-get install pandoc
sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super
- name: Build the document
run: |
Expand Down
1 change: 1 addition & 0 deletions doc/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ please refer to the :doc:`applications`.
.. toctree::
tutorials/define_model.ipynb
tutorials/mps_mpo.ipynb
tutorials/nuclear_basis.ipynb
tutorials/quantum_number.ipynb
tutorials/compress_mps.ipynb
tutorials/ttn_basic.ipynb
Expand Down
56 changes: 56 additions & 0 deletions doc/source/tutorials/mm.mplstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Matplotlib style for scientific plotting
# This is the base style for "SciencePlots"
# see: https://github.com/garrettj403/SciencePlots

# Set color cycle: blue, green, yellow, red, violet, gray
axes.prop_cycle : cycler('color', ['0C5DA5', '00B945', 'FF9500', 'FF2C00', '845B97', '474747', '9e9e9e'])

# Set default figure size
figure.figsize : 4, 3

# Set x axis
xtick.direction : in
xtick.major.size : 3
xtick.major.width : 0.5
xtick.minor.size : 1.5
xtick.minor.width : 0.5
xtick.minor.visible : True
xtick.top : True
xtick.labelsize : large

# Set y axis
ytick.direction : in
ytick.major.size : 3
ytick.major.width : 0.5
ytick.minor.size : 1.5
ytick.minor.width : 0.5
ytick.minor.visible : True
ytick.right : True
ytick.labelsize : large

# Axes
axes.labelsize : "x-large"

# Set line widths
axes.linewidth : 0.5
grid.linewidth : 0.5
lines.linewidth : 1.5

# Remove legend frame
legend.frameon : False
legend.fontsize : large

# Always save as 'tight'
savefig.bbox : tight
savefig.pad_inches : 0.05

# Use serif fonts
# font.serif : Times
font.family : serif
mathtext.fontset : dejavuserif

# Use LaTeX for math formatting
# Run this first: apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super
# See https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-latex
text.usetex : True
text.latex.preamble : \usepackage{amsmath} \usepackage{amssymb}
279 changes: 279 additions & 0 deletions doc/source/tutorials/nuclear_basis.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions renormalizer/utils/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import math
import logging

from sympy.printing.numpy import const

from renormalizer.utils import constant

logger = logging.getLogger(__name__)
Expand All @@ -19,6 +21,7 @@
"K": constant.au2K,
"a.u.": 1,
"au": 1,
"fs": constant.au2fs,
}

au_ratio_dict.update({k.lower(): v for k, v in au_ratio_dict.items()})
Expand Down

0 comments on commit b882466

Please sign in to comment.