Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • calvindijksman98/lectures
  • solidstate/lectures
  • basnijholt/lectures
  • Hugo/lectures
  • mflor/lectures
  • lucasdekam/lectures
  • physicszerozero/lectures
  • lexhuismans/lectures
  • Gijs0172/lectures
  • YellowCherry/lectures
  • Pjieter/lectures
  • isidoraarayad/lectures
  • MarkusLid/lectures
  • alienfromabove99/lectures
  • Physics00/lectures
  • fenna.timsi/lectures
  • fr.looman/lectures
  • sjoerdakk/lectures
  • tobias.clausen1/lectures
  • NiekGoudswaard/lectures
  • weel.thies/lectures
  • tbvanderwoude/lectures
22 results
Show changes
Commits on Source (20)
Showing with 10216 additions and 138 deletions
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
......@@ -4,4 +4,6 @@ site
*.pyc
__pycache__
*.swp
.cache
\ No newline at end of file
.cache# pixi environments
.pixi
*.egg-info
image: gitlab.kwant-project.org:5005/qt/research-docker
variables:
FF_USE_FASTZIP: "true"
CACHE_COMPRESSION_LEVEL: "fastest"
build lectures:
before_script:
- pip install -Ur requirements.txt
image: ghcr.io/prefix-dev/pixi:0.28.0
cache:
key: "$CI_JOB_NAME"
paths:
- .pixi
script:
- PYDEVD_DISABLE_FILE_VALIDATION=1 mkdocs build
- pixi run build
artifacts:
paths:
- site
......@@ -12,6 +17,7 @@ build lectures:
needs: []
.prepare_deploy: &prepare_deploy
image: eeacms/rsync
only:
- branches@solidstate/lectures
before_script:
......@@ -31,10 +37,10 @@ build lectures:
## Create the SSH directory and give it the right permissions
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan tnw-tn1.tudelft.net >> ~/.ssh/known_hosts
- ssh-keyscan qt4.tudelft.net >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- "rsync -rv site/* solidstate@tnw-tn1.tudelft.net:$DEPLOY_PATH"
- "rsync -rv site/* uploader@qt4.tudelft.net:$DEPLOY_PATH"
needs:
- build lectures
......@@ -68,12 +74,13 @@ undeploy test version:
DEPLOY_PATH: "test_builds/$CI_COMMIT_REF_NAME"
script:
- mkdir empty/
- "rsync -rlv --delete empty/ solidstate@tnw-tn1.tudelft.net:$DEPLOY_PATH"
- "rsync -rlv --delete empty/ uploader@qt4.tudelft.net:$DEPLOY_PATH"
environment:
name: $CI_COMMIT_REF_NAME
action: stop
merge into local:
image: bitnami/git
only:
- master@solidstate/lectures
script:
......
......@@ -76,9 +76,10 @@ The volume of the 1st Brillouin zone is the same as the volume of any other prim
## Exercise 3: X-ray scattering in 2D
```python
b_y, b_x = 18.4, 13.4
def reciprocal_lattice(N = 7, lim = 40):
y = np.repeat(np.linspace(-18.4*(N//2),18.4*(N//2),N),N)
x = np.tile(np.linspace(-13.4*(N//2),13.4*(N//2),N),N)
y = np.repeat(np.linspace(-b_y*(N//2),b_y*(N//2),N),N)
x = np.tile(np.linspace(-b_x*(N//2),b_x*(N//2),N),N)
plt.figure(figsize=(5,5))
......@@ -100,18 +101,20 @@ reciprocal_lattice()
```python
reciprocal_lattice()
# G vector
plt.arrow(0,0,13.4*2,18.4,color='r',zorder=10,head_width=2,length_includes_head=True)
plt.arrow(
b_x*2, b_y, -b_x*2, -b_y, color='r', zorder=10, head_width=2,length_includes_head=True,
)
plt.annotate('$\mathbf{G}$',(17,6.5),fontsize=14,ha='center',color='r')
# k vector
plt.arrow(-6,37.4,6,-37.4,color='b',zorder=11,head_width=2,length_includes_head=True)
plt.annotate('$\mathbf{k}$',(-8,18),fontsize=14, ha='center',color='b')
# k' vector
plt.arrow(-6,37.4,6+13.4*2,-37.4+18.4,color='k',zorder=11,head_width=2,length_includes_head=True)
plt.arrow(-6,37.4,6+b_x*2,-37.4+b_y,color='k',zorder=11,head_width=2,length_includes_head=True)
plt.annotate('$\mathbf{k\'}$',(15,30),fontsize=14, ha='center',color='k');
```
4.
Since there is only 1 atom in the basis, there are no missing peaks due to a structure factor. We will get diffraction peaks at angles given by Bragg's law $\sin2\theta = \lambda/d_{hkl} = \lambda |\mathbf{G_{hkl}}|/2\pi$. We see that the shortest reciprocal lattice vector gives the smallest angle. Therefore, as a function of increasing $\theta$, we will see peaks at $(hkl)= (100) \quad (010) \quad (110) \quad (200), (020)$, where we took into account that $|\mathbf{b_1}|<|\mathbf{b_2}|$.
Since there is only 1 atom in the basis, there are no missing peaks due to a structure factor. We will get diffraction peaks at angles given by Bragg's law $\sin2\theta = \lambda/d_{hkl} = \lambda |\mathbf{G_{hkl}}|/2\pi$. We see that the shortest reciprocal lattice vector gives the smallest angle. Therefore, as a function of increasing $\theta$, we will see peaks at $(hkl)= (10) \quad (01) \quad (11) \quad (20) \quad (21) \quad (02)$, where we took into account that $|\mathbf{b_1}|<|\mathbf{b_2}|$.
## Exercise 4: Analyzing a 3D power diffraction spectrum
......
......@@ -100,7 +100,7 @@ dispersions(5)
First the kinetic term,
\begin{equation*}
\left\langle\phi_m|\hat{K}|\phi_n\right\rangle=C_m\frac{\hbar^2k_m^2}{2m}
\left\langle\phi_m|\hat{K}|\psi\right\rangle=C_m\frac{\hbar^2k_m^2}{2m}
\end{equation*}
And the potential term,
......
......@@ -86,12 +86,15 @@ Four in total: $(\pm\pi/a,\pm\pi/a)$.
### Question 3.
Define a basis, e.g.
\begin{align*}
\left|0\right\rangle &= (\pi/a,\pi/a) \\
\left|1\right\rangle &= (\pi/a,-\pi/a) \\
\left|2\right\rangle &= (-\pi/a,-\pi/a) \\
\left|3\right\rangle &= (-\pi/a,\pi/a)
\end{align*}
\begin{equation*}
\begin{align*}
\left|0\right\rangle &= (\pi/a,\pi/a) \\
\left|1\right\rangle &= (\pi/a,-\pi/a) \\
\left|2\right\rangle &= (-\pi/a,-\pi/a) \\
\left|3\right\rangle &= (-\pi/a,\pi/a)
\end{align*}
\end{equation*}
The Hamiltonian becomes
$$
......
......@@ -264,7 +264,7 @@ Therefore, the fourth step assumes that the Fermi level is far from both bands $
As a result, the Fermi-Dirac distribution is approximately similar to Boltzmann distribution:
$$
f(E)_{e/h} \approx \exp\left[-(E_{e/h}\pm E_F)/k_BT\right].
f(E)_{e/h} \approx \exp\left[(-E_{e/h}\pm E_F)/k_BT\right].
$$
Now we can move to the last step and calculate $n_e$ and $n_h$:
......
......@@ -108,7 +108,7 @@ n_h \approx \int_{-E_v}^\infty\frac{m_h}{\pi\hbar^2}e^{-(E_h+E_F)/k_BT}dE_h = N_
$$
$$
n_e \approx \int_{E_c}^\infty\frac{m_e}{\pi\hbar^2}e^{-(E-E_F)/k_BT}dE = N_C e^{-(E_c+E_F)/k_BT}
n_e \approx \int_{E_c}^\infty\frac{m_e}{\pi\hbar^2}e^{-(E-E_F)/k_BT}dE = N_C e^{-(E_c-E_F)/k_BT}
$$
where
......@@ -201,7 +201,7 @@ v_{vb,h} = -\frac{2at_{vb}}{\hbar}\sin (ka)
$$
$$
m_{vb,h} = -\frac{\hbar^2}{2a^2t_{vb}\cos (ka)}.
m_{vb,h} = \frac{\hbar^2}{2a^2t_{vb}\cos (ka)}.
$$
#### Question 2.
......
......@@ -107,7 +107,7 @@ This a "particle in a box" problem.
\begin{align*}
-\frac{\hbar^2}{2m_e^{\ast}} \nabla^2 \Psi_e &= (E_e-E_c)\Psi_e\\
-\frac{\hbar^2}{2m_h^{\ast}} \nabla^2 \Psi_h &= (-E_h-E_v)\Psi_h
-\frac{\hbar^2}{2m_h^{\ast}} \nabla^2 \Psi_h &= (E_h+E_v)\Psi_h
\end{align*}
Here and below $E_h$ is the energy of a hole in the valence band.
......@@ -116,7 +116,7 @@ Here and below $E_h$ is the energy of a hole in the valence band.
\begin{align*}
E_e = E_c + \frac{\hbar^2}{2m_e^{\ast}} ((\frac{\pi n}{L})^2+k_x^2+k_y^2),\\
-E_h = E_v - \frac{\hbar^2}{2m_h^{\ast}} ((\frac{\pi n}{L})^2+k_x^2+k_y^2)
E_h = -E_v + \frac{\hbar^2}{2m_h^{\ast}} ((\frac{\pi n}{L})^2+k_x^2+k_y^2)
\end{align*}
### Question 4.
......@@ -131,7 +131,7 @@ g_h = \frac{m_h^{\ast}}{\pi\hbar^2}
$L$ can be found here using previous questions, by setting:
$$
E_e - E_h - E_c + E_v = 1 eV = \frac{\hbar^2}{2}(\frac{\pi n}{L}^2+k_x^2+k_y^2)
E_e + E_h - E_c + E_v = 1 eV = \frac{\hbar^2}{2}(\frac{\pi n}{L}^2+k_x^2+k_y^2)
(\frac{1}{m_e^{\ast}}+\frac{1}{m_h^{\ast}})
$$
......
......@@ -21,7 +21,6 @@ from scipy.optimize import curve_fit
from scipy.integrate import quad
import plotly.offline as py
import plotly.graph_objs as go
from ipywidgets import interact, FloatSlider, Layout
from common import draw_classic_axes, configure_plotting
......
......@@ -2,7 +2,7 @@
from matplotlib import pyplot
from matplotlib.patches import Circle
import numpy as np
from scipy.integrate import simps
from scipy.integrate import simpson
from common import draw_classic_axes, configure_plotting
import plotly.graph_objs as go
......@@ -165,8 +165,8 @@ def line(E_t):
return [left, right]
def avg_pos_cubic(E_t):
Z = simps(np.exp(- U_cubic / E_t), r)
r_avg = simps(r * np.exp(- U_cubic / E_t), r)
Z = simpson(np.exp(- U_cubic / E_t), x=r)
r_avg = simpson(r * np.exp(- U_cubic / E_t), x=r)
x = r_avg / Z
return x
......
......@@ -379,7 +379,7 @@ The process of calculating the DOS at a given energy $E$ of a spin-independent H
2. Compute $\rvert dk / dE \rvert$. Do this either by writing $k$ as a (multi-valued) function of $E$ and differentiating, or by computing $(dE / dk)^{-1}$.
3. Sum or integrate $dk / dE$ over the allowed values of $k$ found in 1 and multiply by any degeneracies (spin/polarization).
If the Hamiltonian depends on spin, then there is no spin degeneracy and the spin number $s$ must be treated in the same way as $k$.
If the Hamiltonian depends on spin or polarization, then there are more branches of the dispersion relation, but each contains fewer states.
## Summary
......
......@@ -23,7 +23,7 @@ pi = np.pi
2. Values of $k$ that differ by an integer multiple of $2\pi/a$ describe the same wave. Therefore, all information is already contained in the 1st Brillouin zone.
3. The LCAO wavefunction is $|\Psi\rangle = \sum_n\phi_n|n\rangle$. The Schroedinger equation yields $\varepsilon \phi_n = \varepsilon_0 \phi_n - t \phi_{n+1} - t \phi_{n-1}$. Plugging in the Ansatz $\phi_n = \phi_0 e^{ikna}$ yields
3. The LCAO wavefunction is $|\Psi\rangle = \sum_n\phi_n|n\rangle$. The Schrödinger equation yields $\varepsilon \phi_n = \varepsilon_0 \phi_n - t \phi_{n+1} - t \phi_{n-1}$. Plugging in the Ansatz $\phi_n = \phi_0 e^{ikna}$ yields
$$
\varepsilon = \varepsilon_0 -2t\cos(ka)
$$
......
from pathlib import Path
from logging import getLogger
from mkdocs.structure.files import File
from mkdocs.plugins import BasePlugin
import nbconvert
from nbconvert.preprocessors import ExtractOutputPreprocessor
from traitlets.config import Config
import jupytext
import os
log = getLogger("mkdocs.plugins.execute")
log.setLevel("INFO")
output_extractor = ExtractOutputPreprocessor()
output_extractor.extract_output_types = (
output_extractor.extract_output_types
| {'application/vnd.plotly.v1+json'}
)
class AlreadySavedFile(File):
def copy_file(self, dirty=False):
pass
exporter = nbconvert.TemplateExporter(
config=Config(dict(
TemplateExporter=dict(
preprocessors=[
nbconvert.preprocessors.ExecutePreprocessor,
output_extractor,
],
exclude_input=False,
extra_template_basedirs=[str(Path(__file__).parent / "templates")],
template_file='mkdocs_markdown/index.md.j2',
),
NbConvertBase=dict(
display_data_priority=[
'application/vnd.plotly.v1+json',
'text/html',
'text/markdown',
'image/svg+xml',
'text/latex',
'image/png',
'image/jpeg',
'text/plain'
]
),
))
)
writer = nbconvert.writers.FilesWriter(build_directory=str())
class Plugin(BasePlugin):
def __init__(self):
self.output_map = {}
def on_page_read_source(
self, page, config, **kwargs
):
os.environ["PLOTLY_RENDERER"] = "plotly_mimetype"
src_path = page.file.abs_src_path
notebook = jupytext.read(src_path)
log.info(f"Executing {src_path}")
output, resources = exporter.from_notebook_node(
notebook,
resources={
"unique_key": page.file.src_path,
# Compute the relative URL
"output_files_dir": "_execute_outputs",
"metadata": {
"path": Path(src_path).parent
}
}
)
build_directory = Path(config["site_dir"])
nbconvert.writers.FilesWriter(
build_directory=str(build_directory)
).write(output, resources, "out.md")
out = build_directory / "out.md"
source = out.read_text()
out.unlink()
self.output_map[src_path] = list(resources["outputs"].keys())
return source
def on_page_markdown(self, markdown, page, config, files):
src_path = page.file.abs_src_path
for file in self.output_map.pop(page.file.abs_src_path):
files.append(
AlreadySavedFile(
str(file),
config['docs_dir'],
config['site_dir'],
config['use_directory_urls']
)
)
plugin_instance = Plugin()
on_page_read_source = plugin_instance.on_page_read_source
on_page_markdown = plugin_instance.on_page_markdown
\ No newline at end of file
......@@ -62,6 +62,10 @@ theme:
plugins:
- search
- social
- execute:
include: ["*.md"]
execute_without_tag: ["*.md"]
markdown_template: 'templates/mkdocs_markdown/index.md.j2'
markdown_extensions:
- pymdownx.arithmatex:
......@@ -77,15 +81,12 @@ markdown_extensions:
- footnotes
- meta
hooks:
- execute.py
extra_javascript:
- scripts/katex.js
- scripts/plotlyhelper.js
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/auto-render.min.js
- 'https://polyfill.io/v3/polyfill.min.js?features=es6'
- 'https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6'
- 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'
- 'https://cdn.plot.ly/plotly-latest.min.js'
......
This diff is collapsed.
[project]
authors = ["Open solid state notes authors"]
channels = ["conda-forge"]
description = "Lecture notes on solid state physics"
name = "Open solid state notes"
platforms = ["linux-64", "osx-64", "win-64"]
version = "0.1.0"
[tasks]
build = { cmd="mkdocs build", env ={PYDEVD_DISABLE_FILE_VALIDATION="1", JUPYTER_PLATFORM_DIRS="1"}}
[dependencies]
ipykernel = ">=6.29.5,<7"
plotly = ">=5.23.0,<6"
scipy = ">=1.14.1,<2"
numpy = ">=2.1.0,<3"
matplotlib = ">=3.9.2,<4"
mkdocs = ">=1.6.0,<2"
mkdocs-material = ">=9.5.33,<10"
python-markdown-math = ">=0.8,<0.9"
pillow = ">=10.4.0,<11"
cairosvg = ">=2.7.1,<3"
pandas = ">=2.2.2,<3"
ffmpeg = ">=7.0.2,<8"
[pypi-dependencies]
wikitables = ">=0.5.5, <0.6"
mkdocs-execute-plugin = ">=0.0.8, <0.1.0"