-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfermi_hubbard_code_documentation.tex
135 lines (117 loc) · 6.94 KB
/
fermi_hubbard_code_documentation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\documentclass{article}
\usepackage{verbatim} % For using a text file verbatim, e.g. for code
\usepackage{graphicx} % For adding images
\graphicspath{{images/}} % Specify image directory path
\usepackage{amsmath} % For math
\usepackage{mathtools}
\usepackage{bm} % For bold math symbols
\usepackage{cancel} % For math cancellation
\usepackage{lipsum}
\usepackage{mwe}
%\usepackage{centernot} % For negating any symbol
\usepackage{amssymb} % For extra symbols
\usepackage{hyperref} % For hyperlinks
\usepackage{color} % For colored text
%\usepackage{multido} % For loops \multido{<vars>}{<repetitions>}{<stuff to repeat>}
\usepackage{braket} % For braket notation
%\usepackage{physics} % Lots of goodies
%\usepackage[margin=1in]{geometry} % For adjusting the margin size
% Raise the title a bit
\usepackage{titling}
\setlength{\droptitle}{-10em}
\title{%
Equilibrium Phases in the 1-D Hubbard Model \\
Code Documentation \\
\large PHYS 416}
\author{Johann Gan}
\date{April 11, 2019}
% Custom operators - requires amsmath package
%\DeclareMathOperator*{\argmin}{arg\,min}
%\DeclareMathOperator*{\argmax}{arg\,max}
% Custom commands
\newcommand{\p}{\newline\newline} % Double newline (paragraph without indent)
\newcommand{\eval}{\bigg\rvert} % Evaluation with bounds bar
\newcommand{\lagr}{\mathcal{L}} % Lagrangian
\newcommand{\bmhat}[1]{
\hat{\bm{#1}}
}
\newcommand{\chk}{\>\>\checkmark}
\newcommand{\bigo}{\mathcal{O}}
\newcommand{\dt}{\Delta t}
\newcommand{\parder}[3][1]{
\ifnum1=#1\relax
\frac{\partial #2}{\partial #3}
\else
\frac{\partial^#1 #2}{\partial #3^#1}
\fi
}
\newcommand{\D}[2]{
\ifnum1=#2\relax
\frac{\partial}{\partial #1}
\else
\frac{\partial^#2}{\partial #1^#2}
\fi
}
\newcommand{\pvec}[1]{\vec{#1}\mkern2mu\vphantom{#1}'} % Primed vector
%\newcommand{\innerfencepost}[3]{
% \multido{\i=1+1}{\number\numexpr#1-1\relax}{#2#3}#2
%}
%\newcommand{\outerfencepost}[3]{
% \multido{\i=1+1}{#1}{#3#2}#3
%}
\newcommand{\nicegraphic}[2][1]{
\begin{center}
\includegraphics[width=#1\textwidth]{#2}
\end{center}
}
\begin{document}
\maketitle
% Separate title page
%\pagenumbering{gobble} % The title page isn't page "1"
%\newpage
%\pagenumbering{arabic}
\section{Contents} This document lists overall program descriptions and usage instructions. For other code details, see docstrings and comments in the actual Python files. For a high-level description of the methods used, see the ``Methods'' section in the main report.
\section{ed.py}
Sets up the Hamiltonian matrix in the number basis, and numerically solves the eigenvalue problem for the band structure (energy levels). The band structure is plotted in an energy diagram, along with the Fermi level (as a dashed red line) for reference. For even numbers of sites, the central (conduction) band is highlighted in orange, and the plot is zoomed in on the conduction band to see finer details (both the zoomed and original plots are saved).
\p
Plots are saved in the following file format:
``fermi\_hubbard\_bands\_n\{n sites\}\_U\{U value\}\_t\{t value\}.png''
``fermi\_hubbard\_bands\_zoomed\_n\{n sites\}\_U\{U value\}\_t\{t value\}.png'' (even)
\p
Configuration is at the start of the main script (near the bottom after all the function definitions). To use, simply run after setting the desired system parameters:
\begin{itemize}
\item $n$ is the number of sites. Should be small ($\lesssim 7$).
\item $t$ is the hopping amplitude.
\item $U$ is the interaction strength.
\item $mu$ is the chemical potential.
\end{itemize}
Periodic boundary conditions are used. The program exploits the fact that the Hubbard Hamiltonian conserves total particle number, and solves for the energies by diagonalizing a bunch of subspaces where each subspace has a fixed total particle number. This greatly reduces the problem size. The central band is identified using a hierarchical clustering method.
\section{energy\_curves.py}
Not an actual program. A module containing supporting functions for mean-field calculations of energies and magnetizations, assuming different phases (ferromagnetic or antiferromagnetic) in the system.
\section{mft\_compressibility.py}
Computes and plots the $\rho(\mu)$ and $d\rho/d\mu$ curves under different Hubbard parameters $U$ and $t$. Each data point $(\rho, \mu)$ is color-coded by the phase in which the state exists. Blue is for ferromagnetic, green is for paramagnetic, and red is for antiferromagnetic. A Monte Carlo sampling method for initial guesses is used along with a mean-field calculation, so results are not guaranteed to be converged (though convergence failure is rare). Any unconverged results are demarcated in the plots by dashed red lines.
\p
Plots are saved in the following file format:
``fermi\_hubbard\_compressibility\_U\{U value\}\_t\{t value\}.png''.
\p
Configuration is at the start of the main script (near the bottom after all the function definitions). To use, simply run after setting the desired system parameters:
\begin{itemize}
\item $n$ is the number of sites. Should be relatively large to get a good finite-sized approximation of the chain.
\item $t$ is the hopping amplitude.
\item $U$ is the interaction strength.
\item $mus$ is an array of the chemical potentials for which to compute the corresponding density and compressibility.
\end{itemize}
\section{mft\_phase.py}
Computes and plots the $U/t-\rho$ magnetic phase diagram for the Hubbard model. On the first plot, points on a 2D grid of $U/t$ and $\rho$ values are colored blue, green, or red for whether that point corresponds to a ferromagnetic, paramagnetic, or antiferromagnetic state, respectively. On the second plot, the same 2D grid points are colored according to the magnitude of the appropriate order parameter of its phase: magnetization for ferromagnetism, staggered magnetization for antiferromagnetism, and zero for paramagnetism.
\p
Plots are saved in the file: ``fermi\_hubbard\_phase\_diagram.png''.
\p
Configuration is at the start of the main script (near the bottom after all the function definitions). To use, simply run after setting the desired system parameters:
\begin{itemize}
\item $U\_over\_t\_max$ is the highest value of $U/t$ that will be computed and plotted on the phase diagram. The minimum value will always be zero.
\item $U\_over\_t\_npoints$ is the number of discrete points to compute and plot between $U/t = 0$ and $U\_over\_t\_max$.
\item $nparticle\_res$ is the grid spacing of total particle number (density is computed as $\rho = n_{\text{particles}} / n_{\text{sites}}$). Must be even for the antiferromagnetic calculations to work.
\item $nsites$ is the number of sites. Should be relatively large to get a good finite-sized approximation of the chain. Note that particle number will be incremented from $0$ all the way up to $2*nsites$ in steps of $nparticle\_res$, so a very large number of $nsites$ will lead to a longer runtime.
\end{itemize}
Note: Depending on the number of phase-space points that need to be computed, the program may take a long time to complete.
\end{document}