{'fraction_non_alphanumeric': 0.03593406593406594, 'fraction_numerical': 0.01010989010989011, 'mean_word_length': 4.881301163291685, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thermodynamic large fluctuations from uniformized dynamics

Large fluctuations have received considerable attention as they encode information on the fine-scale dynamics. Large deviation relations known as fluctuation theorems also capture crucial nonequilibrium thermodynamical properties. Here we report that, using the technique of uniformization, the thermodynamic large deviation functions of continuous-time Markov processes can be obtained from Markov chains evolving in discrete time. This formulation offers new theoretical and numerical approaches to explore large deviation properties. In particular, the time evolution of autonomous and non-autonomous processes can be expressed in terms of a single Poisson rate. In this way the uniformization procedure leads to a simple and efficient way to simulate stochastic trajectories that reproduce the exact fluxes statistics. We illustrate the formalism for the current fluctuations in a stochastic pump model.


I. INTRODUCTION
Many natural phenomena are successfully described at the mesoscopic level in terms of Markovian random processes [1][2][3]. Examples of such jump processes range from birth-and-death processes in stochastic chemical kinetics and population dynamics [2,3] to kinetic processes in quantum field theory [4] and in quantum optics [5]. In some simple systems, such processes can be rigorously derived from the underlying deterministic or quantum dynamics by introducing an appropriate partition of the phase space [6] or in some scaling limit [7].
The study of these continuous-time Markov processes remains, however, challenging. The so-called uniformization technique [8] has been introduced to help the analysis of such continuous-time processes. The uniformization procedure transforms a continuous-time Markov process into a discrete-time Markov chain, facilitating all subsequent analysis. The term uniformization comes from the fact that the original continuous-time process can be reinterpreted as involving an homogeneous Poisson process along with transitions described by the derived Markov chain. This scheme is especially used for the study of the transient properties of the dynamics, but it can also be applied to study other important quantities such as first-passage times [9,10]. Uniformization has also been used to simulate the behavior of complex systems such as chemical reaction networks [11,12] or evolutionary models [13]. Interestingly, a similar approached was developed in the context of quantum dynamics [14][15][16][17], where Poisson processes provide a generalization of the Feynman-Kac formula [18,19] to quantum systems with discrete internal degrees of freedom.
Fundamental properties of stochastic and deterministic dynamical systems can be expressed in terms of large deviation functions, which characterize the occurrence of rare fluctuations or extreme events in random systems. In this framework trajectories are categorized by dynamical order parameters such as the number of configuration changes. Analogous to the partition function in equilibrium statistical mechanics, the large deviation function is a measure of the number of trajectories accessible to the system. Critical phenomena such as scale invariance of trajectories or dynamical phase transitions can be uncovered from the knowledge of the large deviation function. In addition, it gives access to the statistical properties (averages and fluctuations) of the dynamical order parameters. In this sense large deviations can be said to capture the fine details of the dynamics.
Landford [20] was the first to formulate equilibrium statistical mechanics in terms of large deviations, where they provide a generalization of Einstein's fluctuation theory and allow the calculation of entropies and free energies. Large deviations were next considered in nonequilibrium statistical physics by Ruelle and Bowen in their analysis of the dynamical properties of chaotic systems [21]. This formalism was further developed to relate the dynamical properties of these systems to their transport properties [6]. In this way large deviations provide a rigorous formulation of statistical mechanics, as reviewed in Refs. [22,23]. More recently, relations known as fluctuation theorems [24][25][26][27] (see [28] for a review) revealed that thermodynamical quantities obey symmetry relationships when accounting for the large fluctuations in the time evolution (rare trajectories). Large deviation relations thus play a fundamental and unifying role in characterizing the dynamical and statistical properties of equilibrium and nonequilibrium systems [23].
The dissipation rate and the thermodynamic currents play an important role in nonequilibrium statistical thermodynamics [2,3]. The dissipation is related to the irreversible entropy production and the efficiency of free energy conversion into useful work. The thermodynamic currents describe the fluxes of matter or energy flowing through the system. Their response and fluctuation properties are therefore of fundamental interest, especially, for the exploration of nanoscale systems.
In this paper we introduce the uniformization procedure of continuous-time Markov processes and show that it can be applied to recover the large deviation functions. We illustrate the construction for two thermodynamic quantities of interest, the dissipation rate [24,25,[29][30][31] and the thermodynamic currents [33,34]. We then analyze the time evolution of autonomous and non-autonomous systems. We obtain a formulation in terms of a single Poisson process, which offers new insights at the theoretical and numerical levels. In particular, we show that the simulation of time-dependent systems such as stochastic pumps can be achieved in a effortless and efficient way.

II. MARKOV PROCESSES AND UNIFORMIZATION
Continuous-time Markov processes are ruled by an evolution equation, called the master equation, for the probability to find the system in a coarse-grained state j at time t: The quantities W ij denote the rates of the transitions i → j allowed by the dynamics. The master equation can be written in matrix form as dp(t) dt = p(t)L where we introduced the operatorL with elementsL ij = W ij for i = j andL ii = − j W ij otherwise. Under general assumptions [3] the system evolves towards a unique stationary state p st satisfying dp st /dt = 0. The concept of uniformization of a Markov process has been introduced to help the sudy of such continuous-time random processes [8]. It transforms the continuous-time process into another system evolving in discrete time while preserving many key properties of the dynamics. The construction proceeds as follows.
Introducing the inverse time step we define the transition matrixÛ (β) byÛ ij = W ij /β for i = j, andÛ ii = 1 − j W ij /β otherwise. In matrix form it readsÛ whereÎ is the identity matrix. It is readily verified thatÛ (β) is a proper transition matrix, i.e. jÛ ij = 1 and U ij ≥ 0 for all i, j and all β ≥ max i |L ii |. The uniformized Markov chain thus evolves over the same state space {i} but in discrete time steps of size ∆t = 1/β, with the correspondance t = n × ∆t = n/β. For simulation purposes the time step ∆t should be chosen as large as possible, so that the optimal value of β satisfies the equality in Eq. (3).
The probability distribution π β (n) over the uniformized system evolves according to the discrete-time evolution equation Remarkably, the stationary state π st of the uniformized system exactly corresponds to the stationary state p st of the original system: p stÛ (β) = p st (Î +L/β) = p st so that π st = p st for all values of β.
The uniformization procedure thus provides a discrete-time formulation of the original dynamics that preserves the steady state distribution. It is not, however, an exact mapping of the dynamics as several other properties may depend on the parameter β (e.g., the topological entropy). In the next section we show how to relate the large deviation functions obtained from the original continuous-time process to those obtained from the uniformized system.

III. LARGE DEVIATION FUNCTIONS FROM UNIFORMIZED DYNAMICS
Large deviation functions play an increasingly important role in many different fields [23]. They describe the occurrence of rare events, that is the large fluctuations away from the mean behavior. Recent developments have highlighted symmetry properties in the large fluctuations of far-from-equilibrium thermodynamic quantities [28]. Here we study two such variables: the dissipation rate and the thermodynamic currents. We show that, in both cases, the generating functions obtained in continuous time can be exactly recovered from those arising in the discrete-time domain.
We first consider the dissipation rate S(t). S(t) is a fluctuating quantity measuring the dissipation occurring along a specific trajectory of the system. In the present context Its large deviation function I is defined as [35] Prob Instead of studying the large deviation function (7) directly, we develop our analysis at the level of the generating function, which is defined via the Legendre transform G(λ) = max ξ [I(ξ) − ξλ]. Alternatively, the generating function associated with equation (7) can be expressed as the limit The generating function allows us to obtain all cumulants of the dissipation by taking successive derivative with respect to λ: The vector g λ (t) satisfies the initial condition g λ (0) = p(0) for all λ and evolves according to [29] dg with the operatorL λ given byL Accordingly, the generating function (8) is given by minus the largest eigenvalue of the operatorL λ . Note that for λ = 0 we recover the evolution operatorL =L λ=0 for the probability distribution p(t).
We now consider the uniformized process (5). The analogue of the generating function (8) is defined as Similarly,Ḡ can be obtained as minus the largest eigenvalue of the operator In turn we recover the generator of the time evolution when λ = 0:Û =Û λ=0 .
To establish the connection between the generating functions (8) and (10), we derive the explicit relation between the eigenvalues µ n andμ n of the two processes. Using the relation (11) between the original and the uniformized process, we see that the eigenvalue equation reads This last expression reveals that if µ n is an eigenvalue of the original operatorL λ , thenμ n = µ n /β + 1 is an eigenvalue of the discrete-time evolution operatorÛ λ . Therefore all eigenvalues are simply scaled by a factor β and shifted by the unity. In addition, all eigenvectors can be verified to be strictly identical between the two processes [32]. We thus arrive at our main result: The generating function (10) of the uniformized system is related to the original generating function (8) by the linear transformationḠ The corresponding large deviation functions are thus related through the scalingĪ(ξ) = I(ξβ)/β. This result demonstrates that the large fluctuations can be exactly obtained from the discrete-time dynamics of the uniformized process. This simplifies many theoretical and numerical formulations, as will be discussed in the next sections. We next consider the thermodynamic currents, which measure the transport of matter and energy inside the system and their exchanges with the environment. They are expressed as where = ±1 if a transition contributes to the current in the positive or negative direction, respectively, and zero otherwise [33] (see also Section V). A similar derivation can be obtained for the generating function Q of the currents, leading toQ = Q/β + 1. This conclusion stems from the observation that the physical quantities of interest (entropy production, thermodynamic currents) do not affect the diagonal terms of the corresponding large deviation operators (no entropy and no currents are generated when no jumps occur). This strong correspondence is unanticipated. Indeed, the generating function (8) is equivalently expressed as a path integral over all possible trajectories: The probability of a trajectory reads and depends on the exact transition times (t 1 , t 2 , · · · , t n , · · · ). Thus, in principle, the large deviations should reflect the fine temporal structure (the time intervals between jumps, weighted by the corresponding factorsL ii ) of the continuous-time process. Now, in discrete-time, the probability of the same path reads π 0 iÛ ii+1 (β), irrespective of its temporal structure, while the dissipation is identical in both formulations (S = S). Yet, the result (14) shows that, in the discrete-time domain, the generating function is simply scaled by the discretization parameter β. In this sense, all information on the large deviations are contained in the discrete-time dynamics (5). More generally, all eigenvalues being closely related to those of the original process, we expect the continuous-and discrete-time dynamics to present strong connections. We explore this issue in the next section.

IV. FINITE-TIME DYNAMICS AND SIMULATION ALGORITHMS
In the previous section we demonstrated that the study of the large deviation functions can be performed using the discrete-time dynamics (5). These functions are defined in the infinite-time limit; here we further develop the link between the two descriptions and analyze the finite-time regime.
The detailed connection with the continuous-time evolution is accomplished through the following construction. The solution of the system (9) can be written as where we used that g λ (0) = p(0) in the first line, the relation (11) in the second line, and the commutativity of the identity operator in the third line. The last expression provides a robust way of numerically evaluating the finite-time generating functions [36]. Indeed, as opposed to the operatorL λ , the operatorÛ λ and its powersÛ k λ have non-negative elements only. This in turn implies that the last expression has no additions of numbers with opposite signs. This is an advantageous feature because additions of numbers with opposite sign increase round-off errors considerably [37].
A revealing interpretation of the previous formula can be gained from the following consideration. Recall that the time evolution of the probability distribution p(t) = g λ=0 (t) is recovered in the special case λ = 0. Introducing the number of transitions N (t) during the time interval [0, t], equation (18) with λ = 0 can be interpreted as where Prob[j, t|i, 0 and is the probability to be in state j at time t given the initial state i at time t = 0 and a number of transitions k occurring during the time interval t. The probability to observe a number of transitions N (t) = k during the time interval t reads i.e. it satisfies a Poisson process of mean βt. This formulation is remarkable for it implies that we can express the original stochastic process in terms of a single homogeneous Poisson rate. Alternatively, this Poisson distribution can be interpreted as arising from the sum of independent exponential distributions. In this case the system jumps to another state j with probabilityÛ ij (β) after a random waiting time exponentially distributed with mean 1/β, regardless of the current state i (hence the name uniformization). Building on this interpretation, we can devise alternative strategies to compute quantities of interest such as the transition probabilities p(t) or the generating function g λ (t). Indeed, we can sample the space of trajectories using the following algorithm:

Simulation algorithm for autonomous processes
(1) Generate a random number N sampled from a Poisson distribution of mean βt.
(2) Generate a random trajectory of length N according to the discrete-time processÛ (β). (21) ensure that this construction generates the correct probability distribution. Note that the present scheme completely bypasses the random exponential waiting times needed in the traditional formulation [38] while remaining exact. Equation (18) also guarantees that, for λ = 0, using these randomly generated trajectories leads to the exact generating function. In addition to its simplicity, the present algorithm uses an mean number of random numbers equal to 1 + βt to generate a trajectory of length t. In contrast, Gillespie's algorithm [38] requires 2t L random numbers in average, where L = (1/t) i |L ii | t 0 p i (τ )dτ is the mean waiting time between jumps. Accordingly, when the inverse time step β can be chosen such that β < 2 L the present formulation is expected to outperform Gillespie's algorithm.

Equations (19)-
Importantly, this algorithm can be generalized to encompass time-dependent Markov processes. Consider a time-dependent system described by an evolution operatorL(t) and choose β ≥ max i,t |L ii (t)|. Then the space of trajectories can be sampled by iterating the following steps: (1) Generate a waiting time τ exponentially distributed with a mean 1/β, independently of the current state i.

Simulation algorithm for non-autonomous processes
(2) Update the current time: t ← t + τ .
The total number of jumps is also given by the Poisson process (21), but here it is necessary to keep track of their exact timings due to the time dependence of the system. Note that the optimal value of β for simulation purposes is given by β = max i,t |L ii (t)| as it minimizes the number of steps needed to generate a trajectory. It can thus be directly estimated from the knowledge of the transition rates.
Remarkably this representation avoids the need to consider inhomogeneous, time-dependent waiting times. This feature is especially important as generating random numbers according to a distribution of the form |L ii (t)| exp[ t t0L ii (τ )dτ ] is difficult and approximate in most situations of interest (see next section). In contrast, step 1 only requires exponential random numbers. As shown in the Appendix, the same construction applies to the generating functions as well. We illustrate these exact simulation methods in the next section.

V. EXAMPLE: FLUXES IN STOCHASTIC PUMPS
In this section we illustrate our results on a model of stochastic pumping. Such models play an increasingly important role, e. g., in the study of molecular motors. They remain, however, very difficult to simulate stochastically due to their time dependence. We consider a model system motivated by an experiment by Leigh et. al. [40] and analyzed by Astumian [41] and Rahav et al. [42]. The system consists in thermally activated transitions among three states, depicted by the wells and energy levels in Fig. 1, with rates W ij = ke −β[Bij −Ei] . We will take k, β = 1 to set the units of time and energy. The system satisfies the Kolomogorov condition W 12 W 23 W 31 = W 13 W 32 W 21 and is thus assumed to be at equilibrium initially. Here we induce non-zero currents by periodically varying the temperature of the system: We consider the pumped flux induced by this temperature variation. Its fluctuations can be described by the moment generating function All moments of the pumped flux distribution can be obtained by calculating derivatives with respect to λ: The generating function (24) can be expressed as F λ = ||f λ || 1 in terms of the vector f λ satisfying whereĤ The quantity ij = − ji takes the value ±1 if the transition i → j generates a positive (negative) current, and zero otherwise [33]. We recover the time evolution operator for λ = 0:L =Ĥ λ=0 . We first perform stochastic simulations in the equilibrium state without time-dependent driving. The solid line in Fig. 2 shows the moment generating function of the integrated current Φ 12 (t = 10) = t=10 0 J 12 (τ )dτ , obtained by numerical integration of Eq. (26). The circles and pluses denote the results of 50000 random trajectories of length t = 10, sampled according to Gillespie's and the uniformized algorithm, respectively. Being exact, both approaches present an excellent agreement with the solution of the system (26). The average number of random numbers needed is, however, different. As discussed in the previous section, we expect the uniformized dynamics to outperform Gillespie's algorithm when the waiting times have the same order of magnitude. For this set of parameters, the ratio between the largest and the lowest waiting time is around 3. Yet, Gillespie's algorithm requires 2 L ≈ 0.5996 random numbers per unit time and per trajectory, which is larger than β ≈ 0.5335 for the uniformized dynamics.
We now turn to the situation in presence of the time-dependent driving (22), for which we observe a drastic difference between the two approaches. We implemented the simple time-dependent uniformized algorithm described in Section IV, while the time-dependent Gillespie algorithm was implemented as follows. When the system is in state i at time t, a random transition time τ > t is generated according to the distribution To sample this time-dependent distribution, we generate a uniform random number r between [0, 1] and solve the equation P i (t; τ ) − r = 0. Note that finding the zero of this equation involves a finite number of evaluation of the functions P , which in turn implies the evaluation of that many integrals. Finally, we update the current time (t ← τ ) and select a new state j = i with probabilityL ij (t)/|L ii (t)| . We show in Figure 3 the generating function F λ (T ) after one cycle. Here also, both algorithms display a similar degree of accuracy. Their computational cost is, however, very different, as revealed in Table I. Although the uniformized algorithm requires more transitions in average, Gillespie's algorithm requires the generation of random numbers following distributions of the form (27), which is a computationally intensive task. For this reason, the uniformized algorithm was running > 300 times faster than Gillespie's algorithm [39]. Changing the parameters always lead to comparable improvements.
A similar improvement is expected for many non-autonomous systems. In such systems, the computational bottleneck is the generation of random numbers following time-dependent distributions of the form (27). This requires finding the zero of an equation, whose evaluation requires the calculation of integrals, for each transition. In contrast the uniformized algortithm only requires exponential random numbers, providing a more straightforward and efficient implementation.

VI. CONCLUSIONS
We have described a mapping from general continous-time Markov processes to discrete-time Markov chains that presents several key features. First, all eigenvectors of the original dynamics, including the steady state, are strictly preserved. Second, all eigenvalues are related by a linear transformation. Third, it offers an interpretation of the time evolution in terms of a single homogeneous Poisson rate (uniformization).
We have demonstrated that this uniformization procedure also preserves the generating functions of the original process. In particular, we have analyzed the generating functions of the dissipation rate and of the thermodynamic currents. More generally, this conclusion will hold true for all physical quantities that only vary during the transitions between states of the system. Although the generating functions evolve according to generalized operators that do not present a transition matrix structure, the time-discrete dynamics preserves the associated generalized eigenvectors while the eigenvalues are related via a linear transformation. Thus, for the purpose of studying generating functions, it is sufficient to focus on the uniformized dynamics exclusively.
This framework provides important simplifications for the theoretical and numerical analysis of large deviation functions. In particular, it allows the implementation of efficient numerical techniques to study the dynamics and fluctuations of Markov processes. We have illustrated the derived simulation algorithms on a model of stochastic pumping. The fluxes pumped by a time-dependent driving have a considerable importance in many applications but their stochastic simulation has remained a challenge. As we have shown, the present approach offers important advantages both at the level of simplicity and efficiency, especially, for non-autonomous systems. Remarkably, we have observed a two-order of magnitude improvement in the simulation of a stochastic pump. This approach thus provides a powerful tool to study ratchets and pumps [43] and, more generally, all time-dependent systems such as temperature-programmed desorption experiments [44] or driven quantum dots [45].
Theoretical insights can also be gained from this formulation. For instance, it reveals that the temporal aspect of continous-time trajectories -even for inhomogeneous processes -does not contain information on the large deviation functions. To explore the scope of this conclusion, the next natural step is to consider semi-Markovian processes for which the waiting times between jumps exhibit arbitrary distributions. In this case the generating function is given by the solution of an equation involving the Laplace transforms of the waiting time distributions [46]. However, when the waiting times are not exponentially distributed (i.e., the non-Markovian case), this equation cannot be written as an eigenvalue problem any longer. As a result, even tough some uniformization procedure can be derived in this case as well [47], the generating functions cannot be obtained from any discrete-time dynamics. In this situation the generating functions are shaped by the precise form of the waiting time distributions, even for homogeneous processes. The present approach thus provides a systematic way to disentangle the contributions of the non-Markovianity to the large deviation functions.

VII. APPENDIX
In this appendix we extend the uniformization procedure for non-autonomous processes [48] to the case of the generating function operator. We consider a time-dependent Markov process characterized by an evolution operator L(t). The vector g λ (t) evolves according to withL λ (t) = W 1−λ ij (t)W λ ji (t) if i = j and − j W ij (t) otherwise. Due to the non-commutativity of the operatorL(t) at different times, the solution to this evolution equation is expressed as the Peano-Baker series [49] g λ (t) = p(0) ∞ k=0 t 0 ds 1 t s1 ds 2 · · · × t s k−1 ds kLλ (s 1 )L λ (s 2 ) · · ·L λ (s k ) .
Introducing β ≥ max i,t |L ii (t)| the operatorÛ (t) =Î +L(t)/β defines a transition matrix at all times. Its continuation for λ = 0 readsÛ and describes the evolution of the moment generating function. Substituting formula (30) into the series (29) and using that t 0 ds 1 t s1 ds 2 · · · t s k−1 we obtain, after some manipulations, This expression has the following interpretation. The terms e −βt (βt) k /k! are Poisson probabilities. The integration accounts for all possible sets of time points at which events in the Poisson process can take place. The term k!/t k corresponds to the density introduced by the Poisson process, for which the probability density of k events is uniformly distributed in the interval [0, t]. Expressing the Poisson probabilities as the sum of independent exponential random times of mean 1/β we deduce the simulation algorithm presented in main text. Moreover, expression (32) implies that the generating function will be adequately sampled.