Discrimination of thermal baths by single qubit probes

Non-equilibrium states of quantum systems in contact with thermal baths help telling environments with different temperatures or different statistics apart. We extend these studies to a more generic problem that consists in discriminating between two baths with disparate constituents at unequal temperatures. Notably there exist temperature regimes in which the presence of coherence in the initial state preparation is beneficial for the discrimination capability. We also find that non-equilibrium states are not universally optimal, and detail the conditions in which it becomes convenient to wait for complete thermalisation of the probe. These concepts are illustrated in a linear optical simulation.

Non-equilibrium states of quantum systems in contact with thermal baths help telling environments with different temperatures or different statistics apart.We extend these studies to a more generic problem that consists in discriminating between two baths with disparate constituents at unequal temperatures.Notably there exist temperature regimes in which the presence of coherence in the initial state preparation is beneficial for the discrimination capability.We also find that non-equilibrium states are not universally optimal, and detail the conditions in which it becomes convenient to wait for complete thermalisation of the probe.These concepts are illustrated in a linear-optical simulation.

I. INTRODUCTION
The reduced dynamics of a quantum system interacting with an external environment is typically insensitive to many characteristic features of the latter [1][2][3].Yet some macroscopic properties of the bath (say its temperature) may have a non trivial influence on the resulting equations of motion, paving the way to the possibility of probing these quantities via measurements performed on the system alone [4][5][6][7][8][9][10][11][12][13][14].
Relying on these observations, in Ref. [15] a statistics tagging scheme has been presented, allowing to determine the fermionic or bosonic character of a thermal bath E by detecting the modifications induced on a quantum probing system A put in thermal contact with E for some proper interaction time t.The analysis was conducted assuming the temperature of the bath to be known and, most importantly, equal in the two alternative scenarios.Under this condition, waiting for the complete thermalization of A (i.e.setting t → ∞) is clearly not a valuable option to get useful information on the nature of the bath: indeed as t diverges the probe will be driven toward the same final thermal equilibrium configuration irrespectively from the statistics of E, hence keeping no track of its fermionic or bosonic character.As a consequence the optimal discrimination performances in Ref. [15] were obtained at times t where the evolved state of A was explicitly in a non-equilibrium condition.Superiority of non-equilibrium conditions for measurement purposes are not unique to the statistics tagging procedure discussed in [15]: a similar behaviour can be observed in thermometric tasks, when we want to infer the temperature of a bosonic bath by the same interaction with a probe.Even if the thermalized states corresponding to different temperatures can be discriminated, there is an advantage when measuring the probe at earlier times [16][17][18].Interestingly enough, the statistics tagging setting and the thermometric setting also share another common feature: indeed in both schemes the input states of the probe which ensure optimal performances correspond to energy eigenstates of its local Hamiltonian, quantum coherence playing no fundamental role in the procedure (see however [8]).In an effort to check the generality of these observations (i.e. the optimality of using non-equilibrium observation times t and energy diagonal input states of the probe), here we cast the problem studied in Ref. [15] in a more complex framework by looking at the discrimination between two alternative thermal baths models which differ both in terms of their statistical properties and in terms of their associated temperatures.The analysis relies on information theoretical quantities which admit clear operational interpretations in quantum metrology [19][20][21][22].In particular the minimization of the Helstrom probability of error [23] enables us to confirm that also for the generalized statistics tagging scenario we address here, optimal discrimination performances are obtained by monitoring the probe at times where it is in a non-equilibrium configuration.Yet in this case it turns out that such result strongly relies on the possibility of exploiting coherence in the input states of A: indeed when restricting the study to initial configurations of the probe with no coherence among the eigenstates of the system local Hamiltonian, we can exhibit explicit examples of the model parameters for which the best discrimination conditions are only met at equilibrium.The paper is organized as follows: in Sec.II we introduce the model and present the figure of merit we are going to use in our analysis.Section III contains the main results of the paper discussing the role of coherent energy terms in the input state of the probe as well as the fact that non-equilibrium detection times are not always optimal if one restrict the analysis to initial configurations which are diagonal in the energy eigenbasis.In Sec.IV the previous concepts are illustrated in a linear optical simulator [24,25].The simulation allows to mimic two different dissipative channels for a two level system [26].In the typical tagging scenario, in which we have no a priori knowledge of which one of the channels is acting on the probe, we perform a set of measurements on the system and we reconstruct the original hypothesis via suitable statistical inference.In particular, we relied on a Bayesian technique [27] for constructing the error probabilities and providing a connection of this last with the theoretical figures mentioned above.Conclusions are presented in Sec.V while technical material is presented in the Appendix.

II. THE MODEL
The model we study can be schematized as follows.At time t = 0 a two-level (qubit) quantum probe A is prepared in some fiduciary initial density operator ρ(0) and let interact for some time t with a partially unknown environment E that can be of two types: bosonic at temperature 1/β b , or fermionic at temperature 1/β f (the values 1/β b and 1/β f being assigned a priori).As in Ref. [15] we shall attempt to discriminate among the two alternatives by only performing measurements on the reduced final state ρ(t) of A, which hence encodes all the information about the nature of E one can access.This allows us to describe the whole scheme as a standard hypotheses testing problem [23] where one has to determine whether ρ(t) corresponds to the density matrix ρ b (t) of A which one would have obtained by evolving ρ(0) under the influence of the bosonic bath of temperature 1/β b , or to ρ f (t), which instead one would have obtained by evolving the same ρ(0) under the influence of the fermionic bath of temperature 1/β f .To quantify our ability in discriminating between these scenarios we can then use the Helstrom error probability (HEP) functional with • • • 1 being the trace-norm symbol.This quantity, bounded between [0, 1/2], provides the smallest probability of error one can get by optimizing over all possible measurements performed on a single copy of ρ(t) [23]: accordingly, having H(ρ b (t), ρ f (t)) = 0 corresponds to perfect distinguishable configurations, while having H(ρ b (t), ρ f (t)) = 1/2 corresponds to absolutely indistinguishable configurations.
In order to get an analytical expression for (1) we assign ρ b (t) and ρ f (t) in terms two independent Gorini-Kossakowsky-Sudarshan-Lindblad master equations for A obtained under standard weak coupling system-bath assumptions [1,2].Moving into the interaction picture representation we write them as [15,28,29] the index q = f, b referring to the two hypothetical initial configurations of the bath.In the above expression s q = +(−)1 for q = b (f ), γ is the inverse time constant associated to each elementary excitation/de-excitation process, represent the Lindblad dissipators associated respectively with the system ladder operators σ − = |0 1| and σ + = |1 0| (|0 and |1 representing respectively the ground and excited state of A), while finally is the Bose-Einstein (Fermi-Dirac) distribution for q = b (f ), with ω being an effective energy parameter [3,29] that contains a contribution from the bare energy of A and from the chemical potential of the baths [30].Introducing the Pauli vector operator σ := (σ x , σ y , σ z ), and writing the density matrix of the system in the Bloch vector formalism ρ q (t) = 1+ σ• a (q) (t) 2 , Eq. ( 2) can then be conveniently casted in the form x,y (t) = − γ q 2 a (q) x,y (t), where now showing that in the case of equal temperatures, the evolution occurs at faster scales for the bosonic bath scenario.Explicit integration of (5) leads finally to the solution x,y (t) = e −γqt/2 a x,y (0), with a x,y,z (0) being the cartesian components of the Bloch vector associated with the input state ρ(0) of A, while defining the equilibrium (thermal) configuration of the system (of course a (q) x,y (∞) = 0).

III. DISCRIMINATION PERFOMANCES
Using the fact that the trace-norm of the difference between ρ b (t) and ρ f (t) is just given by the Cartesian distance | a b (t)− a f (t)| of the associated 3D Bloch vectors, from (7) it follows that Eq. ( 1) can be expressed as A close inspection reveals that all pure input states ρ(0) with the same initial value of a z (0) achieve the same performance (this simply follows from the symmetry of Eq. ( 5) around the z-axis).Furthermore for all assigned values of t and a z (0), one may notice that the associated HEP can be reduced by setting the length of a(0) at its maximum 1, i.e. imposing the initial state of the probe to be pure.This leads to which only depends on the z-component a z (0) ∈ [−1, 1] of the unit vector a(0).It is worth recalling that fixing a z (0) = 1 (a z (0) = −1) corresponds to initialize A into the excited state |1 (ground state |0 ) of its local Hamiltonian.On the contrary, in the pure case scenario we are facing in Eq. ( 10), the condition |a z (0)| < 1 identifies input states of the probe which are proper superpositions of the energy eigenstates of the model.Our next goal is to minimize H(t; a z (0)) with respect to all possible choices of a z (0) and of the evolution time t, for given values of the temperatures 1/β f and 1/β b .Before doing so, however, we find useful to consider first what happens when a z (0) = 1, a choice that is known to provide the best discriminating strength for statistical tagging under equal bath temperature assumption (i.e.β f = β b ) [15] and for thermometry [16].

A. Input excited state
Setting a z (0) = 1, i.e. assuming A to be initialized in the excited state |1 of the model, Eq. ( 10) reduces to which we minimize numerically with respect to t as a function of β f and β b .The optimal times t we obtain and the corresponding values of H( t; 1) are reported in Fig. 1(a) (left and right plots, respectively).The plot reveals an asymmetry: for β b ≥ β f (fermion bath hotter than bosonic bath) the best discrimination is still attained at finite time ( t < ∞) where A has not achieved full thermalization and is hence in a non-equilibrium configuration in line with the findings of Ref. [15]; on the contrary for β b < β f (fermion bath cooler than bosonic bath) it can be more convenient to discriminate the two channels by exploiting the steady state properties ( t = ∞).This happens above the critical curve that defines the discontinuity in the left contour plot of Fig. 1(a).An analytical treatment of this transition is given in Appendix A, from which it results that expressed in the x = tanh(β f ω/2), y = tanh(β b ω/2) coordinates of Fig. 1, such critical curve is identified by solving the following set of transcendental equations with τ ≥ 0. We remark that the core of the above observation remains unchanged when we evaluate the discrimination efficiency of the process adopting different figures of merit.For instance in which via the inequality gives a bound to the asymptotic rate of HEP computed in the case when one has the possibility of extracting information from N identical copies of the final state of A.
The optimal values of t obtained by numerically minimizing (13)  the analysis to the case where A is set into the excited state there are configurations of the model where the optimal discrimination efficiency is attained only letting the system to reach its equilibrium configuration.

B. Optimal input states of the probe
In this section we now exploit the full domain of possibilities offered by the model, minimizing the HEP value ( 10) not just with respect to t, but also with respect to the full domain of a z (0), hence including the possibility of using input states of A which explicitly exhibit coherence superpositions among the excited and ground state of the model.An indication that such special states could be of some help in improving the performance of the scheme follows by observing that for |a z (0)| < 1 it is not possible to find times t > 0 such that H(t; a z (0)) reaches the worst case value of 1/2 corresponding to an absolute impossibility of distinguishing among the two bath scenarios.This implies that coherent energy input states ensure a non-trivial susceptibility of the probe for all choices of t, something that, on the contrary, is not generally granted by setting a z (0) = ±1 which, as discussed in Appendix B 1, allows for crossing points between the trajectories ρ b (t) and ρ f (t).Values of |a z (0)| < 1 can however do much more than this and in some regimes, they also give the absolute best performance we can aim to: the details of the analysis are provided in Appendix B 2 while in Fig. 2 we illustrate the optimization of the HEP H(t; a z (0)) over time and input state of the probe, as a function of the bath inverse temperatures β f and β b .
The first thing to be noticed is that now, at variance with the input excited state case discussed in Sec.III A, the optimal times t are always finite apart from the asymptotic regimes where the bosonic temperature converges to zero (i.e.β b → ∞) -compare Fig. 2 (a) with the left plot of Fig. 1 (a).This shows that optimality of non-equilibrium probing times is fully restored once we do not restrict the probe input state to specific con-  10) both over time and over the input state of the probe, the last being a generic pure state with a certain value az(0) of the z-component of the Bloch vector.We report the following contour plots with respect to the bath inverse temperatures β f and β b .The minimum H(āz(0)) of the HEP is achieved at a certain time t (a) and for an optimal value āz(0) of az(0) (b).The advantage coming from allowing coherent superpositions is presented in (c), where we show the gap between the (generally overestimated) quantity obtained by restricting the analysis only to az(0) ∈ {1, −1} and the optimal value H(āz(0)) .Notice that for β f , β b and t we used the convenient parametrizations indicated in the plot labels.Panel (d): dynamical evolution of H(t; az(0)) for a case (tanh(β f ω/2) ≈ 0.68 , tanh(β b ω/2) ≈ 0.41) in which coherent superpositions (āz(0) ≈ −0.42) give better performances than the energy eigenstates (az(0) ∈ {1, −1}) as input of the probe.Notice that at t ≈ 1.8γ −1 the HEP associated with excited state reaches the worst case value 1/2 indicating zero susceptibility of the probe.
ditions.Secondly Fig. 2 (b) reveals that, while using energy eigenstates (either excited or ground states) of the probe as input is optimal for most of the choices of the system parameter setting, there is a non trivial temperatures regime in which a coherent (|a z (0)| < 1) initial preparation is fundamental to reach the best performance.More specifically, there is numerical evidence that whenever the fermionic bath is hotter than the bosonic one (β b ≥ β f ), choosing the excited state of A as input is still the right choice to provide optimal discrimination performances.The situation changes however if the fermionic bath is cooler than the bosonic one (β b < β f ): here the optimal input choice depends on the specific values of the temperatures and in particular for sufficiently large β f coherent energy states can dominate (notice also that, for small values of β b , the optimal input can be the ground state of A).These facts are also enlightened in Fig. 2 (c) in which we show the gap between the minimum of H(t; a z (0)) obtained by restricting the optimization only to a z (0) = 1 and a z (0) = −1 and the optimal value H(ā z (0)) obtained by allowing also energy coherent preparations.
In panel (d) of Fig. 2 we finally present as an example the temporal evolution of the HEP for a specific choice of the temperatures that admits as optimal the value āz (0) ≈ −0.42 that identifies a coherent superposition of energy eigenstates.In such a plot we show H(t; āz (0)) aside with the HEP values H(t; −1) and H(t; 1) associ-ated with the ground and excited input state of A. Notice that while for small t, H(t; −1) and H(t; 1) perform better than H(t; āz (0)), in the long run the latter gives the lowest HEP values and leads to the identification of the optimal time as t ≈ 1.6γ −1 -see Appendix for more on this.Notice also that at t ≈ 1.8γ −1 , we have H(t; 1) = 1/2 indicating that at this special time the probe intialized into the excited state looses all its ability in discriminating between the two alternative hypothesis: on the contrary, as anticipated in the introductory paragraphs of the section, H(t; āz (0)) remains strictly below the 1/2 value for all positive t.FIG. 3. Linear optical simulator.The state at time τ can be simulated by mixing with weights w k the actions of two channels (k = 0 and k = 1), associated to excitation and deexcitation processes, for a given rotation R(φ) (upper panel).By tuning w k and φ evolutions at different temperatures and at variable times are simulated [24,25].This is implemented in a linear-optical setup, based on polarisation coding on two photons from a down-conversion source (lower panel).Singlequbit operations are either implemented by half-wave plates, or in post-processing of the data.The input state is fixed in the horizontal polarisation.Due to the use of a single partially polarising beam splitter (PPBS), there is a different transmission probability for the horizontal and vertical components, which is compensated by biassing the second R(φ) rotation [33].Further, the weights w k have to be modified accordingly.

IV. DISCRIMINATION EXPERIMENT IN AN OPTICAL SIMULATOR
We can illustrate these concepts in a simulated thermalisation, carried out with a pair of qubits; the necessary gate is implemented by means of optical ele-ments and coincidences counts.The setup, illustrated in Fig. 3, follows closely our previous work in Ref. [24].We stress that our simulator cannot replicate directly the bosonic/fermionic nature of the bath; the control parameters are exclusively the decay rates γ f or γ b in Eq. ( 5), and the population of the final thermal state.In this respect, our implementation is a synthesis of the output state.Therefore, we focus on the information content of the probe, rather than the interaction process.
We consider a two level system initialized in the excited state as the input probe.The expectation values of σ z measured as a function of the normalized time τ = γt are shown in Fig. 4 for different inverse temperatures βω = 0.5, 1, 2, taken equal for fermionic and bosonic baths.The two different curves in each panel illustrate how the decay rate of the probe state gets modified by the two different statistics.
In a discrimination experiment, the sought outcome is a binary decision on which one of the two hypotheses gives a closer description of the data [34][35][36][37][38][39].These will be obtained as outcomes of a suitable observable, selected according to the initial state and the measurement time.For our choice of initial state, this observable always coincides with σ z .In many different (and independent) runs of the experiment, one collects N 0 events for the eigenvalue -1 and N 1 events for the eigenvalue +1 of σ z .Since the probabilities of obtaining either result on a single copy are , where the value of σ (q) z is the expectation value predicted by the experiment, the composite probability is P = P N0 0 P N1 1 .Clearly, the probability P depends on the bath statistics and temperature through the expectation value σ z .We can thus interpret P as a conditioned probability P(N 0 , N 1 |X) of the whole experimental run, given the condition X of the bath.Invoking Bayes theorem this writes: where N is a normalization constant and P (X) is the a priori probability which we take to be flat P (b) = P (f ) = 1/2.The decision criterion is that when P (b|N 0 , N 1 ) > P (f |N 0 , N 1 ), the bath is identified as bosonic with inverse temperature β b , otherwise as fermionic with inverse temperature β f .In accordance with the literature [23,40], we quantify the expected discrimination error as: where we have fixed N q,βq i = P i • N , (N =10,100) as the ideal limit.The first case we analyse is that of statistical tagging β b = β f , for which optimal discrimination necessarily occurs at finite times.In Fig. 5 we show the behaviour of δ for β b = β f .We notice that the small discrepancies observed with respect to the theory do not affect the estimation significantly.It appears evident how, for high temperatures, the choice of a preferable discrimination time becomes less strict with increasing copies N .On the other hand, the proximity of the two curves in Fig. 4(c) is reflected in the fact that at low temperatures more copies are needed for a fully reliable discrimination.
Concerning the more general scenario of different temperatures and statistics, we have evaluated δ for all permutations of βω = 0.5, 1, 2 and for N = 10, 100 in the same ideal limit as above.The results are shown in Fig. 6.Notably, for β b < β f there is a special time instant where the discrimination is impossible, in analogy to what we obtained for the HEP -see Panel (d) of Fig. 2.This can be observed in Panels (a), (b) and (d) of Fig. 6 where, contrarily to the other Panels, δ takes the value 1/2 at an intermediate time.We report in Fig. 7 contour plots showing the calculation of the optimal measurement time and of the corresponding minimized error probability when using the Bayesian method in the ideal situation.Consistently, the results mimic the ones obtained via Helstrom and Chernoff approaches -see Fig. 1.
We then carry out the actual discrimination protocol as follows.We generate, based on the experimental values of P 0 and P 1 a vector of N = 100 outcomes 0, 1 [41].This is a reliable evaluation of our experimental conditions, as the data are marginally affected by systematic errors such as dark counts, and we are considering samples much smaller than those collected to estimate P 0 and P 1 in the calibration step.The results are reported, for a vector of N = 100 generated outcomes, in the histograms of Fig. 8 for different choices of scenarios, considering both instances in which the probe is associated to a bosonic or a fermionic bath, in accordance to the fact that the error δ is symmetrised.
For each simulated time τ we indicate with different colours the fraction of events in which the bath has been correctly identified (blue) or mistaken (red) by following the Bayesian decision rule explained above -now with the actual values of N 0 and N 1 , rather than their expected ones.The observed behaviours qualitatively mir-ror the errors in Figs. 5 and 6.Since N 0 and N 1 are now random variables, the discrimination capability exhibits deviations from the expected case.

V. CONCLUSIONS
Statistical tagging [15] and, more generally, bath discrimination, is a simple yet insightful instance of the possibility of indirectly probing an environment [4][5][6][7][8][9][10][11][12][13][14]42].In this setting, information about the bath structure are retrieved via measurements on a quantum probe which has interacted with the bath up to a selected measurement time t .This approach reveals how different properties of the bath affect the nature of the optimal discrimination procedures.This is clear in the tagging context presented here: a thermal bath has an unknown statistics -fermionic or bosonic -that we want to guess, with the additional information of knowing the respective temperatures -1/β f and 1/β b -associated to the two bath instances.Here the quantum nature of the problem is manifested both in the statistical properties of the bath and in the coherence of the single-qubit probe.For input energy eigenstates, our inspection has revealed a transition between temperature regimes in which either equilibrium -t → ∞ -or non-equilibrium states -t < ∞ -are optimal.Such behavior has been illustrated both theoretically and in a linear-optical simulation.States with quantum coherence, instead, do not display such transition -i.e.non-equilibrium conditions are generally optimal -and their inclusion allows to reach the best discrimination capability.Extensions of this work may concern baths with richer features, such as very large baths presenting squeezing or, to the other extreme, small environments, entailing more involved treatments.There, we can expect coherence properties of the probe to become even more relevant, thus adding richness and complexity to the observable phenomenology.D.F. and V.G. acknowledge support from PRIN 2017 "Taming complexity with quantum strategies".During the completion of this manuscript, the authors became aware of a related work in preparation by L. Mancino et al. "Non-equilibrium readiness and accuracy of Gaussian Quantum Thermometers" also dealing with metrological tasks by means of indirectly measuring environments via quantum probes.

A. Excited input state
Equation ( 1) clearly shows that the minimal values of HEP are achieved when ρ b (t) − ρ f (t) 1 gets maximum.From Eq. ( 11) it follows that for the case of excited input state, i.e. for a z (0) = 1, this quantity can be expressed as where, for ease of notation, we introduced and explicited γ f = γ, γ b = γ/y.Studying the Eq. ( 17) as a function of t we can infer which instant is optimal to perform a single measurement for discriminating between the two hypotheses.
As first, we notice that D(t, x, y) nullifies at t = 0 (obviously) and at most in another point, since by solving D(t, x, y) = 0 we have The unicity of the solution can be argued using the monotonicity of the r.h.s. of Eq. (19).Notice that the other solution (at t = 0) cannot be obtained from Eq. ( 19) since we divided by (1 − e −γt ) that nullifies in that case.The first derivative of D(t, x, y) with respect to time reads that clearly nullifies in the long time limit γt → ∞.To find other zeroes of D we have to solve the following equation that can have at most one solution since the r.h.s. is a strictly decreasing function.In addition, it is possible to prove that, calling t 1 and t 2 the zeores at finite time respectively of D(t, x, y) and of its first derivative, we have t 1 ≥ t 2 .Indeed they satisfy the two equations ( 19) and ( 21) from which we derive Now we can use the following inequality: e −γt 2 (y −1 −1) y ≤ 1−e − γt 2 y 1−e −γt 2 , from which t 1 ≥ t 2 can be argued using the decreasing properties of both sides of Eq. (22).
As a last step we want to study the behaviour of the zeroes in the parameters x, y.It is straightforward to verify that Eq. ( 17) has no solutions if x < y, since there is no crossing between the bosonic and fermionic evolutions in this case.Notice that, following the definition of x and y, this last condition is equivalent to require the inverse temperature β f in the fermionic case to be lower than the one in the bosonic case β b .Notice instead that the Eq. ( 21) always nullifies once, independently from the value of x, y.In conclusion, we have two possible qualitative trends for the trace norms (17): 1.If β f < β b , D(t) starts from 0 and never nullfies again.The derivative of D is zero once, in such a way that there is one single maximum.This case includes the analysis done in [15] in which β f = β b was considered.
2. If β f > β b , D(t) reachs a maximum in t 2 , then decreases to a point t 1 in which attains the value 0. After t 1 D(t) starts increasing again and remain monotonous when going to infinity.

Analysis of the critical point
For the sake of characterizing the optimal measurements, we should find the maxima of the trace norm studied in the previous section.In the case β f < β b there is only one maximum, the measurement should be clearly done in the instant of time associated to that maximum.In the case β f > β b the intermediate maximum could be both greater or lesser than the value attained by D(t) at infinitely long times.In the following we will show that, again in dependence on the values assumed by the inverse temperatures β f and β b , either one or the other strategy can be the best one.
To give a clear formulation to this question from a formal point of view, let us define the following function The zeroes of the function defined above correspond to the points in which D(t) attains the same value as it does at t = ∞.Thus, if the equation g(t, x, y) = 0 has no solutions, the absolute maximum is clearly located at t → ∞.
Otherwise, given the properties of D(t) enumerated in the previous section, the function g(t, x, y) can have at most two zeroes, depending on the values of x and y.In this last case, the maximum is not located at t = ∞, since this last point is equal to at most two other values that the function D(t) attains at finite time.It is also understood that the points in which g(t, x, y) has a unique zero (that will be referred from now as critical) are the ones in which D(t) has two absolute maxima (identical in value).If we fix the value of y to some value ȳ, we have that in a critical point the solution x c (t, ȳ) of g(t, x, ȳ) = 0 must be such that ∂ ∂t x(t, ȳ) = 0 evaluated in the critical point (this last property is derived from the regularity of g and the definition of critical point, in which the Eq.g(t, x, y) = 0 passes from having zero to two solutions).We can then derive, using the definition of g, the following set of equations for the critical point that replacing γt with τ gives the Eq. ( 12) of the main text.For instance, choosing ȳ = 1/2 we have and t c = log( 2 ).Then, if we choose x < x c the better strategy is to measure at finite time, while if x > x c the measurement at the steady state is the optimal one.

B. Discrimination with generic pure input states
Here we proceed with an analytical analysis of the HEP functional H(t; a z (0)) defined in Eq. (10).

Loss of susceptibility under non-coherent inputs
The worst discrimination scenario is attained when HEP reaches its maximum value 1/2: when this happens the probability of error is maxima and we cannot recover information on the nature of the bath from the state of A. From

FIG. 1 .
FIG. 1. Panel (a).Left: Study of the optimal measurement time t minimizing the Helstrom error probability H(t; 1) of Eq. (11) associated to the excited input state of the probe A (i.e.az(0) = 1), as a function of the bosonic and fermionic bath inverse temperatures β b and β f , using the convenient parametrizations indicated in the plot labels.The discontinuity in the contour plot is the boundary above which the discrimination is optimal only if performed on the steady state of the probe ( t = ∞ , i.e. e −γ t = 0), the same holding for the pathological case β b = ∞ (tanh(β b ω/2) = 1).For all the other values of the parameters β b and β f the optimal time is finite ( t < ∞ , i.e. e −γ t > 0).Right: Corresponding Helstrom probability of error H(t; 1) evaluated at t = t.Panel (b): same calculation as in (a) but using the Chernoff quantity (13) instead of the Helstrom error probability.
Fig 1(b)  we focus on the Chernoff quantity[31,32] when initializing A in the excited state |1 , are presented in Fig 1(b) exhibiting a critical trade-off analogous to the one observed in Fig 1(a): if we restrict FIG. 2. Panels (a)-(c): Optimization of the HEP H(t; az(0)) of Eq. (10) both over time and over the input state of the probe, the last being a generic pure state with a certain value az(0) of the z-component of the Bloch vector.We report the following contour plots with respect to the bath inverse temperatures β f and β b .The minimum H(āz(0)) of the HEP is achieved at a certain time t (a) and for an optimal value āz(0) of az(0) (b).The advantage coming from allowing coherent superpositions is presented in (c), where we show the gap between the (generally overestimated) quantity obtained by restricting the analysis only to az(0) ∈ {1, −1} and the optimal value H(āz(0)) .Notice that for β f , β b and t we used the convenient parametrizations indicated in the plot labels.Panel (d): dynamical evolution of H(t; az(0)) for a case (tanh(β f ω/2) ≈ 0.68 , tanh(β b ω/2) ≈ 0.41) in which coherent superpositions (āz(0) ≈ −0.42) give better performances than the energy eigenstates (az(0) ∈ {1, −1}) as input of the probe.Notice that at t ≈ 1.8γ −1 the HEP associated with excited state reaches the worst case value 1/2 indicating zero susceptibility of the probe.

FIG. 4 .
FIG. 4. Simulated thermalization dynamics of the probe initialized in the excited state.The behaviour of the expectation value σz as a function of the time τ = γt is reported for (ω ≡ 1) β b = β f = 0.5, 1, 2 (left, middle, and right panel, respectively).Blue (red) experimental points refer to the bosonic (fermionic) statistics of the bath.Error bars are smaller than the size of the points.

FIG. 5 .
FIG.5.Estimation errors for statistical tagging.The error δ is reported for a)β b = β f = 0.5 b) β b = β f = 1 c) β b = β f = 2 (ω ≡ 1).In all panels, points are evaluations of the expected errors based on the experimental probabilities, and the curves are the ideal cases for N = 10 (green squares) or N = 100 (purple triangles).The probe was initialized in the excited state.

FIG. 7 .FIG. 8 .
FIG.7.Same study as in Fig.1but for the error probability δ of Eq. (16) based on the Bayesian approach for N=10 (Panel a) and N=100 (Panel b).To allow a direct comparison for different N and with the figures of merit of Fig.1, we report instead of δ its rescaled version 1/2[2δ] 1/N .We remark that as for Fig.1the probe was initialized in the excited state.