{'fraction_non_alphanumeric': 0.026538397744236192, 'fraction_numerical': 0.011361751534251119, 'mean_word_length': 4.240764884832681, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Critical dynamics of two-replica cluster algorithms

The dynamic critical behavior of the two-replica cluster algorithm is studied. Several versions of the algorithm are applied to the two-dimensional, square lattice Ising model with a staggered field. The dynamic exponent for the full algorithm is found to be less than 0.4. It is found that odd translations of one replica with respect to the other together with global flips are essential for obtaining a small value of the dynamic exponent.


I. INTRODUCTION
The Swendsen-Wang (SW) algorithm and related cluster methods 1,2,3,4,5,6,7 have greatly improved the efficiency of simulating the critical region of a variety of spin models. The original SW algorithm can be modified to work for spin systems with internal symmetry breaking fields 8 . Spin models of this kind include the Ising antiferromagnet in a uniform field, the random field Ising model and lattice gas models of adsorption in porous media 9 .
The modification proposed in Ref. 8 is to assign Boltzmann weights depending on the net field acting on the cluster to decide whether the cluster should be flipped. Unfortunately, the modified SW algorithm is not efficient. The problem is that large clusters of spins usually have a large net field acting on them and are prevented from flipping by these fields. An algorithm for Ising systems with fields that avoids this problem was introduced by Redner, Machta, and Chayes 10,11 . In this two-replica cluster algorithm large clusters are constructed from two replicas of the same system and have no net field acting on them so that they may be freely flipped. The two-replica cluster algorithm has been applied to study the phase transition of benzene adsorbed in zeolites 9 and is more efficient than the conventional Metropolis algorithm for locating and simulating the critical point and the phase coexistence line. Combined with the replica exchange method of Swendsen and Wang 12 , the two-replica method has been applied to the random field Ising model 13 . The two-replica method is closely related to the geometric cluster Monte Carlo method 14,15,16 .
In this paper, we report on a detailed investigation of the dynamics of the two-replica cluster (TRC) algorithm as applied to the two-dimensional Ising ferromagnetic in a staggered field (equivalently, the Ising antiferromagnet in a uniform field). The TRC algorithm introduced in Ref. 10 has two components that are not required for detailed balance and ergodicity. We studied the contribution to the performance of the algorithm of these optional components. We find that the complete TRC algorithm has a very small dynamic exponent z < 0.4. However, we also find that this small value of z requires one of the optional components and that this component depends on a special symmetry of Ising model in a staggered field. This observation leads to the question of whether cluster methods exist for efficiently simulating more general Ising models with fields. We investigated other optional components for the algorithm but these do not lead to acceleration when fields are present. This paper is organized as follows. In Sec. II we introduce the Ising model in a staggered field and describe the TRC algorithm. In Sec. III we define the quantities to be measured and how errors are computed. In Sec. IV we present the results. The paper closes in Sec. V with a discussion.

A. Ising Model in a Staggered Field
The Hamiltonian for the Ising model in a staggered field is where the spin variables, σ i take the values ±1.
with r 0 any vector in the even sublattice. The Hamiltonian is also invariant under odd translations together with a global flip: with r 1 any vector in the odd sublattice. The basic idea of the two-replica cluster algorithm is to simultaneously simulate two independent Ising systems, σ and τ , on the same lattice and in the same field. Clusters of pairs of spins in this two-replica system are identified and flipped. In order to construct clusters, auxilliary bond variables are introduced. The bond variables {η ij } are defined for each bond < i, j > and take values 0 and 1. We say that < i, j > is occupied if η ij = 1. A bond < i, j > is satisfied if σ i = σ j and τ i = τ j . Only satisfied bonds may be occupied.
The two-replica algorithm simulates a joint distribution of the Edwards-Sokal 18 type for {σ i } and {τ i }, and {η ij }. The statistical weight X[σ, τ, η] for the joint distribution is where B is the standard Bernoulli factor, if the identification is made that p = 1 − e −4K .

B. Two-Replica Cluster Algorithms
The idea of the two-replica cluster algorithm is to carry out moves on the spin and bond variables that satisfy detailed balance and are ergodic with respect to the joint distribution of Eq. (4). The occupied bonds η define connected clusters of sites. We call site i an active site if σ i = τ i and clusters are composed either entirely of active or inactive sites. If a cluster of active sites is flipped so that σ ← −σ and τ ← −τ the factor G is unchanged. 3. Translate the τ replica by a random amount relative to the σ replica. If the translation is by an odd vector, all τ spins are flipped.
Step 1 of the TRC is similar to a sweep of the SW algorithm except that clusters are grown in a two-replica system rather than in a single replica and only active clusters are flipped. Note also that the bond occupation probability is p = 1 − e −4K for the TRC algorithm and p = 1 − e −2K for the SW algorithm. It is straightforward to show that Step 1 of the TRC algorithm satisfies detailed balance with respect to the joint distribution Eq.
(4). Since only active sites participate in Step 1 of the algorithm, the Metropolis sweep, Step 2, is required for ergodicity.
Step 3 contains the optional components of the algorithm: an even translation or an odd translation plus flip of one replica relative to the other. These moves are justified by the symmetries of the Ising model in a staggered field stated in Eqs.
(2) and (3). When we refer to the TRC algorithm without further specification, we mean the algorithm described by the Steps 1-3 above. In the foregoing we also study the TRC with only even translations or with only odd translations.
In the TRC algorithm we flip only active clusters but it is also possible to flip inactive clusters if a weight factor associated with the change in G is used. We call a flip of an active cluster to an active cluster (+− to −+ or −+ to +−) an active flip. The TRC algorithm with inactive flips is obtained by replacing Step 1 with the following: Step 1 ′ is by itself ergodic however it may be useful to add Metropolis sweeps and translations.

III. METHODS
We measured three observables using the TRC algorithm: the absolute value of the magnetization of a single replica, m; the energy of a single replica, E; and the absolute value of the net staggered magnetization for both replicas, s, where the definition of s is Note that the staggered magnetization is conserved by all components of the TRC algorithm except Metropolis sweeps and inactive flips. For each of these observables we computed expectation values of the integrated autocorrelation time, τ int and the exponential autocorrelation time, τ exp . From τ int , we estimated the dynamic exponent z.
The autocorrelation function for φ, Γ φφ (t) is given by, The integrated autocorrelation time for observable φ is defined by and the exponential autocorrelation time for an observable φ is defined by 19 In practice the limits in Eqs.
and choose the cutoff t * to be the smallest integer such that t * ≥ κτ int,φ , where κ = 6. We used the least-squares method to fit log Γ φφ (t/τ int,φ ) as a function of t to obtain the ratio of τ int,φ /τ exp,φ and chose a cut-off at t/τ int,φ = 5. We In our simulations, we divided the whole sample into m blocks where m is between 10 and 30.
For the data collected using the TRC algorithm, each block has a length l ≥ 10 3 τ int .
For the data collected using modifications of the TRC algorithm, each block has a length l ≥ 10 2 τ int . Data were collected for H = 0, 2 and 4 and for size L in the range 16 to 256.

IV. RESULTS
A. Integrated Autocorrelation Time Table I gives the integrated autocorrelation time using the TRC algorithm for the magnetization, energy and staggered magnetization. Table I is comparable to the Table in Ref. 10 but the present numbers are systematically larger, especially at the larger system sizes.
This discrepancy may be due to the sliding cut-off t * used here instead of a fixed cut-off at 200 employed in Ref. 10.  Tables II shows that odd translations together with global flips of one replica relative to another are essential to achieve small and slowly growing autocorrelation times when the staggered field is present.  The CPU time per spin on a Pentium III 450 MHz machine was also measured for the various algorithms and is listed in Table III for L = 80 . By considering a range of system sizes we found that the CPU time for one MC sweep of the TRC algorithm increases nearly linearly with the number of spins. The TRC algorithm is a factor of 3 slower than the Metropolis algorithm but this difference is more than compensated for by system size 80 by the much faster equilibration of the TRC algorithm. Even without odd translations, the TRC algorithm outperforms Metropolis for size 80.

B. Exponential Autocorrelation Time
The ratio of the integrated to exponential autocorrelation times was found to be nearly independent of system size over the range L = 16 to L = 256. We found that over this size For the whole range of L, logarithmic growth appears to give a somewhat better fit than a simple power law, particularly for the magnetization. Therefore, our results are consistent with z = 0 for the TRC algorithm. Under the assumption that the dynamic exponent is not zero, we also carried out weighted least-squares fits to the form AL z and varied L min , the minimum system size included in the fit. Figures 8, 9 and 10 show the dynamic exponent z for the magnetization, energy and staggered magnetization, respectively, as a function of L min using the TRC algorithm. Figures 11 and 12, show the dynamic exponent as a function of L min for the magnetization for the TRC with only even translations and only odd translations, respectively. In all cases except z int,m,even , the dynamic exponent is a decreasing function of L min . For the magnetization, z int,m appears to extrapolate to a value between 0.1 and 0.2 as L min → ∞ while for the energy and staggered magnetization, the dynamic exponent appears to extrapolate to a value between 0.3 and 0.4. The small value of the dynamic exponent requires that odd translations and flips are included in the algorithm.
From Fig. 11 it is clear that the dynamic exponent is near 2 for the TRC algorithm with only even translations. Table IV gives results of the weighted least squares fits for z for the smallest values of L min for which there is a reasonable confidence level. Since there is a general downward curvature in the log-log graphs, these numbers are likely to be overestimates of the asymptotic values.
Thus, we can conclude that the asymptotic dynamic exponent for the TRC algorithm is likely to be less than 0.4 and is perhaps exactly zero. The dynamic exponent is apparently independent of the strength of the staggered field. For the case of the SW algorithm applied to the two-dimensional Ising with no staggered field the best estimate is z = 0.25 ± 0.01 20,21 but the results are also consistent with logarithmic growth of relaxation times. The numbers for dynamic exponent for the SW appear to be smaller than for the TRC algorithm but this difference may simply reflect larger corrections to scaling in the case of the TRC .

V. DISCUSSION
We studied the dynamics of the two-replica cluster algorithm applied to the twodimensional Ising model in a staggered field. We found that the dynamic exponent of the algorithm is either very small (z ≤ 0.4) or zero ( τ ∼ log L) and that the dynamic