|
| 1 | +# # Modelling atomic chains |
| 2 | +# |
| 3 | +# In [Periodic problems and plane-wave discretisations](@ref periodic-problems) we already |
| 4 | +# summarised the net effect of Bloch's theorem. |
| 5 | +# In this notebook, we will explore some basic facts about periodic systems, |
| 6 | +# starting from the very simplest model, a tight-binding monoatomic chain. |
| 7 | +# The solutions to the hands-on exercises are given at the bottom of the page. |
| 8 | + |
| 9 | +# ## Monoatomic chain |
| 10 | +# |
| 11 | +# In this model, each site of an infinite 1D chain is a degree of freedom, and |
| 12 | +# the Hilbert space is $\ell^2(\mathbb Z)$, the space of square-summable |
| 13 | +# biinfinite sequences $(\psi_n)_{n \in \mathbb Z}$. |
| 14 | +# |
| 15 | +# Each site interacts by a "hopping term" with its neighbors, and the |
| 16 | +# Hamiltonian is |
| 17 | +# ```math |
| 18 | +# H = \left(\begin{array}{ccccc} |
| 19 | +# \dots&\dots&\dots&\dots&\dots \\ |
| 20 | +# \dots& 0 & 1 & 0 & \dots\\ |
| 21 | +# \dots&1 & 0 &1&\dots \\ |
| 22 | +# \dots&0 & 1 & 0& \dots \\ |
| 23 | +# \dots&\dots&\dots&\dots&… |
| 24 | +# \end{array}\right) |
| 25 | +# ``` |
| 26 | +# |
| 27 | +# !!! tip "Exercise 1" |
| 28 | +# Find the eigenstates and eigenvalues of this Hamiltonian by |
| 29 | +# solving the second-order recurrence relation. |
| 30 | +# |
| 31 | +# !!! tip "Exercise 2" |
| 32 | +# Do the same when the system is truncated to a finite number of $N$ |
| 33 | +# sites with periodic boundary conditions. |
| 34 | +# |
| 35 | +# We are now going to code this: |
| 36 | + |
| 37 | +function build_monoatomic_hamiltonian(N::Integer, t) |
| 38 | + H = zeros(N, N) |
| 39 | + for n = 1:N-1 |
| 40 | + H[n, n+1] = H[n+1, n] = t |
| 41 | + end |
| 42 | + H[1, N] = H[N, 1] = t # Periodic boundary conditions |
| 43 | + H |
| 44 | +end |
| 45 | + |
| 46 | +# !!! tip "Exercise 3" |
| 47 | +# Compute the eigenvalues and eigenvectors of this Hamiltonian. |
| 48 | +# Plot them, and check whether they agree with theory. |
| 49 | + |
| 50 | +# ## Diatomic chain |
| 51 | +# Now we are going to consider a diatomic chain `A B A B ...`, where the coupling |
| 52 | +# `A<->B` ($t_1$) is different from the coupling `B<->A` ($t_2$). We will use a new |
| 53 | +# index $\alpha$ to denote the `A` and `B` sites, so that wavefunctions are now |
| 54 | +# sequences $(\psi_{\alpha n})_{\alpha \in \{1, 2\}, n \in \mathbb Z}$. |
| 55 | +# |
| 56 | +# !!! tip "Exercise 4" |
| 57 | +# Show that eigenstates of this system can be looked for in the form |
| 58 | +# ```math |
| 59 | +# \psi_{\alpha n} = u_{\alpha} e^{ikn} |
| 60 | +# ``` |
| 61 | +# |
| 62 | +# !!! tip "Exercise 5" |
| 63 | +# Show that, if $\psi$ is of the form above |
| 64 | +# ```math |
| 65 | +# (H \psi)_{\alpha n} = (H_k u)_\alpha e^{ikn}, |
| 66 | +# ``` |
| 67 | +# where |
| 68 | +# ``` |
| 69 | +# H_k = \left(\begin{array}{cc} |
| 70 | +# 0 & t_1 + t_2 e^{-ik}\\ |
| 71 | +# t_1 + t_2 e^{ik} & 0 |
| 72 | +# \end{array}\right) |
| 73 | +# ``` |
| 74 | +# |
| 75 | +# Let's now check all this numerically: |
| 76 | + |
| 77 | +function build_diatomic_hamiltonian(N::Integer, t1, t2) |
| 78 | + ## Build diatomic Hamiltonian with the two couplings |
| 79 | + ## ... <-t2-> A <-t1-> B <-t2-> A <-t1-> B <-t2-> ... |
| 80 | + ## We introduce unit cells as such: |
| 81 | + ## ... <-t2-> | A <-t1-> B <-t2-> | A <-t1-> B <-t2-> | ... |
| 82 | + ## Thus within a cell the A<->B coupling is t1 and across cell boundaries t2 |
| 83 | + |
| 84 | + H = zeros(2, N, 2, N) |
| 85 | + A, B = 1, 2 |
| 86 | + for n = 1:N |
| 87 | + H[A, n, B, n] = H[B, n, A, n] = t1 # Coupling within cell |
| 88 | + end |
| 89 | + for n = 1:N-1 |
| 90 | + H[B, n, A, n+1] = H[A, n+1, B, n] = t2 # Coupling across cells |
| 91 | + end |
| 92 | + H[A, 1, B, N] = H[B, N, A, 1] = t2 # Periodic BCs (A in cell1 with B in cell N) |
| 93 | + reshape(H, 2N, 2N) |
| 94 | +end |
| 95 | + |
| 96 | +function build_diatomic_Hk(k::Integer, t1, t2) |
| 97 | + ## Returns Hk such that H (u e^ikn) = (Hk u) e^ikn |
| 98 | + ## |
| 99 | + ## intra-cell AB hopping of t1, plus inter-cell hopping t2 between |
| 100 | + ## site B (no phase shift) and site A (phase shift e^ik) |
| 101 | + [0 t1 + t2*exp(-im*k); |
| 102 | + t1 + t2*exp(im*k) 0 ] |
| 103 | +end |
| 104 | + |
| 105 | +using Plots |
| 106 | +function plot_wavefunction(ψ) |
| 107 | + p = plot(real(ψ[1:2:end]), label="Re A") |
| 108 | + plot!(p, real(ψ[2:2:end]), label="Re B") |
| 109 | +end |
| 110 | + |
| 111 | +# !!! tip "Exercise 6" |
| 112 | +# Check the above assertions. Use a $k$ of the form |
| 113 | +# $2 π \frac{l}{N}$ in order to have a $\psi$ that has the periodicity |
| 114 | +# of the supercell ($N$). |
| 115 | + |
| 116 | +# !!! tip "Exercise 7" |
| 117 | +# Plot the band structure, i.e. the eigenvalues of $H_k$ as a function of $k$ |
| 118 | +# Use the function `build_diatomic_Hk` to build the Hamiltonians. |
| 119 | +# Compare with the eigenvalues of the ("supercell") Hamiltonian from |
| 120 | +# `build_diatomic_hamiltonian`. In the case $t_1 = t_2$, how do the bands follow |
| 121 | +# from the previous study of the monoatomic chain? |
| 122 | + |
| 123 | +# !!! tip "Exercise 8" |
| 124 | +# Repeat the above analysis in the case of a finite-difference |
| 125 | +# discretization of a continuous Hamiltonian $H = - \frac 1 2 \Delta + V(x)$ |
| 126 | +# where $V$ is periodic |
| 127 | +# *Hint:* It is advisable to work through [Comparing discretization techniques](@ref) |
| 128 | +# before tackling this question. |
| 129 | + |
| 130 | +# ## Solutions |
| 131 | +# |
| 132 | +# ### Exercise 1 |
| 133 | +# !!! note "TODO" |
| 134 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 135 | +# |
| 136 | +# ### Exercise 2 |
| 137 | +# !!! note "TODO" |
| 138 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 139 | +# |
| 140 | +# ### Exercise 3 |
| 141 | +# !!! note "TODO" |
| 142 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 143 | +# |
| 144 | +# ### Exercise 4 |
| 145 | +# !!! note "TODO" |
| 146 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 147 | +# |
| 148 | +# ### Exercise 5 |
| 149 | +# !!! note "TODO" |
| 150 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 151 | +# |
| 152 | +# ### Exercise 6 |
| 153 | +# !!! note "TODO" |
| 154 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 155 | +# |
| 156 | +# ### Exercise 7 |
| 157 | +# !!! note "TODO" |
| 158 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 159 | +# |
| 160 | +# ### Exercise 8 |
| 161 | +# !!! note "TODO" |
| 162 | +# This solution has not yet been written. Any help with a PR is appreciated. |
| 163 | + |
0 commit comments