\documentclass[11pt,fleqn]{article}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% template that does not use Revtex4
%%% but allows special fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Please use this template.
%%% Edit it using e.g. Notepad
%%% Ignore the header (do not change it)
%%% Process the file in the Latex site 
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Page setup
\topmargin -1.5cm      
\oddsidemargin -0.04cm   
\evensidemargin -0.04cm  
\textwidth 16.59cm
\textheight 24cm 
\setlength{\parindent}{0cm} 
\setlength{\parskip}{0cm} 


% Fonts
\usepackage{latexsym}
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{bm}


% Math symbols I
\newcommand{\sinc}{\mbox{sinc}}
\newcommand{\const}{\mbox{const}}
\newcommand{\trc}{\mbox{trace}}
\newcommand{\intt}{\int\!\!\!\!\int }
\newcommand{\ointt}{\int\!\!\!\!\int\!\!\!\!\!\circ\ }
\newcommand{\ar}{\mathsf r}
\newcommand{\im}{\mbox{Im}}
\newcommand{\re}{\mbox{Re}}

% Math symbols II
\newcommand{\eexp}{\mbox{e}^}
\newcommand{\bra}{\left\langle}
\newcommand{\ket}{\right\rangle}

% Mass symbol
\newcommand{\mass}{\mathsf{m}} 
\newcommand{\Mass}{\mathsf{M}} 

% More math commands
\newcommand{\tbox}[1]{\mbox{\tiny #1}}
\newcommand{\bmsf}[1]{\bm{\mathsf{#1}}} 
\newcommand{\amatrix}[1]{\begin{matrix} #1 \end{matrix}} 
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}

% Other commands
\newcommand{\hide}[1]{}
\newcommand{\drawline}{\begin{picture}(500,1)\line(1,0){500}\end{picture}}
\newcommand{\bitem}{$\bullet$ \ \ \ }
\newcommand{\Cn}[1]{\begin{center} #1 \end{center}}
\newcommand{\mpg}[2][1.0\hsize]{\begin{minipage}[b]{#1}{#2}\end{minipage}}
\newcommand{\Dn}{\vspace*{3mm}}

% Figures
\newcommand{\putgraph}[2][0.30\hsize]{\includegraphics[width=#1]{#2}}

% heading
\newcommand{\heading}[1]{\begin{center} \Large {#1} \end{center}}
\newcommand{\auname}[1]{\begin{center} \bf Submitted by: #1 \end{center}}

% Graphics

\usepackage{graphicx}
\usepackage{float}


\begin{document} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\heading{Szilard's Engine} 
\auname{Konstantin Yavilberg}


\section{Introduction}



One manifestation of the \emph{second law of thermodynamics,} is the
fact that heat engines cannot work on a single heat bath. In 1871
Maxwell devised the idea of the demon to show the probabilistic nature
of the second law: an intelligent being capable of measuring the position
and momentum of the particles in a gas could in principle violate
this law, for example by inducing a flow of heat from a cold source
to a hot one.

\emph{The Szilard engine }was a thought experiment, devised by Leo
Szilard in 1929. It was a refinement on some of the Maxwell's Demon
models of the time. The engine demonstrates how a possession of information
might have thermodynamic consequences, and in principle constitutes
a single heat bath engine.



\section{Classical Szilard's Engine (CSE)}


The original model of the engine consists of a a single particle prepared
in a box. The cycle consists of 4 main steps as shown in figure (1):
\begin{enumerate}
\item In the first step we insert the piston in the middle of the box, trapping
the particle on one side or the other. The work necessary to insert
the piston can be made zero (by taking the piston arbitrarily thin):
\begin{equation}
W_{ins}=0
\end{equation}

\item A measurement device (our \emph{demon}) in contact with a heat bath
at temperature $T_{demon}$, performs a measurement to determine on
which side the particle is trapped. According to the outcome, a load
is attached to the piston. The work required will be some function
of the temperature and other parameters:
\begin{equation}
W_{demon}=f(T_{demon},X_{1},X_{2},X_{3},..)
\end{equation}

\item The system is put in contact with a heat bath at temperature $T_{bath}>T_{demon}$,
while the particle performs an isothermal quasi-static expansion until
the piston reaches the end of the box. In this stage we see the importance
of the \emph{demon, }which allows us to extract positive work by controlling
on which side of the piston the load is attached. The work at this
stage is given by the ideal gas equation (for a single particle):
\begin{equation}
W_{exp}=\int_{V/2}^{V}pdV=T_{bath}\int_{V/2}^{V}\frac{dV}{V}=T_{bath}ln2
\end{equation}

\item The final step, deals with operation for completing the cycle and
returning the system to its initial configuration. Meaning, the removal
of the piston and detaching the load. Again the work for this can
be zero:
\begin{equation}
W_{rem}=0
\end{equation}

\end{enumerate}

\begin{figure}[H]
\noindent \begin{centering}
\includegraphics[scale=0.4]{\string"pics/classical sze\string".pdf}
\par\end{centering}

\caption{A description of the CSE cycle. (a) The box with the prepared particle,
is inserted with the piston. (b) The particle's position is determined.
(c) An isothermal quasi-static expansion in temperature $T$. (d)
The piston with the load are removed and the system returnes to the initial state.}
\end{figure}

Although the demon requires some work, we neglect it in our analysis
and concentrate only on the mechanical work of the engine. So the
total work for a cycle is: 
\begin{equation}
W_{tot}=W_{ins}+W_{exp}+W_{rem}=T_{bath}ln2\label{eq:2-1}
\end{equation}





\section{Quantum Szilard's Engine (QSE)}

In contrast with the CSE, in which the work for removal or insertion
of the piston could be neglected. In the QSE these operations change
the boundary conditions which effects the particles eigenvalues and
states.
\Dn

{\bf The system's model}

\Dn
The system is modeled using a hamiltonian for $N$ particles in a
box of size $L$ as in figure (2) $\mathcal{H} (\mathbf{r,p}; X,\alpha)$
which depends on two control parameters:

$X$ - the position of the piston.

$\alpha$ - the height of the potential barrier which constitutes
the piston.

The box is divided by the piston, in which case we can write:
\begin{equation}
Z_{n,N-n}(X)\equiv Z_{n}(X)Z_{N-n}(L-X)
\end{equation}

this describes the situation of $n$ particles to the left of the
piston and $N-n$ to the right, in a thermal equilibrium. Although
(6) formally depends on $\alpha$ and $X$, we usually omit
$\alpha$ in the calculations.

The processes are all quasi-static isothermal, so we can use (6) in all stages of the cycle. Assuming
such a process, we can use the \emph{maximum work principle }to calculate
the work between two equilibrium states:
\begin{equation}
W=-\Delta F=T\int_{X_{1}}^{X_{2}}\frac{\partial lnZ(X)}{\partial X}dX=T[lnZ(X_{2})-lnZ(X_{1})]
\end{equation}


As in the classical case, the QSE consists of 3 mechanical processes:

\Dn

{\bf Insertion}

\Dn

The state before the insertion is just that of an $L$ length box
with $N$ particles, could be thought of as a state where the piston
is just to the right of the box: 
\begin{equation}
Z(L)\equiv Z_{N}(X=L)
\end{equation}


A piston is inserted isothermally at $X=l$. Because the insertion
divides the system into a random number of particles on each side,
we define $N+1$ different configurations according to the number
of particles to the left of the piston. when the piston is inserted
the measurement is not performed yet, so we cannot know in which specific
configuration the system is in. Thus the total partition function
after the insertion: 
\begin{equation}
Z(l)\equiv\sum_{n=0}^{N}Z_{n,N-n}(l)=\sum_{n=0}^{N}Z_{n}(l)Z_{N-n}(L-l)
\end{equation}


According to (7), the work for insertion is:
\begin{equation}
W_{ins}=T[lnZ(l)-lnZ(L)]=Tln\left(\frac{Z(l)}{Z(L)}\right)\label{eq:3}
\end{equation}
\Dn
{\bf Expansion}

\Dn

In each $n$'th configuration the piston will undergo an isothermal
quasi-static expansion until it reaches the equilibrium position -
$l{}_{n}$, different for each $n$, which satisfies the force balance
condition:
\begin{equation}
\left\langle \frac{\partial\mathcal{H}}{\partial X}\bigg|_{X=l_{n}}\right\rangle =0
\end{equation}


The work obtained by expansion for each $n$ is: 
\begin{equation}
W_{exp}^{(n)}=T[lnZ_{n,N-n}(l{}_{n})-lnZ_{n,N-n}(l)]=Tln\left(\frac{Z_{n,N-n}(l_{n})}{Z_{n,N-n}(l)}\right)\label{eq:4}
\end{equation}


This will not give us much useful information, because the engine
performs many cycles, each with a different configuration. But we
can take the average to calculate the expansion work:
\begin{equation}
W_{exp}\equiv\sum_{n=0}^{N}p_{n}W_{exp}^{(n)}=T\sum_{n=0}^{N}p_{n}Tln\left(\frac{Z_{n,N-n}(l_{n})}{Z_{n,N-n}(l)}\right)\label{eq:5}
\end{equation}

where 
\begin{equation}
p_{n}=\frac{Z_{n,N-n}(l)}{\sum_{n'}Z_{n',N-n'}(l)}
\end{equation}


is the probability of measuring $n$ particles to the left of the
piston.

In reality the piston is not impenetrable, and has a finite potential
height, $\alpha_{\infty}$, which is assumed to be high enough to
satisfy $\tau_{tun}\gg\tau$. Meaning, the tunneling time $\tau_{tun}$
is much larger than any thermodynamic process time $\mbox{\ensuremath{\tau}}$.
This insures that the particles distribution $p_{n}$ is well defined. 
\Dn

{\bf Removal}

\Dn

We start with the piston at $X=l_{n}$. The removal process is divided
into two sub-processes:
\begin{enumerate}
\item We start the removal while the piston still satisfies the no-tunneling
condition $\tau_{tun}>\tau$, until it reaches a certain height $\alpha_{0}$
where $\tau_{tun}\approx\tau$. In this case for a quasi-static process
$\tau\rightarrow\infty$ we get:
\begin{equation}
\alpha_{0},\,\alpha_{\infty}\rightarrow\infty
\end{equation}

or equivalently 
\begin{equation}
(\alpha_{\infty}-\alpha_{0})\rightarrow0
\end{equation}

in this stage the work vanishes:
\begin{equation}
\int_{\alpha_{\infty}}^{\alpha_{0}}\frac{\partial lnZ_{n,N-n}(l{}_{n})}{\partial\alpha}d\alpha=0
\end{equation}

\item The second sub-process starts where the piston at height $\alpha_{0}$.
At this point, due to tunneling every eigenstate is delocalized over
both sides. In this case there is no definite value of $n$ particles
on the left side. To find the partition function we need to sum over
all possible configurations of particles for a specific equilibrium
position of the piston:
\begin{equation}
Z(l_{n})\equiv\sum_{n'=0}^{N}Z_{n',N-n'}(l_{n})
\end{equation}

Notice the summation is over the number of particles to the left,
because we want to include all the possibilities of particle distribution
due to tunneling.
\end{enumerate}

from (7) and (17) we get (for each $n$):
\begin{equation}
W_{rem}^{(n)}=T\int_{\alpha_{\infty}}^{\alpha_{0}}\frac{\partial lnZ_{n,N-n}(l{}_{n})}{\partial\alpha}d\alpha+T\int_{\alpha_{0}}^{0}\frac{\partial lnZ(l{}_{n})}{\partial\alpha}d\alpha=Tln\left(\frac{Z(L)}{Z(l_{n})}\right)
\end{equation}


and the average is:
\begin{equation}
W_{rem}\equiv T\sum_{n=0}^{N}p_{n}ln\left(\frac{Z(L)}{Z(l_{n})}\right)
\end{equation}

\begin{figure}[H]
\noindent \begin{centering}
\includegraphics[scale=0.3]{\string"pics/quantum sze\string".pdf}
\par\end{centering}

\caption{An example of a QSE cycle for 3 particles. (a) The prepared system
is inserted with the piston, and (b) the number of particles on one
of the sides is measured, which creates a specific configuration. (c) The isothermal quasi-static
expansion continues until it reaches the equilibrium position.}


\end{figure}

{\bf The total work}
\Dn

Combining all the contributions, the work performed by the engine
in one cycle is:
\begin{equation}
W_{tot}=W_{inc}+W_{exp}+W_{rem}=-T\sum_{n=0}^{N}p_{n}ln\left(\frac{p_{n}}{f_{n}}\right)\label{eq:8}
\end{equation}

where
\begin{equation}
f_{n}\equiv\frac{Z_{n,N-n}(l_{n})}{\sum_{n'}Z_{n',N-n'}(l_{n})}
\end{equation}

\section{Some Particle Models}

{\bf The one particle case}

\Dn

Consider a particle with mass $M$ in a box of size $L$, the piston
is inserted at $l=L/2$. Obviously $p_{0}=p_{1}=1/2$. During the
removal we have two possibilities: 
\begin{enumerate}
\item If the particle was measured to the right $l{}_{0}=0$, meaning no
particles to the left will be found: $f_{0}=1$.
\item If the particle was measured to the left $l{}_{1}=L$, meaning there
will absolutely be a particle to the left: $f_{1}=1$.
\end{enumerate}
this can also be seen from the fact that $Z(l{}_{n})=Z_{n,N-n}(l{}_{n})$.
Inserting these values into (\ref{eq:8}) we get $W_{tot}=Tln2$,
the same as the classical result!

The difference arises when each stage is analyzed separately. The
energy $E_{r}(X)=\frac{\pi^{2}r^{2}}{2MX^{2}}$, and the partition
function for one particle is $Z_1(X)=\sum_{r=1}^{\infty}e^{-\beta E_{r}(X)}$:
\begin{enumerate}
\item The work for Insertion:
\begin{eqnarray}
W_{ins} & = & T[lnZ(L/2)-lnZ(L)]\\
 & = & T[ln(2Z_1(L/2))-lnZ_1(L)]\\
 & = & Tln2-\varepsilon
\end{eqnarray}


 where $\varepsilon\equiv Tln[\frac{Z_1(L)}{Z_1(L/2)}]$.
\item After averaging the cases $n=0,1$ we get: $W_{exp}=\varepsilon$.
\item The work for removal is obviously zero, the piston is at the edges
and doesn't effect the eigenstates: $W_{rem}=0$.
\end{enumerate}
In the end, only the difference between the work gained during expansion
and the work needed for insertion, gives us the net result.

\Dn
{\bf The two particles case}

\Dn
In the same setting as before we put two identical particles. $f_{0}=f_{2}=1$,
in these two cases both of the particles are are on the same side,
therefore the piston after expansion is at the edge.

For $n=1$ the piston does not move $l=l{}_{1}$, which means that $p_{1}=f_{1}$:
\begin{equation}
W_{tot}=-Tp_{0}lnp_{0}-Tp_{1}lnp_{1}=-2Tp_{0}lnp_{0}\label{eq:9}
\end{equation}


to get some insight we look at two limiting cases:

In the low temperature limit only the ground state is occupied, this
works for bosons but for fermions which cannot occupy the same state
(ignoring the spin) the work vanishes (The probability values taken from [1]): 
\begin{equation}
W_{tot}^{(bosons)}=\frac{2}{3}Tln3,\qquad W_{tot}^{(fermions)}=0\label{eq:11-2}
\end{equation}


However, in the high temperature limit the particles lose their indistinguishability
(can be distinguished by their state):
\begin{equation}
W_{tot}^{(bosons)}=Tln2,\qquad W_{tot}^{(fermions)}=Tln2\label{eq:11-2-1}
\end{equation}


similar to the one particle classical case.
\Dn

{\bf N particles classical ideal gas}
\Dn

We consider a one dimensional ideal gas of $N$ particles, For convenience
$l=L/2$ as before. The partition function for $n$ particles in a
box of width $X$ is: 
\begin{equation}
Z_{n}(X)=\frac{X^{n}}{\lambda_{T}n!}
\end{equation}


The probability of finding $n$ particles (after the measurement)
to the left of the piston is given by 
\begin{equation}
p_{n}=\frac{1}{2^{N}}\binom{N}{n}
\end{equation}

this can be derived by substituting (29) into (14). We have only left to find the value of $f_{n}$:

\begin{eqnarray}
f_{n} & = & \frac{Z_{n,N-n}(l{}_{n})}{\sum_{n'}Z_{n',N-n'}(l_{n})}\\
 & = & \frac{Z_{n}(l_{n})Z_{N-n}(L-l_{n})}{\sum_{n'}Z_{n'}(l_{n})Z_{N-n'}(L-l_{n})}\\
 & = & \frac{\binom{N}{n}\left(l_{n}\right)^{n}\left(L-l_{n}\right)^{N-n}}{\sum_{n'}\binom{N}{n'}\left(l_{n}\right)^{n'}\left(L-l_{n}\right)^{N-n'}}\\
 & = & \binom{N}{n}\frac{\left(l_{n}\right)^{n}\left(L-l_{n}\right)^{N-n}}{L^{N}}
\end{eqnarray}


from here we find the ratio in (21):
\begin{equation}
\frac{p_{n}}{f_{n}}=\frac{L^{N}}{\left(l_{n}\right)^{n}\left(L-l_{n}\right)^{N-n}}\label{eq:11}
\end{equation}


and the total work is:
\begin{equation}
W_{tot}=\frac{T}{2^{N}}\sum_{n=0}^{N}\binom{N}{n}ln\left(\frac{2^{N}\left(l_{n}\right)^{n}\left(L-l_{n}\right)^{N-n}}{L^{N}}\right)\label{eq:12}
\end{equation}

For an ideal gas the equilibrium position is $l_n = \frac{n}{N}L$ (can be found from the ideal gas equation), substituting into (36) we get:
\begin{equation}
W_{tot} = \frac{T}{2^{N}}\sum_{n=0}^{N}\binom{N}{n}ln\left(2^N \left(\frac{n}{N}\right)^n \left(1-\frac{n}{N}\right)^{N-n} \right)
\end{equation}

With some numerical calculation we can observe the behavior of the gas, as shown in figure (3):

\begin{figure}[H]
\noindent \begin{centering}
\includegraphics[scale=0.7]{\string"pics/graph\string".pdf}
\par\end{centering}

\caption{$W/T$ as a function of $N$, the number of particles: We see that for $N=1,2$ we have $W=Tln2$. For a larger number the work decreases until it reaches an asymptotic value $W=0.5025T$}

\end{figure}

\begin{thebibliography}{150}
\bibitem{1}
 http://prl.aps.org/epaps/PRL/v106/i7/e070401/qSZE\_supplement.pdf
\bibitem{2}
Takahiro Sagawa - “Quantum Szilard Engine”, Phys. Rev. Lett. 106.070401.
\bibitem{3}
Charles H. Bennett - “The Thermodynamics of Computation - a Review”, IBM Watson Research Center.
\bibitem{4}
Charles H. Bennett - “Demons, Engines and the Second Law”, Scientific American 257(5):108-116.

\end{thebibliography}








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} 
