Ensemble equivalence for distinguishable particles

Statistics of distinguishable particles has become relevant in systems of colloidal particles and in the context of applications of statistical mechanics to complex networks. When studying these type of systems with the standard textbook formalism, non-physical results such as non-extensive entropies are obtained. In this paper, we will show that the commonly used expression for the partition function of a system of distinguishable particles leads to huge fluctuations of the number of particles in the grand canonical ensemble and, consequently, to non-equivalence of statistical ensembles. We will see how a new proposed definition for the entropy of distinguishable particles by Swendsen [J. Stat. Phys. 107, 1143 (2002)] solves the problem and restores ensemble equivalence. We also show that the new proposal for the partition function does not produce any inconsistency for a system of distinguishable localized particles, where the monoparticular partition function is not extensive.


I. INTRODUCTION
The Gibbs paradox, namely, the entropy not being extensive for a classical ideal gas, is commonly resolved by adding an ad hoc term to the entropy, −k log(N !) or, using Stirling formula, −kN log(N/e), where N is the number of particles and k Boltzmann's constant. This term appears if one divides the number of available states by N !, the so-called "correct Boltzmann counting". Its physical justification is usually attributed to quantum mechanics and the indistinguishable nature of identical particles. This line of reasoning has led to the believe that it is not possible to understand classically the origin of the N ! term [1,2]. However, as early as 1921, Ehrenfest and Trkal [3] already argued that one must include the N ! term even for distinguishable particles (classical or non-identical quantum). The argument was retaken by van Kampen [4] and some controversy on how we must regard statistics and entropy of distinguishable particles has arisen in the last years in a series of papers by Swendsen [5][6][7] and Nagle [8,9], amongst others [10][11][12].
This topic turns out not to be just of academic interest, but appears to be relevant in current research, where the importance of distinguishable statistics has increased to a large degree. For example, when studying colloids one has to take into account that no two colloidal particles are exactly alike, with differences in the mass and shape of each particle, and they are, consequently, distinguishable between them. In such a case, the indistinguishability explanation of the Gibbs paradox fails resoundingly and we have to consider other possible alternatives [13,14] to explain experimental results with colloids. Another example is that of statistical mechanics of networks [15][16][17], where edges/links of the network can be considered as being particles and pairs of vertices/nodes as energy states, establishing a straightforward analogy with quantum physical systems. In this case, links correspond to individual identifiable actions and it seems very forced to regard them as indistinguishable [18]. This distinguishability of links becomes important for multi-edged networks (where a pair of nodes can have more than one link) when performing statistics and entropy measures [19].
In this paper we want to contribute to this topic by discussing the issue of ensemble equivalence. The problem appeared to us [20] when studying the grand canonical formalism of distinguishable particles (or network links). When using the common textbook expression of the partition function, anomalous fluctuations of the number of particles are obtained, leading to non-ensemble equivalence between the microcanonical/canonical and the grand canonical ensembles. The non-equivalence of ensembles casts doubts on the suitability of the statistical description. We will see how the inclusion of the N ! for distinguishable particles solves the problem and restores ensemble equivalence. Although it would seem that this inclusion should give non-extensive thermodynamic potentials for localized particles, we will show that this is not the case and the definition including the N ! term is consistent in all cases.
The paper is organized as follows: In section II we introduce the standard definitions of distinguishability, identical, etc., and other notation used in Statistical Mechanics, together with some simple Hamiltonian functions that will clarify those concepts. Section III presents the problem of ensemble equivalence for distinguishable particles, that arises when using the common textbook expression for the partition function and entropy. Finally, in section IV we explain how the definition of entropy introduced in [5] solves this problem for all the examples given in section II. We end with some conclusions in section V.

II. PRELIMINARY CONCEPTS
Indistinguishable particles are those described by a particle-exchange invariant set of microscopic states. If this invariance is not fulfilled, particles are called distinguishable.
In classical mechanics, a microstate for a system of N particles corresponds to a point in phase space of generalized coordinates { q i } and momenta { p i }. If the generalized coordinates and momenta of any two particles are exchanged, say 1 and 2 we obtain a different point in phase space (except for a set of points of zero measure). Consequently, in classical mechanics particle-exchange invariance never holds and particles are always distinguishable. This is independent on whether particles are identical or not. Identical particles are those whose Hamiltonian is invariant under the exchange of any two particles, This definition of identical particles also holds in quantum mechanics if we consider that the quantum Hamiltonian depends on operators associated to the generalized coordinates and momenta as well as on operators associated to internal degrees of freedom such as spin.
Furthermore, according to the quantum mechanics postulates, particles are indistinguishable if and only if they are identical, otherwise they are distinguishable. Particles are called non-interacting or ideal when it is possible to define monoparticular Hamiltonians h (i) ( q i , p i ), depending only on the generalized coordinates and momenta of one particle, such that the N -particle Hamiltonian is H = N i=1 h (i) . In the quantum case, the monoparticular Hamiltonian might include spin and other quantum internal degrees of freedom.
For quantum systems (independently on whether particles are ideal or not), it is possible to construct the state |ψ as a linear superposition of the eigenfunctions |l i of monoparticular Hamiltonians h (i) , defined as h (i) |l i = ǫ li |l i : -For distinguishable particles any state can be written as an unrestricted linear combination of elements of the product basis |l 1 |l 2 . . . |l N ≡ |l 1 , l 2 , . . . , l N . For an ideal system it is: H|l 1 , l 2 , . . . , l N = (ǫ l1 + · · · + ǫ lN )|l 1 , l 2 , . . . , l N .
-For indistinguishable particles one must use instead the suitably symmetrized or antisymmetrized basis or, alternatively, the second-quantization basis ||n 0 , n 1 , n 2 , . . . in terms of the occupation numbers n ℓ of individual levels ℓ. For an ideal system it is: In the ideal case, we can define the one-particle partition function Z (i) 1 associated to particle i. In the context of classical mechanics the definition is where T is the temperature and f i the number of degrees of freedom of particle i. The quantum counterpart is Non-interacting particles are said to be non-localized if the monoparticular partition function Z 1 fulfills and localized if it depends only on temperature Intuitively, localized particles correspond to those for which the eigenfunctions of the monoparticular Hamiltonian are localized in space. Examples being the infinitely-confining harmonic or infinite square well potentials in a finite region.
In order to fix ideas and to understand the concepts and definitions presented above, we will categorize the particles of four different Hamiltonians, whose statistics will be considered later. We restrict ourselves to the simplest examples (non-interacting particles) addressed in common textbooks of statistical mechanics. The results can be generalized to interacting particles as the nature of the problem addressed in this paper does not concern interactions. (i) In the first example, we consider a non-relativistic gas of non-interacting identical particles without any internal or rotational degrees of freedom and not subject to any external field. The Hamiltonian can be written as We will see later on that those kind of particles are non-localized. Classically, this is a system of identical, distinguishable, non-localized particles. The quantum version represents a system of identical, hence indistinguishable, non-localized particles.
(ii) The second example is the previous ideal gas but each particle having a different mass. This classifies the particles as non-localized, non-identical and, hence, distinguishable both in the classical and quantum version. The Hamiltonian is It can be considered as a crude representation of a system of colloidal particles, each one with a different mass.
(iii) The third example is a set of harmonic oscillators, each one oscillating around a different position a i This constitutes a system of non-identical, distinguishable, localized particles, both in the quantum and classical cases.
(iv) The final example is the statistics of paramagnetism, where we have a set of localized particles with magnetic Here h (i) loc is an infinitely-confining Hamiltonian which localizes the particles around particular points a i in space. Particles are then non-identical and distinguishable, both quantum and classically, despite the fact that the magnetic part of the Hamiltonian is invariant under particle exchange.

III. NON-ENSEMBLE EQUIVALENCE
In the canonical ensemble, thermodynamic properties follow from the calculation of the partition function. In the quantum case, this is defined as where |m are the eigenstates of the Hamiltonian and E m the energy eigenvalues. For classical systems, the definition is For ideal systems, the usual calculation [1,2] for distinguishable particles writes the partition function as Classically, this expression follows straightforwardly from H = N i=1 h (i) and, in the quantum case, from Eq.(5). In the classical case (but not in the quantum case), if particles are identical, this expression simplifies to The extension of Eq. (17) to quantum identical particles is non-trivial. While the exact calculation depends on whether the particles are fermions or bosons, an approximate result of general validity is obtained by replacing the factorial of the occupation number by n i ! ≈ 1 [21]. The validity of this approximation improves at high temperatures where the mean occupation number is small. This leads to: Quite generally, the partition function might depend on volume V , (inverse) temperature β and number of particles N . Its derivatives provide the internal energy U , entropy S, pressure P and chemical potential µ: In the grand canonical ensemble, the number of particles is allowed to fluctuate. The probability of finding N particles is given by with a grand canonical partition function defined as and z = e βµ . The average (observable) number of particles is The derivatives of the grand canonical partition function are: Ensemble equivalence tells us that we can use either the canonical or the grand canonical formalism and still obtain the same functional form for U (N, V, T ), S(N, V, T ), P (N, V, T ), µ(N, V, T ), provided we identify N with N and take the limit N → ∞. The physical basis of this equivalence relies on the fact that the probability p(N ) is heavily concentrated around its mean value N and hence this number can be identified as the physically measurable number of particles N . If this does not occur, ensemble equivalence is not justified and the whole building of Statistical Mechanics falls apart. A necessary condition for ensemble equivalence is that the fluctuations of the number of particles in the grand canonical ensemble, measured by the root-mean-square σ[N ], are vanishingly small compared to the average value N . This usually requires the thermodynamic limit: We will now show that ensemble equivalence does not hold if one uses the partition function given by Eq. (17) or Eq. (18), thus showing that those partition functions are not acceptable.
Let us take, for example, Eq. (18). The grand canonical partition function reads The geometric sum is convergent as, using Eq.(30) we obtain However, when calculating the probability of the number of particles N in the grand canonical ensemble, we obtain a geometric distribution with mean value and fluctuations: These huge fluctuations, as big as the average value, imply that the number of particles of the system is not well defined and, according to our discussion above, the partition function Eq. (17)  . Furthermore, we obtain a Poisson distribution for the number of particles, with mean value and fluctuations: Note that the relative fluctuations now vanish in the thermodynamic limit. Then, apparently, if we follow the usual textbook procedure we obtain ensemble equivalence only for indistinguishable particles.
The validity of Eq.(17) for classical non-localized particles (e.g. an ideal gas) where Z 1 ∝ V , is typically questioned because of the absence of extensiveness of the entropy Eq.(34), or intensiveness of the chemical potential, Eq.(36), and a term 1/N ! is added ad hoc to the partition function Eq. (16) or by arguing that quantum indistinguishability resolves the Gibbs paradox. The failure of this explanation is that it implies that for quantum non-identical, and consequently distinguishable, particles the correct partition function should be Eq.(17), leading to an entropy which is not extensive. Here, we have shown that Eq. (17) is incorrect for all cases as it leads to non-ensemble equivalence, an unacceptable result from a statistical point of view. The question now is, which partition function is correct for each classification of particles?

IV. CORRECT PARTITION FUNCTION
The answer to the previous question concerns very fundamental aspects of statistical mechanics, from the definition of entropy to the selection of a macrostate that only captures measures of macroscopic variables and we refer to [5][6][7] for a detailed discussion. The standard statistical expression of entropy is derived by considering one isolated system of N particles and internal energy E formed by two subsystems, 1 and 2, that can exchange energy and particles amongst them. The equilibrium condition is postulated to be that of a maximum for the probability for system 1 to have energy E 1 and number of particles N 1 . In order to recover the usual thermodynamic conditions for equilibrium, namely, equality of temperature, pressure and chemical potential, the entropy is defined (quantum) as where |m is a microstate, eigenfunction of the Hamiltonian and the number operator with energy E m and number of particles N m . Ω(E, N ) is the total number of those microstates with N particles and energy equal to E. In classical mechanics, the definition of entropy replaces the sum over microstates by an integral over phase space. The partition function for the canonical Z N and grand canonical Ξ ensembles follow from the definition of entropy [2]: However, Swendsen [5,7] claims that expressions Eq.(43), and consequently Eq.(44), are incorrect for distinguishable particles and that a new expression for the entropy is needed. He arguments, correctly in our opinion, that when writing the probability for system 1 to have energy E 1 and number of particles N 1 and equivalent E 2 , N 2 for system 2, one has to consider a multiplying factor N N1 = N ! N1!N2! , that counts the number of ways of selecting N 1 distinguishable particles out of N = N 1 + N 2 . In simple words, the macrostate specifies that you have N 1 distinguishable particles in the system but, since particles can be exchanged, it is not possible to know the identity of the particles. Consequently, the correct relation between statistics and thermodynamics for distinguishable quantum particles is whereas for distinguishable (identical or not) classical particles the partition functions are: We have shown in the previous section that when one applies Eqs.(44-45) to distinguishable particles, non physical results are obtained, both from the thermodynamic (non-extensiveness of the entropy for non-localized particles) and statistical (non-vanishing fluctuations) points of view. A macrostate of distinguishable particles with expression given by Eq.(43) would imply that you know exactly which particles are forming the system, which is incompatible from the very definition of a macrostate, and this is exactly what the binomial coefficient N N1 is preventing. Let us now work out the implications of the definitions Eqs.(46-48) for each one of the Hamiltonians introduced in section II.
A. Ideal gas of identical non-localized particles Using Eq.(48), the partition function of an ideal gas of classical distinguishable identical particles Eq. (11) is Note that the Gibbs paradox and huge fluctuations disappear immediately and classical distinguishability does not produce any incorrect prediction.

B. Ideal gas of non-identical non-localized particles
Similar ideas can be extended to the ideal gas composed by non-identical particles. A simple extension of the previous arguments leads to the fact that, again, the presence of the N ! factorial term in the definition of the partition function is necessary if one wants a consistent statistical description. For the sake of concreteness, we consider a system in which particles are not identical because they have different masses, e.g. a system described by the Hamiltonian Eq. (12). As the number of particles N is macroscopic it is not feasible to specify the masses of each and everyone of the particles. Instead, we introduce a probability density function (pdf) ρ(m) constructed from the histogram of all masses {m} ≡ (m 1 , . . . , m N ) in the system.
In the statistical-mechanics derivation of entropy we consider a situation in which particles can be exchanged between systems 1 and 2. We use the label n = 1, . . . , N N1 for each one of the different choices for N 1 particles in system 1 and N 2 in 2, and call {m} n 1 = (m i1 , . . . , m iN 1 ), {m} n 2 = (m iN 1 +1 , . . . , m iN ) the corresponding list of masses taken from {m} = (m 1 , . . . , m N ). Again, as both N 1 and N 2 are macroscopic, we construct the pdf's ρ n 1 (m) and ρ n 2 (m) from the lists {m} n 1 and {m} n 2 , respectively. The probability for system 1 to have energy E 1 and number of particles N 1 is .
For large N 1 , N 2 , N it is legitimate to assume that a vast majority of combinations n will lead to the same distributions ρ n 1 (m) = ρ n 2 (m) = ρ(m) and all the terms of sum Eq.(50) contribute equally: leading to definitions Eqs.(46-47). This method can be generalized for whatever Hamiltonian of heterogeneous particles (such as colloids), that could depend on properties such as moment of inertia, shape of the molecules, etc. The correct partition function for non-identical distinguishable particles reads which has extensive entropy and vanishing fluctuations. Note here that Eq.(52) is exact for classical and quantum mechanics, and there is no need to resource to the Boltzmann approximation. If we choose ρ(x) = δ(x−m), we recover (49) which is known to be exact for classical particles, but only an approximation for quantum systems. The limit of identical quantum particles is a singular one. By this we mean that, for quantum mechanics there is a discontinuity in considering the masses of the particles identical or not, because the Hamiltonian of the system is invariant under particle exchange or not, there is not a continuous transition there. Special attention deserves the case of a system with two (or more) macroscopically observable types of particles, A and B. This is represented by a bimodal distribution of masses: where N A is the number of particles of type A and N B of type B. Here ρ A (m) and ρ B (m) are non-overlapping distributions, peaked, respectively, around masses m A and m B .
The probability Eq.(51) and the partition function Eq.(52) describe a system with a constant proportion of particles A and B. This means that when the number of particles N 1 in subsystem 1 is fixed, we automatically fix the number of particles of A and B in this subsystem as . This is the situation for a system that, macroscopically, is not allowed to exchange particles selectively, i.e. no selective membranes. If one is interested in a situation in which the number of particles N 1A and N 1B can change independently at the macroscopic level, it is necessary to consider a macrostate that specifies not only the total number of particles of the system N 1 , but the number of each type N 1A , N 1B , keeping N 1A + N 1B = N 1 , and calculate its probability p 1 (E 1 , N 1A , N 1B ). Rewriting Ω 1 (E 1 , N 1 , ρ n 1 (m)) = Ω 1 (E 1 , N 1A , N 1B , ρ A (m), ρ B (m)) (we again assume that each one of the possible combinations n leads to a same distribution of masses for A and B), and splitting the N N1 configurations according to the value of NA N1A NB N1B , Eq.(50) becomes Using the probability function p 1 (E 1 , N 1A , N 1B ) to derive the appropriate expression for the entropy and the partition function, we obtain Note the presence of the terms N A !, N B !, which will ensure that fluctuations of the number of particles N A and N B in the grand canonical ensemble vanish in the thermodynamic limit.

C. Localized particles
It would appear that the new definition brings problems in the case of localized distinguishable particles since the entropy and other thermodynamic potentials derived from Eq.(47-48) appear to be non-extensive, at least in the ideal case where Z 1 ∝ V 0 . We will now argue that this is not the case.
For localized particles, e.g. those described by the Hamiltonians Eq.(13) and Eq. (14), we face the same conceptual problem than before: a macrostate cannot include the detailed location of each and every particle { a i }. Let us assume that there exists a set M ≥ N of available locations. A microstate of the system can be written as linear combination of the basis where a i is the actual location of the particle for this microstate, and ℓ i is its monoparticular level. The energy of each level can be obtained solving h (i) |ℓ i = ǫ ℓi |ℓ i ǫ ℓ = ℓ + 1 2 ω, ℓ = 0, 1, . . . (Harmonic oscillators 1d), where µ B is the Bohr magneton, g is the Landé g-factor and J is the total angular momentum of the particles and, in the paramagnetic case, we have neglected the contribution from h (i) loc to the energy. The macroscopic description can not specify the location of each particle. Therefore, when calculating the partition function Eq.(47), we have to consider the count over the ways N distinguishable particles can be placed in M locations, i.e.
The monoparticular partition function for the cases of interest is (Harmonic oscillators), where x = βgµ B JB. The partition function in the grand canonical ensemble is We can now prove ensemble equivalence. Using the standard relations, both the canonical and grand canonical ensembles (identifying N and N ) lead to where α = N/M . Note that despite being Z 1 ∝ V 0 , the entropy is extensive while the chemical potential keeps its intensiveness if we consider that the number of available locations M is itself extensive and thus α = O(1). The probability of the number of particles follows now a binomial distribution whose fluctuations vanish in the thermodynamic limit, restoring ensemble equivalence. The particular case typically considered in textbooks is N = M , i.e. the number of available locations equal to the number of particles, brings no further problems as in this case, we simply recover Eqs.(33-35). Note, however, that in such a case, it is impossible for the system to include more particles and, consequently the chemical potential µ → ∞ as α → 1. In the same limit in the grand-canonical ensemble it is p(N ) → δ(N − M ) and fluctuations become exactly zero σ[N ]/ N = 0.

V. CONCLUSIONS
We have shown that the common textbook expression of the partition function of a system of distinguishable particles which does not include the N ! term, leads to abnormally large fluctuations of the number of particles in the grand canonical ensemble. This occurs independently on whether particles are classical or quantum, localized or non-localized. The large fluctuations go against the postulates of statistical mechanics, which require that the relative fluctuations of the number of particles in the grand canonical ensemble vanish in the thermodynamic limit, such that it is possible to identify the mean value of the number of particles as the physically measurable N and ensure ensemble equivalence.
As argued by Swendsen [5], the correct partition function (including the N ! term) for distinguishable particles is obtained from the statistical derivation of entropy and the selection of a macrostate that only captures macroscopic measurements. We have tested this expression of the partition function with some common examples of distinguishable particles that include: an ideal gas of classical identical particles, an ideal gas of classical or quantum non-identical particles (where each particle holds a different mass), a set of harmonic oscillators and the statistics of paramagnetism. For the ideal gas of non-identical particles, we have discussed the derivation of the correct partition function for a unimodal and bimodal distributions of mass. We have also shown that the new proposal for the partition function does not produce any inconsistency for a system of localized particles, where the monoparticular partition function is not extensive Z 1 ∝ V 0 . The thermodynamic potentials obtained for all the examples fulfill the corresponding extensiveness properties and the fluctuations of the number of particles in the grand canonical ensemble vanish in the thermodynamic limit, restoring ensemble equivalence.