Non-Abelian transport distinguishes three usually equivalent notions of entropy production

We extend entropy production to a deeply quantum regime involving noncommuting conserved quantities. Consider a unitary transporting conserved quantities ("charges") between two systems initialized in thermal states. Three common formulae model the entropy produced. They respectively cast entropy as an extensive thermodynamic variable, as an information-theoretic uncertainty measure, and as a quantifier of irreversibility. Often, the charges are assumed to commute with each other (e.g., energy and particle number). Yet quantum charges can fail to commute. Noncommutation invites generalizations, which we posit and justify, of the three formulae. Charges' noncommutation, we find, breaks the formulae's equivalence. Furthermore, different formulae quantify different physical effects of charges' noncommutation on entropy production. For instance, entropy production can signal contextuality - true nonclassicality - by becoming nonreal. This work opens up stochastic thermodynamics to noncommuting - and so particularly quantum - charges.


I. INTRODUCTION
Thermodynamics describes the transport of energy and other quantities between systems that have equilibrated individually but not with each other.These quantities are conserved according to principles such as the first law of thermodynamics.The second law decrees which transport can and cannot occur spontaneously.Over the last three decades, researchers have revolutionized the study of transport within microscopic systems, where fluctuations dominate [1][2][3][4][5][6][7].
More-recent results have prompted questions about how such exchanges occur in quantum systems, which can have coherences and nonclassical correlations [8][9][10][11][12][13][14][15].To infer about quantum currents, one must measure quantum systems.But measurement back-action can destroy coherences.Thermodynamic processes therefore depend on our measurements of them.This conundrum has inspired considerable research, but no resolution is universally agreed upon.
Quantum coherences result from the noncommutation of operators.In classical thermodynamics, a system's energy and particle number are commuting quantities; they can be measured simultaneously.What if the globally conserved thermodynamic quantities (charges) fail to commute?
This recently posed question has upended intuitions and engendered a burgeoning subfield of quantum thermodynamics ; see [50] for a recent Perspective.
We analyze entropy produced by arbitrarily far-fromequilibrium exchanges of noncommuting charges.Three formulae for entropy production, which equal each other when all charges commute, have been used widely [52].We show that these formulae fail to equal each other when charges fail to commute.This incommensurability stems from measurement disturbance: Noncommuting charges' currents cannot be measured simultaneously.
An example illustrates the key idea: Consider two classical thermodynamic observables, such as energy and particle number.Let classical systems A and B begin in thermal (grand canonical) ensembles: System X = A, B has energy E X and particle number N X with a probability ∝ e −β X (E X −µ X N X ) .β X denotes an inverse temperature; and µ X , a chemical potential.An interaction can shuttle energy and particles between the systems.If conserved globally, the quantities are called charges.Any charge (e.g., particle) entering or leaving a system produces entropy.The entropy produced in a trial-the stochastic entropy production (SEP)-is a random variable.Its average over trials is non-negative, according to the second law of thermodynamics.The SEP obeys constraints called exchange fluctuation theoremstightenings of the second law of thermodynamics [6].Classical fluctuation theorems stem from a probabilistic model: System A begins with energy E A i and with N A i particles, A ends with energy E A f and with N A f particles, and B satisfies analogous conditions, with a joint , we view as a two-step stochastic trajectory between microstates (Fig. 1).
In the commonest quantum analog, quantum systems X = A, B begin in reduced grand canonical states ∝ e −β X ( ĤX −µ X N X ) .ĤX denotes a Hamiltonian; and N X , a particle-number operator.In the two-point measurement scheme [4,5], one strongly measures each system's Hamiltonian and particle number.Then, a unitary couples the systems, conserving ĤA + ĤB and N A + N B .Finally, one measures ĤA , ĤB , N A , and N B again. 1 A joint probability distribution governs the four measurement outcomes.Using the outcomes and distribution, one can similarly define SEP, prove fluctuation theorems, and define stochastic trajectories [6].Each measurement may disturb the quantum system, however [12,53,54].
Noncommutation introduces a twist into this story.Let the quantum systems above exchange charges that fail to commute with each other.For example, consider qubits X = A, B exchanging spin components σX x,y,z .The corresponding thermal states are ∝ exp − α=x,y,z β X α σX α , wherein β X α denotes a generalized inverse temperature [23,27,35,48].One cannot implement the two-point measurement scheme straightforwardly, as no system's σX x,y,z operators can be measured simultaneously.One can measure each qubit's three spin components sequentially, couple the systems with a charge-conserving unitary, and measure each qubit's σx,y,z sequentially again.Yet these measurements wreak havoc worse than if the charges commute: They disturb FIG. 1: Two thermal systems exchanging charges: In a paradigm ubiquitous across thermodynamics, two systems locally exchange charges that are conserved globally.The charge flow produces entropy.During each realization of the process, each system begins with some amount of every charge (e.g., energy and particle number) and ends with some amount.These amounts define a stochastic trajectory.
not only the systems' states, but also the subsequent, noncommuting measurements [55].
Weak measurements would disturb the systems less [56,57] at the price of extracting less information [58].
As probabilities describe strongmeasurement experiments, quasiprobabilities describe weak-measurement experiments (App.A).Quasiprobabilities resemble probabilities-being normalized to 1, for example.They violate axioms of probability theory, however, as by becoming negative.Consider, then, replacing the above protocol's strong measurements with weak measurements.We may loosely regard AB as undergoing stochastic trajectories weighted by quasiprobabilities, rather than probabilities.Levy and Lostaglio applied quasiprobabilities in deriving a fluctuation theorem for energy exchanges [12].Their fluctuation theorem contains the real part of a Kirkwood-Dirac quasiprobability (KDQ) [57,[59][60][61][62].
To accommodate noncommuting charges, we generalize the SEP.In conventional quantum thermodynamics, three common SEP formulae equal each other [52].Entropy is cast as an extensive thermodynamic variable by a "charge formula," as quantifying missing information by a "surprisal formula," and as quantifying irreversibility by a "trajectory formula."We generalize all three formulae using KDQs.If the charges commute, the generalizations reduce to the usual formulae.The generalizations satisfy four sanity checks, including by equaling each other when the charges commute.Yet we find deductively that noncommuting charges break the equivalence, generating three species of SEP.
Different SEPs, we find, highlight different ways in which charges' noncommutation impacts transport: This work opens the field of stochastic thermodynamics [99] to noncommuting charges.Furthermore, our work advances the widespread research program of critically comparing thermodynamic with information-theoretic entropies and leveraging information theory for thermodynamics [100][101][102][103].
The paper is organized as follows.Section II details the setup and reviews background material.Section III presents the three SEP formulae, the physical insights they imply, and their fluctuation theorems and averages.Section IV numerically illustrates our main results with a two-qubit example.In Sec.V, we sketch a trapped-ion experiment based on our results.Section VI concludes with avenues for future work.
As a semantic disclaimer and to provide broader context: Studies of the second law have engendered debates about what should be called the entropy production.We provide an alternative perspective: We show that three SEP formulae, despite being equivalent in the commuting case, become inequivalent if charges cease to commute.Each of these formulae encapsulates a different aspect of entropy production.This perspective harmonizes with demonstrations that, for small systems, the conventional second law splits into multiple second "laws" [20,23,[104][105][106][107][108].

II. PRELIMINARIES
We specify the physical setup in Sec.II A. Section II B reviews KDQs; Sec.II C, information-theoretic entropies; and Sec.II D, fluctuation theorems.

II A. Setup
Consider two identical quantum systems, A and B.
(From now on, we omit hats from operators.)Each system corresponds to a copy of a Hilbert space H.The bipartite initial state ρ leads to the reduced states ρ A := Tr B (ρ) and ρ B := Tr A (ρ).
On H are defined single-system observables Q α=1,2,...,c , assumed to be linearly independent [47].For X = A, B, we denote X's copy of Q α by Q X α .The dynamics will conserve the global observables α , so we call the Q α 's charges.In the commuting case, all the charges commute: [Q α , Q α ′ ] = 0 ∀α, α ′ .At least two charges do not in the noncommuting case: To simplify the formalism, we assume that the Q α are nondegenerate, as in [6,12,109,110].Appendix B concerns extensions to degenerate charges.The nondegeneracy renders every projector rank-one: Π α,k = |α k ⟩⟨α k |.We call the Q tot α eigenbasis {|α k ⟩} k the α th product basis.
Having introduced the charges, we can expound upon the initial state.The reduced states ρ X are generalized Gibbs ensembles (GGEs) [111][112][113][114][115] β X α denotes a generalized inverse temperature.The partition function Z X normalizes the state.If the Q X α 's fail to commute, the GGE is often called the non-Abelian thermal state [23,27,35,48].Across most of this paper, ρ equals the tensor product Such a product of thermal states, being a simple nonequilibrium state, surfaces across thermodynamics [116,Sec. 3.6].(In Sections III B 2 and III C 3, we consider initial states ρ that deviate from this form but retain GGE reduced states.)Our results stem from the following protocol: Prepare AB in ρ.Evolve ρ under a unitary U that conserves every global charge: U can bring the state arbitrarily far from equilibrium.The final state, ρ f = U ρU † , induces the reduced states

II B. Kirkwood-Dirac quasiprobability
The KDQ's relevance stems from the desire to reason about charges flowing between A and B. One can ascribe to A some amount of α-type charge only upon measuring Q A α .Measuring Q A α strongly would disturb A and subsequent measurements of noncommuting Q A α ′ 's [55].Therefore, we consider sequentially measuring charges weakly.We define the forward protocol by combining the preparation procedure and unitary with weak measurements (Sec.III C introduces a reverse protocol): The list (i 1 , i 2 , . . ., i c ; f c , f c−1 , . . ., f 1 ) defines a stochastic trajectory, as in Sec.I. (Recall the definition, in Sec.II A, of composite-system indices.)Loosely speaking, we might view the trajectory as occurring with a joint quasiprobability pF (i 1 , i 2 , . . ., i c ; f c , f c−1 , . . ., f 1 ).pF can assume negative and nonreal values.One can infer pF experimentally by performing the forward protocol many times, performing strong-measurement experiments, and processing the outcome statistics [63].Angle brackets ⟨.⟩ denote averages with respect to pF , unless we specify otherwise.
Two cases further elucidate pF and the forward protocol: the commuting case and weak-measurement limit.In the commuting case, if ρ is diagonal with respect to the charges' shared eigenbasis, pF is a joint probability.
The quantum relative entropy quantifies the distance between states: D(ω 1 ||ω 2 ) = Tr(ω 1 [log(ω 1 ) − log(ω 2 )]).D measures how effectively one can distinguish between ω 1 and ω 2 , on average, in an asymmetric hypothesis test.D(ω 1 ||ω 2 ) ≥ 0 vanishes if and only if Analogously, the classical relative entropy distinguishes probability distributions: . We will substitute KDQ distributions for P and R in Sec.III C 1.The logarithms will be of complex numbers.We address branch-cut conventions and the complex logarithm's multivalued nature there.

II D. Exchange fluctuation theorems
An exchange fluctuation theorem governs two systems trading charges.(We will drop the exchange from the name.)Consider two quantum systems initialized and exchanging energy as in the introduction, though without the complication of particles.Each trial has a probability p(σ) of producing entropy σ.Denote by ⟨.⟩ P averages with respect to the probability distribution.The fluctuation theorem ⟨e −σ ⟩ P = 1 implies the second-law-like inequality ⟨σ⟩ P ≥ 0 [6].Unlike the second law, fluctuation theorems are equalities arbitrarily far from equilibrium.More-general (e.g., correlated) initial states engender corrections: ⟨e −σ ⟩ P = 1 + . . .[12,110].

III. THREE GENERALIZED SEP FORMULAE
We now present and analyze the generalized SEP formulae: the charge SEP σ chrg (Sec.III A), the surprisal SEP σ surp (Sec.III B), and the trajectory SEP σ traj (Sec.III C).To simplify notation, we suppress the indices that identify the trajectory along which an SEP is produced.

III A. Charge stochastic entropy production
First, we motivate the charge SEP's definition (Sec.III A 1). σ chrg portrays entropy as an extensive thermodynamic quantity (Sec.III A 2). Furthermore, σ chrg satisfies a fluctuation theorem whose corrections depend on commutators of the Q α 's (Sec.III A 3). Corrections arise because noncommuting charges enable individual stochastic trajectories to violate a "microscopic," or "detailed," notion of charge conservation.[Nevertheless, charge conservation as defined in Eq. ( 3) is not violated.] The fundamental relation of statistical mechanics [118] motivates σ chrg 's definition.In this paragraph, we reuse quantum notation (Sec.II A) to denote classical objects, for simplicity.The fundamental relation governs large, classical systems X = A, B that have extensive charges Q X α and intensive parameters β X α .Let an infinitesimal interaction conserve each Q A α + Q B α .Since dQ B α = −dQ A α , the total entropy changes by According to the second law of thermodynamics, dS AB ≥ 0 during spontaneous processes [119].We posit that ⟨σ chrg ⟩ should assume the form (6). We reverse-engineer such a formula, using the charges' eigenvalues: III A 2. Average of charge SEP By design, the charge SEP averages to This average is non-negative, equaling a relative entropy [52]: This inequality echoes the second-law statement written just below Eq. (6).We prove the theorem and present the correction's form in App.C 1. Below, we show that the right-hand side (RHS) evaluates to 1 in the commuting case.In the noncommuting case, corrections arise from two physical sources: (i) ρ A and ρ B are non-Abelian thermal states.
(ii) Individual stochastic trajectories can violate charge conservation.
In the commuting case, the first term in Eq. (10) equals 1.The reason is, in ρ (10).No such cancellation occurs in the noncommuting case, since . The first term in Eq. ( 10) can therefore deviate from 1, quantifying the noncommutation of the charges in ρ X GGE .The second term vanishes in the commuting case, since all commutators of charges vanish.This second term can deviate from 0 in the noncommuting case, due to nonconserving trajectories, which we introduce now.Define a trajectory as conserving if the corresponding charge eigenvalues satisfy Any trajectory that violates this condition, we call nonconserving.Loosely speaking, under (11), AB has the same amount of α-type charge at the trajectory's start and end.
In the commuting case, pF = 0 when evaluated on nonconserving trajectories.We call this vanishing detailed charge conservation.Earlier work has relied on detailed charge conservation [12,56].In the noncommuting case, pF need not vanish when evaluated on nonconserving trajectories (App.C 2).The mathematical reason is, different charges' eigenprojectors in pF [Eq.( 4)] can fail to commute.A physical interpretation is that measuring any Q X α disturbs any later measurements of noncommuting Q X α ′ 's.Nonconserving trajectories resemble classically forbidden trajectories in the path-integral formulation of quantum mechanics.
We now show that nonconserving trajectories underlie the final term in Eq. (10).Every stochastic function g(i 1 , i 2 , . . ., i c ; f c , f c−1 , . . ., f 1 ) averages to ⟨g⟩ = ⟨g⟩ cons +⟨g⟩ noncons .Each term equals an average over just the conserving or nonconserving trajectories.For example, the average (8) decomposes as ⟨σ chrg ⟩ = ⟨σ chrg ⟩ cons + ⟨σ chrg ⟩ noncons .The second term on the RHS of Eq. ( 10) takes the form ⟨g⟩ noncons (App.C 2 iii).In the commuting case, all trajectories are conserving, so the second term equals zero-as expected, since the term depends on commutators Therefore, the fluctuation theorem's final term (second correction) stems from violations of detailed charge conservation.The average (8) contains contributions from conserving and nonconserving trajectories.
We have identified two corrections to the fluctuation theorem (10).On the equation's RHS, the first term can deviate from 1, and the second term can deviate from 0. The first deviation originates in noncommutation of the charges in ρ X GGE .The second deviation stems from nonconserving trajectories.An example illustrates the distinction between noncommuting charges' influences on initial conditions and dynamical trajectories.Let c = 3, and let Thus, there exists no temperature gradient that directly drives noncommuting-charge currents.Accordingly, the fluctuation theorem's first term equals 1.Yet the second term-an average over nonconserving trajectories-is nonzero.
III B. Surprisal stochastic entropy production σ surp casts entropy as missing information (Sec.III B 1).The average ⟨σ surp ⟩ can be expressed in terms of relative entropies (Sec.III B 2), as one might expect from precedent [52].Yet initial coherences, relative to charges' product bases, can render ⟨σ surp ⟩ negative.If ρ is a product ρ A GGE ⊗ ρ B GGE -as across much of thermodynamicsρ has such coherences only if the Q α 's fail to commute.Furthermore, positive ⟨σ surp ⟩ values accompany time's arrow.Hence charges' noncommutation enables a resource, similar to work, for effecting a seeming reversal of time's arrow.Charges' noncommutation also engenders a correction to the σ surp fluctuation theorem (Sec.III B 3).

III B 1. Surprisal SEP formula
Information theory motivates the surprisal SEP formula.Averaging the surprisal − log(p j ) yields the Shannon entropy (Sec.II C), so the surprisal is a stochastic (associated-with-one-trial) entropic quantity.A difference of two surprisals forms our σ surp formula.The probabilities follow from preparing ρ and projectively measuring the α th product basis, for any α.Outcome shows how these probabilities generalize those in the conventional surprisal-SEP formula [52].The surprisal SEP quantifies the information gained if we expect to observe i α but we obtain f α : All results below hold for arbitrary α.Nevertheless, App.F introduces a variation on Eq. ( 12)-an alternative definition that contains an average over all α.Appendix D 2 confirms that σ surp reduces to σ chrg if the Q α 's commute.

III B 2. Average of surprisal SEP
⟨σ surp ⟩ demonstrates that charges' noncommutation can enable a seeming reversal of time's arrow.Time's arrow manifests in, e.g., spontaneous flows of heat from hot to cold bodies.This arrow accompanies positive average entropy production.Hence negative ⟨σ⟩'s simulate reversals of time's arrow.These simulations cost resources, such as the work traditionally used to pump heat from colder to hotter bodies.Quantum phenomena, such as entanglement, serve as such resources, too [8,120].We identify another such resource: initial coherences relative to charges' product bases, present in the common initial state (1) only if charges fail to commute.
To prove this result, we denote by Φ α the channel that dephases states ω with respect to the α th product basis: (App.D 3).The relative entropy is non-negative (Sec.II C).Therefore, initial coherences relative to charges' product bases can reduce ⟨σ surp ⟩.Such coherences can even render ⟨σ surp ⟩ negative.Since ⟨σ chrg ⟩ ≥ 0 [Eq.( 9)], σ surp is sensitive to the resource of coherence, while σ chrg is not.This result progresses beyond three existing results.First, coherences engender a correction to a heatexchange fluctuation theorem [12].Those coherences are relative to an eigenbasis of the only charge in [12], energy.If the dynamics conserve only one charge, or only commuting charges, then the thermal product ρ A GGE ⊗ ρ B GGE [Eq.( 1)] lacks the necessary coherences.ρ A GGE ⊗ρ B GGE has those coherences only if charges fail to commute.Across thermodynamics, ρ A GGE ⊗ ρ B GGE is ubiquitous as an initial state.Hence noncommuting charges underlie a resource for effectively reversing time's arrow in a common thermodynamic setup.
Second, [28] shows that noncommuting charges can reduce entropy production in the linear-response regime.Our dynamics U can be arbitrarily far from equilibrium.Third, just as we attribute ⟨σ surp ⟩ < 0 to initial coherences, so do [8,110,120,121] attribute negative average entropy production to initial correlations.Our framework recapitulates such a correlation result, incidentally: If ρ encodes correlations but retains GGE marginals, ⟨σ chrg ⟩ [Eq.(8)] shares the form of ( 13), to within one alteration.The decorrelated state ρ A ⊗ρ B replaces the dephased state Φ α (ρ): ).Initial correlations can therefore render ⟨σ chrg ⟩ negative.Just as initial correlations can render a ⟨σ⟩ negative, σ surp reveals coherences attributable to noncommuting charges can.

III B 3. Fluctuation theorem for surprisal SEP
To formulate the fluctuation theorem, we define the coherent difference ∆ρ α := Φ α (ρ) −1 − ρ −1 .It quantifies the coherences of ρ with respect to the α th product basis.If and only if ρ is diagonal with respect to this basis, ∆ρ α = 0.The surprisal SEP obeys the fluctuation theorem (App.D 4).The second term-the correction-arises from ρ's coherences relative to the charges' product eigenbases.If ρ = ρ A GGE ⊗ ρ B GGE , as throughout much of thermodynamics, then ρ can have such coherences only if charges fail to commute.Our correction resembles that in [12] but arises from distinct physics: noncommuting charges, rather than initial correlations.4).Complex-valued entropy production appeared also in Ref. [11].

III C 1. Trajectory SEP formula
σ traj generalizes the conventional trajectory SEP formula, which we review now.Recall the classical experiment in Sec.I: Classical systems A and B begin in grand canonical ensembles, then exchange energy and particles.In each trial, AB undergoes the trajectory with some joint probability.Let us add a subscript F to that probability's notation: . Imagine preparing the grand canonical ensembles, then implementing the time-reversed dynamics.One observes the reverse trajectory, ( The probabilities' log-ratio forms the conventional trajectory SEP formula [1][2][3]6]: log(p F /p R ).In an illustrative forward trajectory, heat and particles flow from a hotter, higher-chemical-potential A to a colder, lowerchemical-potential B. This forward trajectory is likelier than its reverse: p F > p R .Hence log(p F /p R ) > 0, as expected from the second law of thermodynamics.
Let us extend this formula to quasiprobabilities.
Section II B established a forward protocol suitable for potentially noncommuting Q α 's.That section attributed to the forward trajectory (i 4)].The reverse protocol features U † , rather than U , in step 3, with a reversed list of measurement outcomes.The reverse tra- This definition captures the notion of time reversal, we argue in App.E 1, while enabling σ traj to agree with σ chrg and σ surp in the commuting case (App.E 2).Both quasiprobabilities feature in the trajectory SEP: FIG. 2: Weak value: The weak value serves as a "conditioned expectation value" in the protocol depicted.Time runs from right to left, as reading a weak value from right to left translates into the procedure depicted: Prepare ω, evolve the state under V , measure Y, and postselect on outcome y.Which value is retrodictively most reasonably attributable to X immediately after the preparation procedure?Arguably the weak value [122][123][124][125].
The final equality follows from the nondegeneracy of the local charges Q X α : The projectors Π α,k = |α k ⟩⟨α k |, so factors cancel between the numerator and denominator.The ⟨i 1 |'s and |f 1 ⟩'s distinguish Q 1 from the other charges.However, ( 16) holds for every possible labeling of the Q α 's (holds under the labeling of any charge as 1) and for every ordering of the projectors in (4).Moreover, App.F introduces a variation on Eq. ( 15)-a definition that contains an average over all measurement orderings, removing the dependence on the ordering.

III C 2. Nonreal trajectory SEP witnesses nonclassicality
Nonreal σ traj values signal nonclassicality in a noncommuting-current experiment.To prove this result, we review weak values (conditioned expectation values) and contextuality (provable nonclassicality).We then express σ traj in terms of weak values.Finally, we prove that nonreal σ traj values herald contextuality in an instance of the forward or reverse protocol.
Figure 2 motivates the weak value's form [58,126].Consider preparing a quantum system in a state ω at a time t = 0.The system evolves under a unitary V .An observable Y is then measured, yielding an outcome y.Denote by X an observable that neither commutes with ω nor shares the Y eigenstate |y⟩.Which value is retrodictively most reasonably attributable to X immediately after the state preparation?Arguably the weak value [122][123][124][125] Weak values can be anomalous, lying outside the spectrum of X .Anomalous weak values actuate metrological advantages [78,[127][128][129][130][131] and signal contextuality [89,90,132].
Contextuality is a strong form of nonclassicality [98,133].One can model quantum systems as being in unknown microstates akin to classical statistical-mechanical microstates.One might expect to model operationally indistinguishable procedures identically.No such model reproduces all quantum-theory predictions, however.This impossibility is quantum theory's contextuality, which underlies quantum-computational speedups, for example [134].Anomalous weak values signal contextuality in the process prepare ω, measure X weakly, evolve with V , measure Y strongly, and postselect on y [89,90,132].
Having introduced the relevant background, we prove that σ traj depends on weak values and signals contextuality.Define the evolved projectors Π ′ 1,i1 := U Π 1,i1 U † and Π ′′ 1,f1 := U † Π 1,f1 U .Define also the weak values Each is a complex number with a phase ϕ: We suppress the phases' indices for conciseness.Equation (16) becomes The final log is of mere probabilities.The phase difference is defined modulo 2π.For convenience, we assume the complex logarithm's branch cut lies along the negative real axis. 2Appendix E 3 explains how to choose the complex logarithm's value if ρ is pure and describes subtleties concerning mixed ρ's.
If Im(σ traj ) ̸ = 0, we call σ traj anomalous, and at least one weak value is anomalous.Hence at least one of two protocols is contextual: 1. Forward compressed protocol: Prepare ρ.Measure Π 1,i1 weakly. 3Evolve under U .Measure the Q 1 product basis strongly.Postselect on f 1 .
The forward compressed protocol is a simplification of the forward protocol in Sec.II B: Only measurements pertaining to charge Q 1 are performed.Analogous statements concern the reverse compressed protocol.Hence σ traj joins a sparse set of thermodynamic quantities known to signal contextuality [12,135].σ traj 's signaling of contextuality exhibits irreversibility-fittingly for an entropic phenomenonalgebraically and geometrically.First, for σ traj to signal contextuality-to become nonreal-nonreality of a weak value does not suffice.Rather, the weak values' phases must fail to cancel: ϕ F ̸ = ϕ R . 4 This failure mirrors how, conventionally, entropy is produced only when p F ̸ = p R .
Second, suppose that ρ is pure.ϕ F − ϕ R equals the geometric phase imprinted on a state manipulated as follows: ρ is prepared, the forward compressed protocol is performed, the state is reset to ρ, the reverse compressed protocol is performed, and the state is reset to ρ [136,137].All measurements here are performed in the strong limit.The state acquires the phase e iϕF during the forward step and acquires e −iϕR during the reverse.Only if the forward and reverse steps fail to cancel does the geometric phase ̸ = 1-does σ traj signal contextuality.Hence σ traj heralds contextuality in the presence of irreversibility, appropriately for a thermodynamic quantity.

III C 3. Average of trajectory SEP
Formally, averaging σ traj [Eq.(15)] with respect to pF yields a quasiprobabilistic relative entropy of Sec.II C: The average can be negative and even nonreal.Yet ⟨σ traj ⟩ has a particularly crisp physical interpretation when ρ is a pure state that retains GGE marginals (1). 6 pure ρ is not as restricted as it may seem: Thermodynamics often features pure global states whose reduced states are thermal [8,101,120,138,139].The average becomes (App.E 3).Each ϕ implicitly depends on indices i 1 and f 1 .⟨σ traj ⟩'s real and imaginary components have physical significances that we elucidate now.In App.E 3, we prove that ⟨ϕ F − ϕ R ⟩ is real. 7Hence, if Im(⟨σ traj ⟩) ̸ = 0, at least one ϕ F [associated with one tuple (i 1 , f 1 )] or one ϕ R is nonzero.Therefore, at least one weak value-at least one f1 ⟨Π 1,i1 ⟩ ρ or i1 ⟨Π 1,f1 ⟩ ρis anomalous.At least one instance of the forward or reverse compressed protocol is therefore contextual.In conclusion, ⟨σ traj ⟩, beyond σ traj , witnesses contextuality.
In each such D, the compared-to state (the final argument) results from a dephasing and a time-reversed evolution.The operations' ordering differs between the D's.The 1/2 in Eq. ( 21) averages over the orderings.Hence ⟨σ traj ⟩ translates into sensible physics.( The proof follows from the KDQ's normalization.

IV. TWO-QUBIT EXAMPLE
This section numerically illustrates the SEP definitions' key properties.First, we introduce the system simulated.Afterward, we analyze the calculated SEPs using generic parameter choices.
In our example system, A and B are qubits.The charges are the Pauli operators Q 1 = σ z , Q 2 = σ y , and Q 3 = σ x .By the Schur-Weyl duality, the most general charge-conserving unitary is a linear combination of the permutations of two objects-a linear combination of the identity and SWAP operators [47,117].The SWAP operator acts on states |ψ⟩ A and |ϕ⟩ B as SWAP |ψ⟩ A ⊗ |ϕ⟩ B = |ϕ⟩ A ⊗ |ψ⟩ B .We parameterize the unitary with an angle θ: IV A. Charge SEP Section III A 3 introduced nonconserving trajectories and the following results.On the RHS of the fluctuation theorem (10) are two terms.The first, notated as ⟨e −κ ⟩ (App.C 1), encodes the noncommutation of the charges in the initial state [Eqs.(1) and ( 2)].The fluctuation theorem's final term, notated as ⟨e −σ chrg − e −κ ⟩ noncons (App.C 1), is an average over nonconserving trajectories.
We support these claims by showing how the two terms change as θ varies from 0 to π 2 in Eq. (23). Figure 3 shows the terms' real and imaginary parts, as well as the average entropy production ⟨σ chrg ⟩.The generalized inverse temperatures' values (listed in Fig. 3's caption) ensure that a strong thermodynamic force pushes the σ x and σ y charges from B to A, whereas a weak force pushes σ z oppositely.
The unitary parameter θ increases along the x-axis.As per a sanity check in Sec.III, when θ = 0, the fluctuation theorem's terms sum to one.The first term, ⟨e −κ ⟩, equals one; and the second term, ⟨e −σ chrg − e −κ ⟩ noncons , vanishes.As θ increases, charges flow more, as evidenced by the increasing ⟨σ chrg ⟩. ⟨e −κ ⟩ changes little.This near-constancy reflects the origination of ⟨e −κ ⟩ in the noncommutation of the charges in the initial state, which remains constant as θ changes.In contrast, as θ grows, ⟨e −σ chrg − e −κ ⟩ noncons increases in magnitudedue to both its real and imaginary parts.This growth reflects nonconserving trajectories' growing contribution to the fluctuation theorem's RHS.

IV B. Surprisal SEP
The initial state ρ can have coherences relative to each charge's product basis.As discussed in Sec.III B 2, these coherences can reduce ⟨σ surp ⟩, even rendering it negative.σ surp is defined in terms of an arbitrary charge index α, which we choose to be 1: Figure 4 shows ⟨σ surp ⟩ as a function of β A x and x , ρ A is nearly diagonal relative to the σ z eigenbasis.Hence ⟨σ surp ⟩ is positive, as evidenced in the plot's top left-hand corner.In the opposite regime (β A x ≫ β A z ), ρ A has large coherences relative to the σ z eigenbasis.These coherences drive ⟨σ surp ⟩ below zero, as evidenced in the bottom right-hand corner.

IV C. Trajectory SEP
As shown in Sec.III C 2, a nonreal σ traj implies contextuality in a noncommuting-charge experiment.σ traj carries indices i 1 and f 1 , by the definition (15).We nu- merically calculate the σ traj evaluated on the trajectory defined by Figure 5 shows the imaginary part of σ traj (i 1 , f 1 ) plotted against β A x and β A y .σ traj typically has a nonzero imaginary component (of a magnitude similar to the real part's), signaling contextuality.The imaginary component's magnitude grows particularly large when β A y ≈ 0. Furthermore, the imaginary component exhibits stability, changing smoothly with the swept parameters.

V. EXPERIMENTAL SKETCH
Our results can be tested experimentally.Several pieces of evidence indicate such an experiment's feasibility.First, a trapped-ion experiment recently initiated the experimental testing of noncommuting-charge thermodynamics [48].Second, other platforms have been argued to support such tests [27,47].Examples include superconducting qubits, neutral atoms, and possibly nuclear-magnetic-resonance systems.Third, sequential weak measurements have been realized with trapped ions [141], superconducting qubits [142], and photonics [143][144][145][146][147]. Fourth, we now sketch a trapped-ion experiment inspired by Sec.IV.We outline the setup, preparation procedure, evolution, measurement, and data processing.For concreteness, we tailor the proposal to the platform reported on in [148].
The platform consists of 171 Yb + ions in a linear Paul trap.Each ion encodes a qubit in two hyperfine ground states (two energy levels that result from splitting a ground space with a hyperfine interaction).Our proposal calls for ten qubits: Two form the system of interest, two ancillas enable state preparation, and six ancillas enable weak measurements.The system of interest consists of a qubit A and a qubit B. These qubits will exchange charges σ x , σ y , and σ z .However, tracking just two noncommuting charges suffices for an initial experiment.We choose σ x and σ z .
A and B must be prepared in a tensor product of GGEs [Eq.( 2)].One procedure involves two ancilla qubits: Prepare A and an ancilla in a thermofield-double state (a purification of a GGE), using the trapped-ion protocol in [148].Discard the ancilla qubit.Repeat these two steps with qubit B and another ancilla.Generalized inverse temperatures β X α parameterize the initial state.One chooses the parameters' values as in Sec.IV, to observe the three results listed two paragraphs below.
After the state preparation, one weakly measures σ A x and σ B x , then σ A z and σ B z .One can implement a weak measurement using a qubit ancilla, using the circuit shown in Fig. 1(a) of [149].Hence the initial weak measurements require four ancillas, total.
After these weak measurements, A and B evolve under a charge-preserving unitary U θ [Eq.(23)].The trappedion platform under consideration offers a gate set formed from arbitrary single-qubit rotations and XX gates [148,150].The gate set's universality implies that U θ can be implemented, if the ions retain coherence for long enough.The two-qubit gate requires the most time-between 1 and 100s of µs [150].However, coherence times range from 100s of ms to 100s of seconds.The time scales are significantly separated, although gate errors will further restrict circuit depth [151].
After the evolution, one weakly measures σ A x and σ B x .Our abstract protocol (Sec.II B) ends with weak measurements of σ A z and σ B z .An experimentalist can replace these weak measurements with strong measurements, without hindering the reconstruction of pF from the experimental data [63].Furthermore, the replacement spares us the need for two extra ancillas.
One repeats the foregoing protocol many times.From the measurement outcomes, we infer the probability distribution over the possible measurement outcomes.One reconstructs the KDQ pF via the procedure in [63, App.A].Analogously, one infers pR from another batch of trials, guided by the reverse protocol of Sec.III C 1. Since our theoretical results are deductive, the proposed experiment essentially checks quantum theory's accuracy.However, observing three phenomena would highlight quantum features exhibited by the SEPs when charges fail to commute: (i) Observe a violation of detailed charge conservation.(ii) Observe a negative ⟨σ surp ⟩. (iii) Observe an imaginary component of σ traj .

VI. OUTLOOK
Noncommuting charges challenge common expectations about entropy production.Three common SEP formulae, though equal when charges commute, separate when charges do not.The formulae also offer different physical insights into how noncommuting charges impact entropy production.First, the noncommutation enables stochastic trajectories to violate charge conservation individually.We introduce these nonconserving trajectories, possible only if charges fail to commute, as quantum phenomena in stochastic thermodynamics.The violations of detailed charge conservation underlie commutator-dependent corrections to a fluctuation theorem.Second, initial coherences relative to charges' eigenbases can render ⟨σ surp ⟩ negative.A common (twothermal-reservoir) setup can entail such coherences only if the charges fail to commute.Hence, charges' noncommutation source a resource that can, in a sense, effectively reverse time's arrow.Third, nonreality of σ traj signals contextuality-provable nonclassicality-in a noncommuting-current experiment.Such thermodynamic signatures of contextuality-a stringent criterion for nonclassicality-are rare.These results hold arbitrarily far from equilibrium.In addition to proving these results deductively, we illustrated them numerically and sketched a trapped-ion test.
Our work introduces noncommuting charges into stochastic thermodynamics [99].The field's results now merit reevaluation, in case charges' noncommutation alters them.For example, thermodynamic uncertainty relations bound a current's relative variance with entropy production [152][153][154][155]. Lowering entropy production, noncommuting charges may increase the relative variance, increasing currents' unpredictability.Our work therefore motivates the derivation of thermodynamic uncertainty relations that highlight exchanges of noncommuting charges, using KDQs.Such relations may follow as extensions of [154].
As another avenue opened by our work within stochas-tic thermodynamics, nonconserving trajectories provide a new tool for unearthing genuinely quantum effects.Consider any charge exchange modeled with a KDQ.The KDQ decomposes into a conserving and nonconserving part.The former is the only piece that survives when the process has a classical (probabilistic) description.The average of every stochastic physical variable (analogous to entropy production), with respect to the KDQ, decomposes likewise.Hence the contribution of charge noncommutation to the average can be delineated clearly.For example, this technique could be applied to decompose the averaged stochastic work performed by a monitored quantum engine operating between noncommutingcharge reservoirs.Quantum engines offer another possible application [156]: The more entropy an engine produces, the lesser the engine's efficiency.We showed that charges' noncommutation can lower entropy production even on average: Coherences relative to charges' eigenbases serve as a resource for reducing average entropy production (Sec.III B).Hence engines might leverage such coherences.Such an engine could exchange not only heat, but also noncommuting charges, with reservoirs.One could extend the engine, proposed in [157], that leverages a spin reservoir in place of a heat reservoir.
To put the charges on even more-equal footing, one could average over them in the KDQ's and SEPs' definitions (App.F).Finally, calculating a closed form for the average trajectory SEP, for mixed global states, remains an open problem.
Experimental opportunities complement the theoretical ones.In Sec.V, we sketched a trapped-ion experiment for testing our results.Such a test would highlight the quantum features manifested by SEPs when charges fail to commute.

Appendix A MEASURING THE KIRKWOOD-DIRAC QUASIPROBABILITY VIA THE FORWARD PROTOCOL
Here, we show how the forward protocol (Sec.II A) leads to the KDQ pF [Eq.( 4)].One can infer pF from experiments by performing the forward protocol and simpler protocols. 8The proof hinges on weak measurements.
We briefly review a model for weak measurements [63,67,125,126,159].During any measurement, one prepares a detector, couples the detector to the system S of interest, and projects the detector (measures it strongly).The outcome implies information about S. How much information depends on the coupling's strength and duration.The entire measurement process evolves S's state under Kraus operators.
Kraus operators K j model general quantum operations [117].They satisfy the normalization condition Modeling a measurement that yields outcome j, the operators evolve a measured state ω as ω → K j ωK † j / Tr K j ωK † j .For example, the forward protocol's first weak measurement effects a Kraus operator The dimensionless coupling strength g 1,i1 ∈ C has a magnitude much smaller than 1.9 Hence the forward protocol evolves ρ to the (un-normalized) conditional state This expression's trace equals the probability that, upon projecting all the detectors, one obtains the outcomes associated with i 1 , i 2 , etc.We can substitute in for each K from equations of the form (A1).Then, we multiply out the factors.In the resulting sum, one term contains 2c projectors Π leftward of ρ and 2c identity operators 1 rightward of ρ.That term is the real or imaginary part of pF [Eq.( 4)], depending on whether the g's are real or imaginary.pF is an extended KDQ, containing > 2 projectors [67].However, we call pF a KDQ for conciseness.One can replace the final weak measurement with a strong measurement, for experimental convenience.The outermost Kraus operators in (A2)-the K 1,f1 and K † 1,f1 -will become Π 1,f1 's.The trace will contain a term . The rightmost projector can cycle around to become the leftmost.Since Π 1,f1 Π 1,f1 = Π 1,f1 , pF [Eq.( 4)] again results.

Appendix B DEGENERATE CHARGES
This appendix concerns generalizations of our results to degenerate charges Q α .Charge degeneracies would affect the definitions of the KDQ (4), pF , and the surprisal SEP (12), σ surp .Each quantity is defined in terms of projectorsat least one charge's product basis, {Π α,k }.If a Q α is degenerate, at least one of its eigenprojectors Π α,j will have rank > 1.We have two choices of projectors to use in defining pF and σ surp : We can use degenerate projectors or pick one-dimensional projectors.Each strategy has a drawback, although apparently not due to charges' noncommutation: The drawbacks arise even in the commuting and classical cases.Future work can elucidate degeneracies in greater detail and identify whether degeneracies can play a special role in the noncommuting case.
According to the first strategy, we continue to use the charges' eigenprojectors, regardless of ranks.pF and σ surp would retain their definitions, (4) and (12).Awkwardly, the SEP formulae would no longer equal each other in the commuting case, even if ρ were diagonal with respect to the charges' shared eigenbasis.
To illustrate, we suppose that the dynamics conserve only one charge.We drop its index 1 from eigenvalues λ 1,k and from eigenprojectors.According to Eq. ( 7), the charge SEP is Due to the rank factors, σ surp ̸ = σ chrg .Second, we can define pF and σ surp in terms of rank-one projectors only.If a Q α has a degenerate eigenspace, we must choose an eigenbasis for the space.The SEP formulae will remain equal in the commuting case.However, different choices of projectors engender different correction terms in the σ chrg fluctuation theorem (10) and in the σ surp fluctuation theorem (14).The corrections' varying with the basis choice suggests unphysicality.
For example, let each of A and B be a qubit.We express operators relative to an arbitrary basis: Q 1 = 1 0 0 1 , and

Appendix C CHARGE STOCHASTIC ENTROPY PRODUCTION
This appendix concerns σ chrg (Sec.III A 1).We prove the fluctuation theorem (10) in App.C 1, and explain detailed charge conservation in App.C 2.

C 1 Proof of the charge fluctuation theorem
Here, we prove the σ chrg fluctuation theorem [Eq.(10) in Sec.III A 3]: Let us add and subtract to and from the right-hand side of Eq. ( 7): We first calculate the fluctuation theorem's right-hand side in the commuting case.The first parenthesized term in Eq. (C2) vanishes when evaluated on conserving trajectories (App.C 2).If the charges commute, therefore, This expression is the fluctuation theorem's RHS in the commuting case (and equals 1 when ρ is the usual tensor product of thermal states).We now compute ⟨e −σ chrg ⟩ in the noncommuting case.To identify a correction, we separate out a term of the form (C4).All other terms will be commutator-dependent corrections.First, we insert the definitions of σ chrg [Eq.(7)] and pF [Eq.( 4)] into the fluctuation theorem's left-hand side (LHS).For conciseness, we suppress the indices We now massage this expression to bring out the commutator-dependent corrections.As always, 1 operators are implicitly tensored on wherever necessary.We replace the expressions To arrive at the second line, we canceled the exponentials that contained Q tot c .In the third line, canceling the exponentials involving . This swap induced the commutatorcontaining summand.Continuing in this fashion-bringing all the Q tot α -dependent exponentials together and inducing a commutator each time-we arrive at the desired form: We now expand on how the right-hand side simplifies to 1 in the commuting case.First, the c − 1 commutatordependent terms vanish.For example, consider the commutator e c U e ∆βcQ A c .The first argument commutes with e ±∆βcQ A c because the charges commute.Also, the first argument commutes with U because of charge conservation.Hence the commutator vanishes.
Second, the first term in Eq. (C9) equals 1.The thermal state [Eq.( 1)] expands as a product so the term simplifies as: The third equality follows from charge conservation.

C 2 Detailed charge conservation
The KDQ obeys detailed charge conservation if pF is nonzero only when evaluated on indices that satisfy If the dynamics conserve just one charge, the KDQ obeys detailed charge conservation, we show in App.C 2 i.Appendix C 2 ii generalizes the argument to multiple commuting charges.
C 2 i Detailed charge conservation in the presence of only one charge Here, we prove that the KDQ obeys detailed charge conservation in the presence of only one charge.We omit the charge's index to simplify notation.The total charge eigendecomposes as Since U commutes with Q, U has the same block-diagonal structure: U = k B k , wherein B k has support only on the subspace projected onto by Π k .
The relevant KDQ is pF (i C 2 ii Detailed charge conservation in the presence of commuting charges Suppose that the dynamics conserve multiple charges that commute with each other.We show that the KDQ satisfies detailed charge conservation.Recall the form of pF in Eq. ( 4).Since the charges commute, every eigenprojector in pF commutes with every other.Thus, rearranging the projectors does not alter the quasiprobability.We bring the initial and final charge-α eigenprojectors beside U : By the reasoning for one charge, unless α , the projected unitary Π α,fα U Π α,iα = 0, and hence pF = 0.This conclusion governs an arbitrary α, so pF satisfies detailed charge conservation.The third line follows because σ chrg = κ on conserving trajectories, by the σ chrg definition (7) and the definition (11) of conserving trajectories.Therefore, the fluctuation theorem's second term equals the average, over nonconserving trajectories, of e −σ chrg − e −κ .

Appendix D SURPRISAL STOCHASTIC ENTROPY PRODUCTION
This appendix supports claims made about σ surp in Sec.III B 1. First, we complete the motivation for σ surp 's definition (App.D 1).We show that the charge and surprisal formulae equal each other in the commuting case (App.D 2); calculate ⟨σ surp ⟩, proving Eq. ( 13) (App.D 3); and prove the fluctuation theorem (14) for σ surp (App.D 4).

D 1 Motivation for the suprisal SEP formula
Section III B 1 partially motivated the σ surp definition (12).Information theory suggested that the SEP depend on surprisals.The surprisals are of particular probabilities.Why those probabilities?This appendix motivates the choice.
We build on the first paragraph in Sec.III C 1.For simplicity, we suppose that only energy is ever measured.A classical thermodynamic story motivated the conventional SEP formula, The p F denotes the probability of observing the forward trajectory-the probability of observing E A i and E B i , times the probability of observing E A f and E B f , conditioned on the initial observations and on the forward dynamics: The reverse probability decomposes analogously: The dynamics are reversible, so the conditional probabilities cancel in (D1) [52].The trajectory SEP formula reduces to . This SEP formula is the difference of two surprisals.Each is evaluated on the probability of, upon preparing each system and measuring its energy, observing some outcome.The analog, in the noncommuting case, is Eq. ( 12).D 2 Equivalence of σsurp and σ chrg in the commuting case Throughout this appendix, we assume that the charges commute with each other: [Q α , Q α ′ ] = 0 ∀α, α ′ .We establish that σ surp and σ chrg agree: σ surp = σ chrg when evaluated on any trajectory for which pF ̸ = 0.The restriction on trajectories is a technicality; on a trajectory that never occurs, the SEPs' values are irrelevant to any calculation.
For convenience, we assume that charges' eigenvalues are ordered as follows.Q 1 's eigenvalues are ordered arbitrarily.Each other Q α 's eigenvalues are ordered so that the j th eigenvalue, λ α,j , corresponds to the same eigenvalue as λ 1,j .This ordering is possible due to the charges' nondegeneracy: They all have the same number of eigenspaces.
pF ̸ = 0 only on trajectories in which all initial indices equal each other, as do all final indices: i 1 = i 2 = . . .= i c , and f 1 = f 2 = . . .= f c .This claim follows from the ordering stipulated in the last paragraph: Up to a relabeling of eigenspaces, Π α,iα Π ζ,i ζ = 0, unless i α = i ζ .The claim now follows immediately from the KDQ's definition [Eq.(4)], On the trajectories on which pF ̸ = 0, we can simplify the σ chrg formula [Eq.(7)] by equating all the charges' i A indices, equating the charges' i B indices, equating the charges' f A indices, and equating the charges' f B indices: Consider now the surprisal SEP, which is defined in terms of measurement probabilities [Eq.( 12)].These probabilities simplify in the commuting case.Consider strongly measuring the shared eigenbasis of of system X's charges.Outcome i X α obtains with a probability The last equality follows from the charges' nondegeneracy: The eigenprojectors are rank-one.The choice of α is arbitrary, because all the charges have the same product bases.The surprisal SEP is therefore in agreement with Eq. (D5).

D 3 Calculation of ⟨σsurp⟩
Here, we prove Eq. ( 13), σ surp [Eq.( 12)] depends implicitly on fewer indices than pF depends on [Eq.( 4)].Therefore, some of the indices disappear (yield factors of unity) when summed over in ⟨σ surp ⟩.Let us substitute σ surp 's definition into the LHS of (D9), then substitute in each probability's definition.Finally, we rearrange terms: To simplify the traces, we recall the channel that dephases ρ with respect to Q α 's product basis: Φ α (ρ) :  Here, we prove the fluctuation theorem ( 14), Also, we present the correction's form.

E 1 Choice of reverse quasiprobability
Section II B introduced the forward quasiprobability [Eq.4], and Sec.III C 1 introduced the reverse quasiprobability, We motivated pR 's definition operationally in Sec.III C 1.However, other possible definitions could satisfy the constraint that, in the commuting case, σ traj must reduce to σ chrg and σ surp .Prior literature features nonunique reverse distributions (of probabilities, rather than quasiprobabilities) [52,160].The authors there distinguished one reverse distribution by specifying one of multiple possible reverse protocols.Similarly, we specify a reverse protocol from which pR can be inferred experimentally.We therefore regard pR as capturing the notion of time reversal.We can associate each KDQ with a protocol-the key stage of an experiment used to infer the quasiprobability (see App.A and [67]).One begins at one end of the trace's argument and proceeds toward the opposite end.If a projector appears on just one side of ρ, that projector corresponds to a weak measurement.The pR protocol is a time reverse of the pF protocol, we show.
We associate pF with a protocol by reading the indices in (E1) from right to left: One measures charges 1 through c weakly, evolves the state forward in time, and then measures charges c through 1 weakly.Before interpreting pR , we cycle ρ to the trace's LHS: (E3) Then, we read from left to right.In the associated protocol, one measures charges 1 through c weakly, evolves the state backward in time (under U † ), and then measures charges c through 1 weakly.Relative to the forward protocol, the time evolution is reversed, as is the list of measurement outcomes.
E 2 Equivalence of σ traj and σsurp in the commuting case In this appendix, we show that σ traj = σ surp in the commuting case.Equation ( 16) defines the trajectory SEP: Since the initial state is diagonal with respect to the 1 st product basis, ⟨i 1 | ρ = Tr(Π i1 ρ) ⟨i 1 |, and ρ |f 1 ⟩ = Tr(Π f1 ρ) |f 1 ⟩ .Therefore, The final expression is σ surp [Eq.(12)] with α = 1.(The choice of α is irrelevant in the commuting case, since all the product bases coincide.)We have already established the equivalence of σ surp and σ chrg in the commuting case (App.D 2).Therefore, we have shown that all three SEP formulae agree when charges commute.
When ρ is pure, Eq. (E8) points, for each index pair (i 1 , f 1 ), to a choice of branch of the complex logarithm in the σ traj definition.This choice enables ⟨σ traj ⟩ to signal contextuality.If ρ is mixed, in the absence of a more explicit ⟨σ traj ⟩ expression, it is not clear what choice enables ⟨σ traj ⟩ to signal contextuality.This symmetrized SEP is closely related to the symmetrized KDQ.As in the unsymmetrized case, define the trajectory SEP as the ratio of forward and reverse quasiprobabilities.However, perform the averaging after taking the ratio: The factors' cancellation simplifies the sum to be only over c charges, rather than c! permutations.If ρ is pure, the average is The weak-value phases for general α are defined analogously to the weak-value phases in Sec.III C 2.

III C 4 .
Fluctuation theorem for trajectory SEP Passing another sanity check, σ traj satisfies the correction-free fluctuation theorem e −σtraj = 1.
) Now, we commute each e −β B α Q tot α from the left of U to the right, until the exponential cancels with its counterpart, e β B α Q tot α .Here are the first few manipulations, starting with the e −β B c−1 Q tot c−1 in the leftmost half of the trace's argument:

D 4
Proof of fluctuation theorem for σsurp

)
Each summand in Eq. (E8)'s RHS depends on one index, i 1 or f 1 .(Ifρ is mixed, σ traj does not decompose in this manner.Hence new techniques are required to compute the average.)Therefore,averaging ϕ F − ϕ R with respect to pF yields separate averages with respect to probability distributions.Hence ⟨ϕ F − ϕ R ⟩ is real, and i⟨ϕ F − ϕ R ⟩ is imaginary.Our task reduces to showing that log f1 ⟨Π 1,i1 ⟩ ρ i1 ⟨Π 1,f1 ⟩ ρ