Classical stochastic dynamics and continuous matrix product states: gauge transformations, conditioned and driven processes, and equivalence of trajectory ensembles

Borrowing ideas from open quantum systems, we describe a formalism to encode ensembles of trajectories of classical stochastic dynamics in terms of continuous matrix product states (cMPSs). We show how to define in this approach ‘biased’ or ‘conditioned’ ensembles where the probability of trajectories is biased from that of the natural dynamics by some condition on trajectory observables. In particular, we show that the generalised Doob transform which maps a conditioned process to an equivalent ‘auxiliary’ or ‘driven’ process (one where the same conditioned set of trajectories is generated by a proper stochastic dynamics) is just a gauge transformation of the corresponding cMPS. We also discuss how within this framework one can easily prove properties of the dynamics such as trajectory ensemble equivalence and fluctuation theorems.

Borrowing ideas from open quantum systems, we describe a formalism to encode ensembles of trajectories of classical stochastic dynamics in terms of continuous matrix product states (cMPSs).We show how to define in this approach "biased" or "conditioned" ensembles where the probability of trajectories is biased from that of the natural dynamics by some condition on trajectory observables.In particular, we show that the generalised Doob transform which maps a conditioned process to an equivalent "auxiliary" or "driven" process (one where the same conditioned set of trajectories is generated by a proper stochastic dynamics) is just a gauge transformation of the corresponding cMPS.We also discuss how within this framework one can easily prove properties of the dynamics such as trajectory ensemble equivalence and fluctuation theorems.

I. INTRODUCTION
In this paper we describe a formalism that allows, given some classical stochastic Markovian dynamics [1], to encode the whole set of trajectories together with their probabilities of occurring-the trajectory ensemble-in terms of matrix product states (MPSs) [2].As we explain below, this approach enables to derive in a compact and concise way many (known) properties of trajectory ensembles associated to dynamical large-deviations [3][4][5][6] and non-equilibrium fluctuations [7,8].
As originally conceived [2], MPSs correspond to a variational class of quantum states much used to describe properties of one-dimensional quantum systems with low entanglement, such as ground states of quantum spin chains away from a quantum phase transition point.In this context, the physical space is the one-dimensional space where the system lives, for example a one dimensional lattice of sites containing the spins.An MPS is then constructed as a superposition of basis states on the physical space (say classical or Fock states) where the amplitudes are given by the matrix elements of products of matrices that act on an auxiliary or "bond space".The scope of the variational class is determined by the dimension of the bond space, and when this auxiliary dimension is large enough quantum states can be described accurately via MPSs.In this same spirit, the stationary distributions of certain one-dimensional classical stochastic processes can be described exactly in terms of MPSs with infinite bond dimension, most notably in the case of the simple exclusion process [9,10].
More recently, MPSs have been extended [11,12] to account for one-dimensional systems which live in the continuum, that is for one-dimensional quantum fields.This generalisation, termed continuous matrix product states (cMPSs), can be thought of as a limit of MPSs where the lattice spacing of their physical space tends to zero; see [11,12] for details.Interestingly, cMPSs have an alternative interpretation [11,13] in terms of the input-output formalism [14] for open quantum sys-tems (i.e., quantum systems interacting with an environment) undergoing continuous quantum Markovian dynamics.In this interpretation the bond space is the physical space where the system lives, and the continuous one-dimensional space is the "output", a time record of the interaction between system and environment.It is possible in this way to represent the whole ensemble of quantum trajectories of the open system as a cMPS.This MPS approach can be then extended for the application of large-deviation methods to describe and characterise open quantum dynamics [15,16].
Here we adapt these ideas to classical stochastic dynamics (for concreteness we focus on dynamics described by continuous time Markov chains).We show that one can encode ensembles of classical trajectories in terms of cMPSs which, in contrast to the quantum case, are real rather than complex vectors.A single cMPS then encodes all possible trajectories of the dynamics and their probabilities of occurring.These cMPSs can be generalised to account for biased or conditioned trajectory ensembles [6,17,18], i.e., sets of trajectories whose probabilities are altered from those of the natural dynamics according to some condition on trajectory observables.These conditioned ensembles are of interest  as they characterise information about fluctuations of the dynamics away from typical behaviour.For certain forms of conditioning, biased trajectory ensembles can be generated by some (tilted) operator, but in general this operator is non-stochastic (in the sense it does not conserve probability).An important question is how to relate a conditioned trajectory ensembles to one generated by some other properly stochastic dynamics, termed the "auxiliary" or "driven" ensemble [3,4,6].The mapping between conditioned and driven ensembles is the so-called generalised Doob transform [6].
We will show how all these issues can be discussed in the context of cMPSs.In particular, the key property we will exploit is that of the gauge symmetry of cMPSs [12], that is, the equivalence between different cMPSs vectors under a general class of time-dependent transformations.

arXiv:1602.07966v2 [cond-mat.stat-mech] 29 May 2016
We introduce the cMPS formalism for classical dynamics in Sec.II, and extend it to conditioned trajectory ensembles in Sec.III.In Sec.IV we discuss cMPS gauge transformations and show how they can be used to obtain the generalised Doob transform [6] between conditioned and driven ensembles.Section V discusses the equivalence of trajectory ensembles [5] in this context, and in Sec.VI we describe how one can obtain (integral) fluctuation relations [8] from the cMPS gauge symmetry.In Sec.VII we give our conclusions.

II. ENSEMBLES OF STOCHASTIC TRAJECTORIES AND MATRIX PRODUCT STATES
Consider a classical stochastic system evolving as a continuous time Markov chain.The Master Equation (ME) for the probability reads [1] where P (C, t) indicates the probability of the system be- the escape rate from C. The ME can be written in operator form, with probability vector |P (t) where {|C } is an orthonormal configuration basis, C|C = δ C,C .The Master operator L is defined as, where by µ we label all possible transitions C → C , so that {W µ } stand for the jump operators, If the dimension of configuration space is D (e.g.D = 2 N in a system of N classical Ising spins), then the number of jump operators is at most N J = D(D − 1).The dynamics described by the ME is realised by stochastic trajectories.Each trajectory is a particular realisation of the noise that gives rise to a time record of configurations and of waiting times for jumps between them, observed up to a time t.We denote such a trajectory that starts in configuration C 0 by ω t = (C 0 → C t1 → . . .→ C t K ).Here t i is the time when the transition from C ti−1 to C ti occurs, so that the waiting time for the i-th jump is t i − t i−1 .The trajectory ω t has a total of K configuration changes (and t K ≤ t, i.e., between t K and t no jump occurred).Given the initial configuration, the trajectory is thus fully determined by the sequence of jumps [(µ 1 , t 1 ), (µ 2 , t 2 ), • • • ], where the pair (µ i , t i ) indicates a jump of kind µ i occurring at time t i .
The probability of a trajectory ω t can be written as a "matrix element", where V(ω t ) is a product of operators acting on the system, and −| is the "flat" or "trace" state, −| = C C|.Note that −|P (t) = 1 at all times due to normalisation of the probability.In fact, −| is the left eigenstate of L with eigenvalue zero, −|L = 0, which is the statement of probability conservation.
We now adapt the procedure of Refs.[11][12][13] to our problem of classical stochastic dynamics.To each trajectory we can associate a vector in an auxiliary or output space.This is an abstract space that will allow to keep a record of the specific sequence of events in a trajectory.That is, given a trajectory ω t due to the sequence of jumps [(µ 1 , t 1 ), (µ 2 , t 2 ), • • • , (µ K , t K )], we can define a state |ω t in the output, where we have introduced a one-dimensional system of bosons of N J different kinds, with field operators a µ (t) (µ = 1, . . ., N J ) obeying commutation relations [a µ (t), a † µ (t )] = δ µµ δ(t − t ).The state |Ω is the vacuum of these bosonic fields, a µ (t)|Ω = 0 ∀µ.With these definitions, a trajectory is encoded through Eq. ( 7) by creating a "particle" in the output state that indicates both the kind of jump and its time: if a jump of kind µ i occurs at time t i , the field operator a † µi (t i ) creates a corresponding particle of type µ i in the output space at "position" t i .Note that these are not meant to represent real particles but to associate a vector to each trajectory of the dynamics.(As we are considering continuous time dynamics such vectors are mathematically analogous to states of a bosonic field theory, see [11][12][13]).
If we combine the system and output state we can encode the set of trajectories in a single vector, |Ψ t = ωt V(ω t )|C 0 ⊗ |ω t , which written explicitly becomes (cf.[11][12][13]), where the sum over all trajectories ω t is a sum over all possible number of jumps K, of all kinds µ, occurring at all possible times between 0 and t.The state |Ψ t is a (continuous) matrix product state (cMPS).Equation (8) shows that the whole ensemble of trajectories of the dynamics can be encoded in a cMPS.Furthermore, the cMPS |Ψ t can be written compactly as a path ordered exponential (cf.[11][12][13]), where I out is the identity in the output space and T is the time ordering operator.Note the following: • The state |Ψ t is a real and positive vector.Its coefficients are probabilities (rather than complex amplitudes as in the quantum case [11][12][13]).For example, the probability of a trajectory ω t is obtained as • In analogy with the trace state of the system, we can define a trace state for the output, − out | = ωt ω t |.If we trace out the output in |Ψ t we recover the average evolution of the system, as described by the ME of Eq. (2), • Tracing over both system and output we can see that |Ψ t is normalised to unity, where The above result is due to probability conservation.Note that since we are describing a classical system the space to which |Ψ t belongs is an L1-space (where the norm of a vector |x is the 1-norm, x 1 = k |x k |, rather than the 2-norm of a Hilbert space).
• While the definitions above are for a specific initial state |C 0 , any initial distribution of configurations can of course be considered by replacing |C 0 by a probability vector |P 0 .
• In the discussion leading to Eqs. ( 8)-( 9) we have considered dynamics generated by a time-independent Master operator L. Equations ( 8)-( 9) are equally valid if the operators W µ of R are time-dependent.We will elaborate on this point below.

A. Example
We illustrate the ideas presented so far with an elementary example which is exactly solvable.We consider a particle that hops between nearest neighbouring sites of a one-dimensional lattice with periodic boundary conditions.The set of configurations is given by the possible positions of the particle, so that {|C } = {|x : x = 1, . . ., L}. Lets consider the case where hopping is fully asymmetric and all hopping rates are the same.We can then label the jump operators W µ by the sites x, so that is the operator corresponding to a jump from site x to site x + 1, where we identify |L + 1 with |1 to implement the periodic boundary conditions.The corresponding escape rate operator is proportional to the identity, The generator L reads, The cMPS for this elementary dynamics takes a simple form.Since R is proportional to the identity, all the waiting time factors can be commuted through all the jump operators in Eq. ( 8).Furthermore, if the particle is at site x the only possible jump is to site x + 1, so that if the starting position is x 0 then the only nonvanishing sequence of K jump operators is the product . This means that given the initial position, all that matters to determine uniquely a trajectory are the times of the jumps.In this sense the jump label µ in the creation operators a † µ , cf.Eq. ( 7), is redundant since which jump takes place is implicit in the order of the jump.The Dyson series representation of the cMPS, Eq. ( 8), simplifies to, where we have defined In turn the equivalent path ordered exponential, Eq. ( 9), reads, We can interrogate the cMPS to extract for example the probability of a trajectory ω t , cf.Eq. (10).Since irrespective of when the jumps occur, where K is the number of jumps in the trajectory.This is of course the result expected for a Poisson process, which is what the dynamics of the fully asymmetric jumping particle is.

III. TRAJECTORY OBSERVABLES AND CONDITIONED ENSEMBLES
In dynamics we are often interested in the behaviour of trajectory observables [17,18], i.e., quantities which depend on the whole dynamical trajectory and not just on the system at any one particular time.Examples include the dynamical activity [17,18,23], which corresponds to the total number of configuration changes in a trajectory ω t , where n µ (ω t ) counts the number of jumps of kind µ; or an integrated current [8], which is an accumulated difference in forward/backward transitions between certain pairs of configurations (C, C ).The general form of these trajectory observables is, In the MPS formalism, such observables can be expressed in terms of operators acting on the output state, since A|ω t = A(ω t )|ω t .
One is typically interested in the probability distribution P t (A) of A over dynamics up to time t.In terms of the cMPS state that encodes the ensemble of trajectories this probability is, The associated moment generating function (MGF) then reads, We can now define a tilted cMPS (cf.[15,16]) by application of the e −sA operator, |Ψ t (s) = e −sA |Ψ t .From Eqs. (8,9) we see that this new cMPS is given by The tilted state |Ψ t (s) encodes a biased, or conditioned, ensemble of trajectories, i.e., one where trajectories are conditioned to have an average value of A that is set by the parameter s [6,17,18].This conditioned ensemble can be termed "canonical" [5], in analogy with the equilibrium canonical ensemble where the conditioning on configurations is on the average energy.The norm of |Ψ t (s) is the MGF, as seen from Eq. ( 24), For long times we expect the MGF Z t (s) and probability P t (A) to have large-deviation forms [49][50][51], with the scaled cumulant generating function θ(s) and the rate function ϕ(a) related by a Legendre transform, that is, with s and a related through This structure is analogous to that of equilibrium statistical mechanics: A is an order parameter and s its conjugate field; the large size limit is given by large t; P t (A) is the order parameter distribution, with ϕ(A/t) playing the role of an entropy density; Z t (s) is a "partition sum", with θ(s) playing the role of a free-energy density for trajectories.By tracing out the output in the tilted state |Ψ t (s) we see that the conditioned ensemble is generated by a tilted generator [51], where The operator L(s) is useful not only because it generates the conditioned ensemble, but also because its largest eigenvalue is θ(s).
Note the following: • The ensemble of trajectories encoded by |Ψ t (s) , sometimes termed s-ensemble [24], is canonical in the sense that trajectories are conditioned on the average of an observable [5].We can also consider a "microcanonical" ensemble of trajectories conditioned on a fixed value of A [5].The corresponding system-output state that encodes it is The norm of this state is P t (A), see Eq. ( 23).In contrast with canonical conditioning, in general there is no generator associated with this ensemble [as the δ(A − A) operator cannot be easily "sliced" into the time integral of Eq. ( 9)].
• We can also consider observables that depend on the configuration of the system between jumps, The associated cMPS for the ensemble of trajectories conditioned on the average of such an operator, |Ψ t (s) , has the form of Eq. ( 9), but with R → R + s B, where A. Example For an illustration of the above, lets return to the example of Subsection II A. The simplest conditioning would be on the total number of hops K in a trajectory.From Eq. ( 18) it follows-since the sum over all trajectories is just the integration over all jump times-that K is Poisson distributed, as expected, The corresponding tilted cMPS, Eq. ( 25), reads The norm of this cMPS, Z t (s), is obtained immediately by observing that the factor e −s can be absorbed into W by a redefinition of the rate γ, giving, Note that the MGF of K is exponential in time for all times, Z t (s) = e tθ(s) , where is also the largest eigenvalue of the tilted generator, Eq. ( 32), The LD form of Z t (s) is therefore valid for all times, not just asymptotically.This is a consequence of K being Poissonian: a Poisson process conditioned on its average activity is simply another Poisson process with modified rates (see discussion below).
A less trivial conditioning is one based on a nonuniform weighting of jumps.An example would be to consider as a trajectory observable the total number K e of jumps to even sites.For such conditioning the corresponding tilted operator reads This operator is easy to diagonalise (in the following we assume L is even for simplicity-see below for the full spectral analysis).Its largest eigenvalue corresponds to the scaled cumulant generating function, Eq. ( 27), θ e (s) = γ e −s/2 − 1 . ( From Eq. ( 42) it follows that the statistics of K e is sub-Poissonian: while its average is K e = tγ/2 as expected (as we are counting only half of the jumps), its variance is K 2 e − K e 2 = tγ/4 < K e .As we will see below, the conditioned ensemble associated to Eq. ( 41) is not related to a simple rescaling of rates.
The cMPSs conditioned on the exact number of K or K e are easy to construct.When conditioning on the total number of jumps K, the cMPS is a single layer of the bosonic Fock space, The norm of this state is Eq.(36).In contrast, when conditioning on odd-to-even jumps K e one gets the superposition of two layers, where ± depends on whether the starting position x 0 is even or odd, respectively.The norm of this state gives the probability of K e , which is sub-Poissonian, in agreement with Eq. ( 42).

IV. GAUGE INVARIANCE AND DRIVEN PROCESS AS GAUGE FIXING
A cMPS state such as Eq. ( 9) or Eq. ( 25) is invariant under the following gauge transformations, where G are invertible, and possibly time-dependent, D × D real matrices.This gauge invariance is directly analogous to that of quantum cMPSs [12].The so-called driven process [6] associated to a canonically conditioned ensemble follows immediately from this gauge invariance of cMPSs as we see now.
The canonically conditioned ensemble is generated by the operator L(s), but this tilted operator is not stochastic: in general its largest eigenvalue is non-vanishing and the associated left eigenvector is not the flat state −|.A natural question is whether there is an alternative non-conditioned process which generates the same conditioned ensemble of trajectories but which is properly stochastic: this is the driven process (alternatively called "auxiliary process" [3]).As discussed in [6], the generator of the driven process can be obtained from the tilted operator L(s) through a (generalised) Doob transform.We now show that such a transform corresponds to a particular choice of gauge in the cMPS formalism.
We wish to find a gauge transformation Eq. ( 46) that maps the (normalised) conditioned cMPS state encoding the conditioned ensemble to the cMPS of some other non-conditioned and properly stochastic process.The normalised conditioned cMPS is We can absorb the normalisation by defining Z t (s) = e t 0 f (t )dt , so that f (t ) = ∂ ∂t log Z t (s).The normalised conditional cMPS then reads Note that this is the same as Eq. ( 25) but with the replacement, We aim to find where such that Lt = µ Wµ (t ) − R(t ), which in general can be time dependent, is a stochastic operator, Combining Eq. ( 51) with Eq. ( 46) then gives the equation that the gauge transformation G must obey to transform the conditioned process into the driven one, Eq. ( 50), If we assume that G is a diagonal operator, and that the boundary condition for Eq. ( 52) at the final time t is −|G t = −|, then Eq. ( 52) formally integrates to give, Note that since G 0 is non-trivial, strictly speaking the transformation Eq. ( 46) includes also a transformation of the initial condition |C 0 → G 0 |C 0 .When the overall trajectory length t is large compared to intermediate times t the evolution operator e (t−t )L(s) is exponentially dominated by its largest eigenvalue.That is, e (t−t )L(s) ≈ e (t−t )θ(s) |r s l s |, where |r s and l s | are the right and left eigenvectors of L(s) Where the normalisation is l s |r s = −|r s = 1.Similarly, the denominator in Eq. ( 53) simplifies to Z t−t (s) ≈ e (t−t )θ(s) , cf.Eq. ( 27).This means that for trajectories where the overall time t is large we have G t ≈ G ∞ , where This is in fact the asymptotic solution to the generalised Doob transform from the conditioned to driven process given in Refs.[3,4,6], that of a diagonal matrix whose entries are the coefficients of the leading left eigenvector of L(s) [the prefactor that depends on the initial conditions is irrelevant as it drops out of Eq. ( 46)].
The gauge transformation Eq. ( 53) for arbitrary t and t ∈ [0, t] obtained here in the "Schrodinger picture" (where what is propagated in time is the probability) is the generalised Doob transform that gives the driven process first found in [6] in the "Heisenberg" picture (where what are propagated are observables).Note that the relation between generalised Doob transforms and gauge transformations was also considered in [7].

A. Example
We now illustrate how to obtain the driven process with the example of Subsections II A and III A.
For the case of conditioning on the average value of the total number of jumps K, where the tilted generator is Eq. ( 40), the mapping between the conditioned and driven process is trivial.The driven process is obtained simply by normalising the cMPS, which amounts to shifting the escape rate R by the scaled cumulant generating function θ(s) = γ (e −s − 1), cf.Eq. ( 48), since the function f (t ) = θ(s) is time independent.The gauge transformation in this case is trivial and G t is the identity for all times.The transformed generator is time independent a and reads, which corresponds to the stochastic generator of the original problem with a change of rates γ → e −s γ.As anticipated, this shows that the ensemble of trajectories conditioned on the average of the total number of jumps is the same as the ensemble of trajectories of the same problem with scaled rates.
The case where conditioning is on the average of the number of odd-to-even jumps K e is less trivial.In order to explicitly solve the gauge transformation Eq. ( 53) we need to diagonalise L e (s), which is readily done exploiting translation invariance.The eigenvalues of L e (s) are with From the above we see that λ + 0 = θ e (s) of Eq. ( 42).The corresponding right eigenvectors are e iq(L−2) . . .
, while the left eigenvectors read e iq e i2q . . .
, with normalisation l σ q |r σ q = δ σσ δ qq .In this notation the eigenvectors of the largest eigenvalue are From the spectral decomposition or L e (s) we can write the evolution operator as, and calculate the MGF, Again the ± depends on whether the starting position is even or odd, respectively.At long times the MGF is indeed of the form of Eq. ( 27) with rate Eq. ( 42).With Eqs.(59-60) we can find the explicit form of the gauge transformation operator Eq. ( 53), where we have assumed that the initial position x 0 is an odd site, say x 0 = 1.From this we find that the driven process has a stochastic generator which is time dependent, cf.Eqs.(46)(47)(48)(49)(50), given by, where and f e (t ) = ∂ t log Z e,t (s).This means that the driven process generated by Le (s) is a proper stochastic one of unidirectional hopping dynamics, as in the original process Eq. ( 15), but where the rates alternate between the two possibilities of Eq. ( 63).
Note the following: • The driven generator Eqs.(62-64) is time dependent for arbitrary time t , and in general is not a simple rescaling of the original process, Eq. ( 15), as odd and even rates are different.This contrasts with the driven generator when the conditioning is on the total number of jumps, Eq. ( 56), which is simply the original process with γ → e −s γ.
• In the limit of large t with t t, from Eq. (65) we get for the transformation operator, in accordance with Eq. (55).Only in this limit the driven process coincides with a rescaling of the original dynamics, as Le (s) of Eq. ( 62) becomes of the form Eq. (56).

V. EQUIVALENCE OF ENSEMBLES
Using the cMPS formalism it is also easy to prove the equivalence of trajectory ensembles [5].Consider for ex-ample the conditioned trajectory ensemble encoded in the normalised cMPS |Ψ norm t (s) , cf.Eq. ( 47), where conditioning is through the average of the trajectory observable A (s), as compared to that encoded in the normalised cMPS |Ψ A,norm where conditioning is on the actual value of A. One expects that these "canonical" and "microcanonical" trajectory ensembles should be equivalent at long times for some appropriate value of s such that A cano (s) = A micro [5].Since the two ensembles are fully encoded in two real vectors in the system-output space we can prove this equivalence by considering the distance between these vectors.
For simplicity we focus first on the case where the trajectory observable is the total number of transitions in a trajectory, that is, the dynamical activity K. Going back to the definitions Eqs.(5)(6)(7)(8) we can write the two cMPS vectors as, where by we are denoting the trajectory with jumps We will prove two forms of equivalence.The first and simplest one is the equivalence of concentration [5,16]: for long times, the canonical and microcanonical trajectory measures concentrate exponentially on the same region of their support, as long as K and s are related by Eq. ( 30).This can be expressed in terms of the the ratio of the probabilities of a trajectory in the ensemble conditioned by s and in the ensemble conditioned by K.For long times, when K and s are connected through Eq. ( 30), this ratio is sub-exponential in time [5].In the MPS formalism this form of equivalence can be proven by considering the distance between the vectors that encode the two ensembles, |Ψ norm plays the role of an "overlap" between the probabilities (cf. the quantum case [16] where the overlap is actually the internal product between the cMPS vectors).The output states |ω t are orthonormal, and both |Ψ norm t (s) and |Ψ K,norm t are real positive vectors, so we get where the final simplification is because the summations in the third and fourth lines give P t (K) and we have that e −sK P t (K) ≤ Z t (s) = K e −sK P t (K ).At long times we can write Eq. ( 69) using the large-deviation forms Eq. ( 27), so that, If we minimise with respect to s for fixed K we obtain from Eq. ( 28) that as long as s is such that, cf.Eqs.(28)(29)(30), The equality Eq. ( 70) is correct up to corrections that are sub-exponential in time.This way of proving ensemble equivalence in terms of the distance between the corresponding cMPS vectors is the classical analog, for real vectors in an L1-space, of that of Ref. [16] for the case of quantum stochastic dynamics where the cMPS vectors are complex and belong to an L2-space (the systemoutput Hilbert space).
A more detailed form of equivalence, termed operational equivalence in Ref. [16], can be proved in the following way.The idea is to consider a conditioned ensemble where the conditioning is on the whole time extension t, with t large, but focus only on the portion of trajectories up to time t 0 t.We now ask the question: how does the distribution of sub-trajectories up to time t 0 , from an ensemble conditioned microcanonically by some timeextensive quantity A for all t, compare to that for the same sub-trajectories of an ensemble conditioned canonically by s.This can be answered by comparing the "reduced" cMPSs where all information after t 0 is traced over.
In order to construct the reduced states we first need to partition trajectories at time t 0 : ≡ ω t0 indicates the sequence of K 0 jumps that occur between time 0 and t 0 , and ω ≡ ω + the sequence of the K − K 0 jumps occurring after t 0 .The corresponding output states are similarly split, and the action on the system can be written as the product, cf.Eq. ( 6), We also define the trace state over all the output after time t 0 , − out+ | = ω+ ω + |, cf.Eq. ( 11).The normalised cMPSs, cf.Eqs.(66) and (67), for conditioning on arbitrary trajectory observable, cf.Eqs. ( 21) and (34), are Here A is the operator acting on the output state that gives the value of the trajectory observable, A|ω t = A(ω t )|ω t .Since A is time extensive, the operator A can be split as a sum of two commuting operators, A = A 0 + A + , where A 0 acts on the first part of the output, A 0 |ω t0 = A(ω t0 )|ω t0 , and A + on the second part, A + |ω + = A(ω + )|ω + .
Tracing the canonical cMPS, Eq. ( 75), over the output after t 0 and over the system gives the reduced state, Between the second and third lines we have integrated over all the possible trajectories ω + after t 0 and have used Eq.(31).We have labelled the sum over jumps with the index K 0 to indicate that this sum, and the time integrals, correspond to the sub-trajectories up to t 0 only.To get the final line we use that t is large, with t 0 t, and Eqs. ( 26) and (27).We proceed in a similar way with the microcanonical cMPS Eq. ( 76) to get, As before, we get the third line after integrating over ω + .Here P t−t0 [A − A(ω t0 )|C] indicates the probability of observing A − A(ω t0 ) after time t − t 0 starting from configuration C. The meaning should be clear: for the subtrajectory ω t0 the observable up to time t 0 is A(ω t0 ), so the trajectory after t 0 must have A − A(ω t0 ), since trajectories are conditioned on having a total of A. The final line is obtained by again considering the large t limit and Eq. ( 27).
If we also assume that A is large, we can approximate the rate function ϕ [A − A(ω t0 )/t − t 0 ] in the integrand.Since t 0 t this function will be only significant for A(ω t0 ) A. We can then expand: The reduced microcanonical state Eq.(78) becomes, If we now take A → ∞ and t → ∞ such that A/t = −θ (s), cf.Eq. ( 30), the two reduced cMPSs, Eqs. ( 80) and (77), become identical.This means that the distribution of all finite-time sub-trajectories from an ensemble conditioned on A on long times is the same as that from ensemble conditioned via s, as long as A and s are related by Eq. (30).Microcanonical and canonical trajectory en-sembles are therefore equivalent [5].

VI. INTEGRAL FLUCTUATION THEOREMS FROM GAUGE TRANSFORMATIONS
We finish by discussing how integral fluctuation relations [8] can be proven through the gauge symmetry of the cMPSs encoding the dynamics.A general discussion on the connection between gauge invariance in stochastic dynamics and fluctuation theorems was given in Ref. [7].
For concreteness we focus on the steady state fluctuation theorem for the entropy production into the environment of Lebowitz and Spohn [19].We consider dynamics Eqs.(2)(3)(4) where {W C→C } and R do not depend on time, and there is a stationary distribution L|P st = 0 (which in general will not be an equilibrium one as detailed balance need not be obeyed).Whenever a jump C → C occurs in a trajectory the entropy produced in the environment is [8] ∆S where k B is Boltzmann's constant and W C →C is the rate for inverse transition (and we assume that if W C→C > 0 then W C →C > 0 as well for all pairs C, C ).The total entropy produced by a trajectory is therefore the sum of these contributions over all the jumps.From Eq. ( 22) we can then write an integrated environment entropy production output operator as where we have made explicit that the sum over all possible jumps µ corresponds to the sum over all possible configuration transitions C → C .Consider the cMPS of an ensemble of trajectories conditioned on the average of ∆S, where λ is the corresponding conjugate field.This biased ensemble is generated by the tilted operator [19] [cf.
Eq. ( 25) and Eq.(32)] where we have set k B = 1.Since, cf.Eq. ( 26), the fluctuation theorem of Ref. [19], corresponds to the statement that |Ψ t (1) is equivalent to the cMPS of an actual stochastic process (without the need for normalisation of the conditioned cMPS as in Sec.IV).This is easily proven via a gauge transformation Eq. ( 46) of the cMPS |Ψ t (1) .Requiring stochasticity, cf.Eq. ( 51), results in the gauge fixing condition, cf.Eq. ( 52), in the case where the transformation is timeindependent and f = 0, This condition is satisfied for given that from Eq. (84) we have that L(1) = L(0) † .That is, the conditioned ensemble encoded in |Ψ t (1) is equivalent, via a gauge transformation, to one generated by a proper stochastic dynamics.This then implies the existence of an associated integral fluctuation relation, which in this particular case is Eq. ( 86).Other fluctuation relations are obtained in a similar manner [7]: The trajectory ensemble is reweighted with the exponential of a trajectory observable (such as entropy production, work, etc.).This defines the corresponding tilted cMPS, cf.Eq. ( 83), whose norm is the average of the exponential of the observable, cf.Eq. ( 85).If the corresponding conditioned process can be mapped to a stochastic one via a gauge transformation then we have an integral fluctuation theorem, cf.Eqs. ( 86) and (87).

VII. CONCLUSIONS
We have introduced a formalism based on matrix product states to catalog ensembles of trajectories in classical stochastic systems.This approach is a classical version of the known connection between continuous MPSs and open quantum dynamics [11][12][13].It allows to describe in a compact way conditioned trajectory ensembles and demonstrate ensemble equivalences, in analogy with what can be done in the quantum case [15,16].The key property of cMPSs is that of gauge invariance from which the equivalences follow.Other dynamical properties can be proved via gauge transformations, as for example certain fluctuation relations [7].
We have focused on systems evolving as continuous time Markov chains.For this kind of dynamics the corresponding MPS that encodes the set of trajectories is a continuous MPS given that jump events can occur at any time.One can describe also discrete Markov chain dynamics with standard MPSs where the auxiliary space is a discrete lattice rather than the real line.Other generalisations are possible.For example, here we have considered trajectories which terminate at some fixed maximum time, but one could consider instead the set of trajectories which terminate after a fixed number of jumps and where their total time extent is variable [52,53].In analogy with the quantum case [16], we expect such a variable time ensemble to have a discrete MPS description.
The cMPS vectors encode all the information about the dynamics.The various levels of large-deviations [51,54,55] can therefore be recovered by contraction of the output space: for example, the contraction |ω t → |A(ω t ) from an output state that encodes the whole trajectory ω t to one that only retains the value of a trajectory observable, cf.Eq. ( 21), would produce a reduced system-output vector corresponding to a level-1 (or level-1.5)description [51].Similarly, a contraction |ω t → |{n µ } where the total number of jumps of each kind µ is retained would result in a system-output vector corresponding to a level-3 description.In this way one can expect to prove various large-deviation variational relations [51,54,55] within the MPS approach presented here.