Commit 1b330981 authored by Jefferson Stafusa E. Portela's avatar Jefferson Stafusa E. Portela
Browse files

Update tutorial and notebooks.

parent 9b2dc69a
......@@ -277,12 +277,13 @@ These worked-out exercises, together with ALF's modularity, boosted by its Prede
\section*{Downloading and using the code and tutorial}
One can use the ALF package downloaded automatically by the Python script in the first part of this tutorial, or manually, by typing
\begin{lstlisting}[style=bash]
git clone https://git.physik.uni-wuerzburg.de/ALF/ALF.git
git clone -b ALF-2.0 https://git.physik.uni-wuerzburg.de/ALF/pyALF.git
\end{lstlisting}
in a shell. Similarly, to download the tutorial, including solutions, enter:
\begin{lstlisting}[style=bash]
git clone https://git.physik.uni-wuerzburg.de/ALF/ALF_Tutorial.git
\end{lstlisting}
This document is found in the directory \texttt{Tutorial-ALF-2.0}.
The necessary environment variables and the directives for compiling the code are set by the script \texttt{configure.sh}: \lstinline[style=bash]|source configure.sh GNU|, followed by the command \lstinline[style=bash,morekeywords={make}]|make|. Details and further options are described in the package's documentation found in its repository.
......
......@@ -6,9 +6,9 @@
\section{Projective algorithm}\label{projective-algorithm}}
In this example we use the
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF}{pyALF} interface to
run ALF's projective algorithm with the Mz choice of Hubbard
Stratonovich transformation on a 4-site ring.
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/ALF-2.0}{pyALF}
interface to run ALF's projective algorithm with the Mz choice of
Hubbard Stratonovich transformation on a 4-site ring.
The projective approach is the method of choice if one is interested in
ground-state properties. The starting point is a pair of trial wave
......@@ -24,7 +24,7 @@ then be computed by propagation along the imaginary time axis: \[
(time displaced and equal time) are measured and \(\tau\) varies from
\(0\) to \(\beta\) in the calculation of time-displace observables. For
further details, see Sec. 3 of
\href{https://git.physik.uni-wuerzburg.de/ALF/ALF_code/-/blob/master/Documentation/ALF_v1.0.pdf}{ALF
\href{https://git.physik.uni-wuerzburg.de/ALF/ALF/-/blob/5a887441c8dca138ef2c9b643948d4eccee808ae/Documentation/doc.pdf}{ALF
documentation}.
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
......@@ -36,6 +36,7 @@ numerical and plotting packages:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{c+c1}{\PYZsh{} }
\PY{k+kn}{import} \PY{n+nn}{numpy} \PY{k}{as} \PY{n+nn}{np} \PY{c+c1}{\PYZsh{} Numerical library}
......@@ -53,7 +54,7 @@ necessary parameters, in particular the \texttt{Projector} to
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Theta values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{theta} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mi}{5}\PY{p}{,} \PY{l+m+mi}{10}\PY{p}{,} \PY{l+m+mi}{20}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of Theta}
\PY{k}{for} \PY{n}{theta} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mi}{1}\PY{p}{,} \PY{l+m+mi}{2}\PY{p}{,} \PY{l+m+mi}{5}\PY{p}{,} \PY{l+m+mi}{10}\PY{p}{,} \PY{l+m+mi}{15}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of Theta}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{theta}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -71,12 +72,13 @@ necessary parameters, in particular the \texttt{Projector} to
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ham\PYZus{}Tperp}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} For bilayer systems}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{beta}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{1.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} Inverse temperature}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Ltau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{0}\PY{p}{,} \PY{c+c1}{\PYZsh{} \PYZsq{}1\PYZsq{} for time\PYZhy{}displaced Green functions; \PYZsq{}0\PYZsq{} otherwise }
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{400}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{10}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{600}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps per bin}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{50}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Dtau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.05}\PY{p}{,} \PY{c+c1}{\PYZsh{} Only dtau varies between simulations, Ltrot=beta/Dtau}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Mz}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{k+kc}{True}\PY{p}{,} \PY{c+c1}{\PYZsh{} If true, sets the M\PYZus{}z\PYZhy{}Hubbard model: Nf=2, N\PYZus{}sum=1,}
\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} HS field couples to z\PYZhy{}component of magnetization}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{\PYZti{}/Programs/ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Local ALF copy, if present}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\PY{n}{sims}\PY{o}{.}\PY{n}{append}\PY{p}{(}\PY{n}{sim}\PY{p}{)}
\end{Verbatim}
......@@ -84,9 +86,11 @@ necessary parameters, in particular the \texttt{Projector} to
\begin{Verbatim}[commandchars=\\\{\}]
Theta values used:
1
2
5
10
20
15
\end{Verbatim}
\textbf{3.} Compile ALF, downloading it first if not found locally. This
......@@ -100,6 +104,7 @@ may take a few minutes:
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Checking out branch ALF-2.0
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -115,27 +120,37 @@ Compiling ALF{\ldots} Done.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=5\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dta
u=0.05\_Mz=True" for Monte Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=1\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=10\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dt
au=0.05\_Mz=True" for Monte Carlo run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=2\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=20\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dt
au=0.05\_Mz=True" for Monte Carlo run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=5\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=10\_T=1.0\_U=4.0\_Tp
erp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=15\_T=1.0\_U=4.0\_Tp
erp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{6}{\boxspacing}
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{o}{\PYZpc{}\PYZpc{}}\PY{k}{capture}
ener = np.empty((len(sims), 2)) \PYZsh{} Matrix for storing energy values
......@@ -153,35 +168,30 @@ of \texttt{sim.analysis()}, which lists the data directories and
observables.
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{7}{\boxspacing}
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{For Theta values}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{thetas}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{the measured energies are:}\PY{l+s+se}{\PYZbs{}n}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{ener}\PY{p}{)}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
For Theta values [ 5. 10. 20.] the measured energies are:
[[-2.137697 0.025552]
[-2.108235 0.023964]
[-2.089294 0.025426]]
For Theta values [ 1. 2. 5. 10. 15.] the measured energies are:
[[-2.10506 0.004793]
[-2.109192 0.007388]
[-2.112494 0.007432]
[-2.111801 0.009849]
[-2.108171 0.006405]]
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{8}{\boxspacing}
\prompt{In}{incolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{l+m+mi}{1}\PY{o}{/}\PY{n}{thetas}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{l+m+mi}{1}\PY{o}{/}\PY{n}{thetas}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}\PY{p}{;} \PY{n}{plt}\PY{o}{.}\PY{n}{xlim}\PY{p}{(}\PY{l+m+mi}{0}\PY{p}{,} \PY{p}{)}\PY{p}{;}
\end{Verbatim}
\end{tcolorbox}
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{8}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
<ErrorbarContainer object of 3 artists>
\end{Verbatim}
\end{tcolorbox}
\begin{center}
\adjustimage{max size={0.6\linewidth}{0.9\paperheight}}{projective_algorithm-output_13_1.png}
\adjustimage{max size={0.6\linewidth}{0.9\paperheight}}{projective_algorithm-output_13_0.png}
\end{center}
{ \hspace*{\fill} \\}
......
......@@ -374,9 +374,9 @@
\section{Projective algorithm}\label{projective-algorithm}}
In this example we use the
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF}{pyALF} interface to
run ALF's projective algorithm with the Mz choice of Hubbard
Stratonovich transformation on a 4-site ring.
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/ALF-2.0}{pyALF}
interface to run ALF's projective algorithm with the Mz choice of
Hubbard Stratonovich transformation on a 4-site ring.
The projective approach is the method of choice if one is interested in
ground-state properties. The starting point is a pair of trial wave
......@@ -392,7 +392,7 @@ then be computed by propagation along the imaginary time axis: \[
(time displaced and equal time) are measured and \(\tau\) varies from
\(0\) to \(\beta\) in the calculation of time-displace observables. For
further details, see Sec. 3 of
\href{https://git.physik.uni-wuerzburg.de/ALF/ALF_code/-/blob/master/Documentation/ALF_v1.0.pdf}{ALF
\href{https://git.physik.uni-wuerzburg.de/ALF/ALF/-/blob/5a887441c8dca138ef2c9b643948d4eccee808ae/Documentation/doc.pdf}{ALF
documentation}.
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
......@@ -404,6 +404,7 @@ numerical and plotting packages:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{c+c1}{\PYZsh{} }
\PY{k+kn}{import} \PY{n+nn}{numpy} \PY{k}{as} \PY{n+nn}{np} \PY{c+c1}{\PYZsh{} Numerical library}
......@@ -421,7 +422,7 @@ necessary parameters, in particular the \texttt{Projector} to
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Theta values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{theta} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mi}{5}\PY{p}{,} \PY{l+m+mi}{10}\PY{p}{,} \PY{l+m+mi}{20}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of Theta}
\PY{k}{for} \PY{n}{theta} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mi}{1}\PY{p}{,} \PY{l+m+mi}{2}\PY{p}{,} \PY{l+m+mi}{5}\PY{p}{,} \PY{l+m+mi}{10}\PY{p}{,} \PY{l+m+mi}{15}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of Theta}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{theta}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -439,12 +440,13 @@ necessary parameters, in particular the \texttt{Projector} to
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ham\PYZus{}Tperp}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} For bilayer systems}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{beta}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{1.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} Inverse temperature}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Ltau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{0}\PY{p}{,} \PY{c+c1}{\PYZsh{} \PYZsq{}1\PYZsq{} for time\PYZhy{}displaced Green functions; \PYZsq{}0\PYZsq{} otherwise }
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{400}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{10}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{600}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps per bin}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{50}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Dtau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.05}\PY{p}{,} \PY{c+c1}{\PYZsh{} Only dtau varies between simulations, Ltrot=beta/Dtau}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Mz}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{k+kc}{True}\PY{p}{,} \PY{c+c1}{\PYZsh{} If true, sets the M\PYZus{}z\PYZhy{}Hubbard model: Nf=2, N\PYZus{}sum=1,}
\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} HS field couples to z\PYZhy{}component of magnetization}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{\PYZti{}/Programs/ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Local ALF copy, if present}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\PY{n}{sims}\PY{o}{.}\PY{n}{append}\PY{p}{(}\PY{n}{sim}\PY{p}{)}
\end{Verbatim}
......@@ -452,9 +454,11 @@ necessary parameters, in particular the \texttt{Projector} to
\begin{Verbatim}[commandchars=\\\{\}]
Theta values used:
1
2
5
10
20
15
\end{Verbatim}
\textbf{3.} Compile ALF, downloading it first if not found locally. This
......@@ -468,6 +472,7 @@ may take a few minutes:
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Checking out branch ALF-2.0
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -483,27 +488,37 @@ Compiling ALF{\ldots} Done.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=5\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dta
u=0.05\_Mz=True" for Monte Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=1\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=10\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dt
au=0.05\_Mz=True" for Monte Carlo run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=2\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_Projector=True\_Theta=20\_T=1.0\_U=4.0\_Tperp=0.0\_beta=1.0\_Dt
au=0.05\_Mz=True" for Monte Carlo run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=5\_T=1.0\_U=4.0\_Tpe
rp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=10\_T=1.0\_U=4.0\_Tp
erp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_Projector=True\_Theta=15\_T=1.0\_U=4.0\_Tp
erp=0.0\_beta=1.0\_Dtau=0.05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{6}{\boxspacing}
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{o}{\PYZpc{}\PYZpc{}}\PY{k}{capture}
ener = np.empty((len(sims), 2)) \PYZsh{} Matrix for storing energy values
......@@ -521,35 +536,30 @@ of \texttt{sim.analysis()}, which lists the data directories and
observables.
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{7}{\boxspacing}
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{For Theta values}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{thetas}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{the measured energies are:}\PY{l+s+se}{\PYZbs{}n}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{ener}\PY{p}{)}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
For Theta values [ 5. 10. 20.] the measured energies are:
[[-2.137697 0.025552]
[-2.108235 0.023964]
[-2.089294 0.025426]]
For Theta values [ 1. 2. 5. 10. 15.] the measured energies are:
[[-2.10506 0.004793]
[-2.109192 0.007388]
[-2.112494 0.007432]
[-2.111801 0.009849]
[-2.108171 0.006405]]
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{8}{\boxspacing}
\prompt{In}{incolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{l+m+mi}{1}\PY{o}{/}\PY{n}{thetas}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{l+m+mi}{1}\PY{o}{/}\PY{n}{thetas}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}\PY{p}{;} \PY{n}{plt}\PY{o}{.}\PY{n}{xlim}\PY{p}{(}\PY{l+m+mi}{0}\PY{p}{,} \PY{p}{)}\PY{p}{;}
\end{Verbatim}
\end{tcolorbox}
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{8}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
<ErrorbarContainer object of 3 artists>
\end{Verbatim}
\end{tcolorbox}
\begin{center}
\adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{output_13_1.png}
\adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{output_13_0.png}
\end{center}
{ \hspace*{\fill} \\}
......
......@@ -7,10 +7,11 @@
ring}\label{testing-against-ed---hubbard-on-a-ring}}
In this example we use the
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF}{pyALF} interface to
run ALF with the Mz choice of Hubbard Stratonovitch transformation on a
four site ring, at \(U/t=4\) and inverse temperature \(\beta t = 2\).
For this set of parameters, the exact internal energy reads:\\
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/ALF-2.0}{pyALF}
interface to run ALF with the Mz choice of Hubbard Stratonovitch
transformation on a four site ring, at \(U/t=4\) and inverse temperature
\(\beta t = 2\). For this set of parameters, the exact internal energy
reads:\\
\[
\left\langle -t \sum_{\langle i,j\rangle, \sigma} \hat{c}_{i,\sigma}^{\dagger} \hat{c}_{j,\sigma}^{\phantom\dagger} + U \sum_{i=1}^{N} \hat{n}_{i,\uparrow}\hat{n}_{j,\downarrow} \right\rangle = -1.47261997 t
\]
......@@ -50,11 +51,11 @@ necessary parameters, in particular the different \(\Delta \tau\)
values:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{19}{\boxspacing}
\prompt{In}{incolor}{2}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{dtau values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{dtau}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -100,6 +101,7 @@ may take a few minutes:
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Checking out branch ALF-2.0
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -107,7 +109,7 @@ Compiling ALF{\ldots} Done.
\texttt{sim}:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{20}{\boxspacing}
\prompt{In}{incolor}{4}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k}{for} \PY{n}{i}\PY{p}{,} \PY{n}{sim} \PY{o+ow}{in} \PY{n+nb}{enumerate}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{:}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
......@@ -119,23 +121,23 @@ Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
1\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
2\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{21}{\boxspacing}
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{ener} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,} \PY{l+m+mi}{2}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for storing energy values}
\PY{n}{dtaus} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for Dtau values, for plotting}
......@@ -193,7 +195,7 @@ J 1
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{22}{\boxspacing}
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{For Dtau values}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{dtaus}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{the measured energies are:}\PY{l+s+se}{\PYZbs{}n}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{ener}\PY{p}{)}
\end{Verbatim}
......@@ -207,7 +209,7 @@ For Dtau values [0.05 0.1 0.2 ] the measured energies are:
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{23}{\boxspacing}
\prompt{In}{incolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{n}{dtaus}\PY{o}{*}\PY{o}{*}\PY{l+m+mi}{2}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}
......@@ -228,7 +230,7 @@ For Dtau values [0.05 0.1 0.2 ] the measured energies are:
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{23}{\boxspacing}
\prompt{Out}{outcolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
<ErrorbarContainer object of 3 artists>
\end{Verbatim}
......
......@@ -375,10 +375,11 @@
ring}\label{testing-against-ed---hubbard-on-a-ring}}
In this example we use the
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF}{pyALF} interface to
run ALF with the Mz choice of Hubbard Stratonovitch transformation on a
four site ring, at \(U/t=4\) and inverse temperature \(\beta t = 2\).
For this set of parameters, the exact internal energy reads:\\
\href{https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/ALF-2.0}{pyALF}
interface to run ALF with the Mz choice of Hubbard Stratonovitch
transformation on a four site ring, at \(U/t=4\) and inverse temperature
\(\beta t = 2\). For this set of parameters, the exact internal energy
reads:\\
\[
\left\langle -t \sum_{\langle i,j\rangle, \sigma} \hat{c}_{i,\sigma}^{\dagger} \hat{c}_{j,\sigma}^{\phantom\dagger} + U \sum_{i=1}^{N} \hat{n}_{i,\uparrow}\hat{n}_{j,\downarrow} \right\rangle = -1.47261997 t
\]
......@@ -418,11 +419,11 @@ necessary parameters, in particular the different \(\Delta \tau\)
values:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{19}{\boxspacing}
\prompt{In}{incolor}{2}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{dtau values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{dtau}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -468,6 +469,7 @@ may take a few minutes:
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Checking out branch ALF-2.0
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -475,7 +477,7 @@ Compiling ALF{\ldots} Done.
\texttt{sim}:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{20}{\boxspacing}
\prompt{In}{incolor}{4}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k}{for} \PY{n}{i}\PY{p}{,} \PY{n}{sim} \PY{o+ow}{in} \PY{n+nb}{enumerate}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{:}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
......@@ -487,23 +489,23 @@ Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
1\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
2\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{21}{\boxspacing}
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{ener} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,} \PY{l+m+mi}{2}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for storing energy values}
\PY{n}{dtaus} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for Dtau values, for plotting}
......@@ -561,7 +563,7 @@ J 1
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{22}{\boxspacing}
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{For Dtau values}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{dtaus}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{the measured energies are:}\PY{l+s+se}{\PYZbs{}n}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{ener}\PY{p}{)}
\end{Verbatim}
......@@ -575,7 +577,7 @@ For Dtau values [0.05 0.1 0.2 ] the measured energies are:
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{23}{\boxspacing}
\prompt{In}{incolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{n}{dtaus}\PY{o}{*}\PY{o}{*}\PY{l+m+mi}{2}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}
......@@ -596,7 +598,7 @@ For Dtau values [0.05 0.1 0.2 ] the measured energies are:
\end{Verbatim}