@@ -270,8 +270,7 @@ which opens the ``notebook dashboard'' in your default browser, where you can na

\part{Getting your hands dirty - writing new code}

%\setcounter{exercise}{0}

Part II consists in a set of guided advanced exercises.

This second part of the tutorial consists in a set of guided advanced exercises.

A lot already comes implemented in ALF, but unavoidably, as one proceeds in their own investigations, a new model has to be implemented or a new observable defined -- and for that one has to grapple with the package's Fortran source code. However, in ALF this is made easy by means of predefined structures, templates, and the examples below.

...

...

@@ -279,11 +278,11 @@ A lot already comes implemented in ALF, but unavoidably, as one proceeds in thei

\section*{Downloading 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

The SU(2) Hubbard-Stratonovich decomposition, conserves spin rotational symmetry. Run the ladder code with the SU(2) flag in the parameter file switched on (i.e. \texttt{Model = Hubbard\_SU2}) and compare results.

\exercise{Adding a new observable}

\red{[Update with:]}

\begin{align}

&\hat{O}_{i,x}=\sum_{\sigma}\left(\hat{c}^\dagger_{i,r}\hat{c}_{i+ax,\sigma}+H.c. \right)\text{, such that}\\

[It should be added to the Predefined Structures.]\\

\hrule

\red{[Old part:]}\\

Here the aim is to include the new observable equal time observable $\langle\vec{S}_{i}\cdot\vec{S}_{j}\rangle$ in the \texttt{Hubbard\_Mz} code.

To achieve this, you will have to carry out the following steps.

\begin{itemize}

\item In the subroutine \texttt{Alloc\_obs} in the \texttt{Hamiltonian\_example.f90} file you will have to add a new equal time observable with a call to

\texttt{Call Obser\_Latt\_make(Obs\_eq(I),Ns,Nt,No,Filename)} with \texttt{Ns = Latt\%N; No = Norb; Filename ="SpinT", Nt=1, I=5}

\item In the subroutine \texttt{Obser} you will have to add the Wick decomposition of this observable.

\item In the subroutine \texttt{Alloc\_obs} in the \texttt{Hamiltonian\_example.f90} file you will have to add a new equal time observable with a call to

\texttt{Call Obser\_Latt\_make(Obs\_eq(I),Ns,Nt,No,Filename)} with \texttt{Ns = Latt\%N; No = Norb; Filename ="SpinT", Nt=1, I=5}

\item In the subroutine \texttt{Obser} you will have to add the Wick decomposition of this observable.

\end{itemize}

In the program \texttt{Hamiltonian\_Examples.f90} to be found in the directory \texttt{Solutions/Exercise\_2/Prog/} we have commented the changes that have to be carried out to add this observable. The new variable takes the name SpinT and the results you should obtain are summarized in Fig.~\ref{Ladder.fig}.

\begin{figure}[h]

\begin{center}

\includegraphics[scale=.8]{Ladder.pdf}

\end{center}

\caption{\label{Ladder.fig} Spin correlation functions along one leg for the Hubbard ladder. As $t_y$ grows the spin gap becomes large enough so as to detect the exponential decal of the spin correlation function on this small lattice size. The underlying physics of odd-even ladder systems is introduced in the article: Elbio Dagotto and T. M. Rice, Surprises on the way from one- to two-dimensional quantum magnets: The ladder materials, Science 271(1996), no. 5249, 618?623. }

\begin{center}

\includegraphics[scale=.8]{Ladder.pdf}

\end{center}

\caption{\label{Ladder.fig} Spin correlation functions along one leg for the Hubbard ladder. As $t_y$ grows the spin gap becomes large enough so as to detect the exponential decal of the spin correlation function on this small lattice size. The underlying physics of odd-even ladder systems is introduced in the article: Elbio Dagotto and T. M. Rice, Surprises on the way from one- to two-dimensional quantum magnets: The ladder materials, Science 271(1996), no. 5249, 618?623. }

The SU(2) Hubbard-Stratonovich decomposition, conserves spin rotational symmetry. Run the ladder code with the SU(2) flag in the parameter file switched on (i.e. \texttt{Model = Hubbard\_SU2}) and compare results.

\newpage

\exercise{Defining a new model: The one-dimensional t-V model}