Optimal Probes for Global Quantum Thermometry

Quantum thermodynamics has emerged as a separate sub-discipline, revising the concepts and laws of thermodynamics, at the quantum scale. In particular, there has been a disruptive shift in the way thermometry, and thermometers are perceived and designed. Currently, we face two major challenges in quantum thermometry. First, all of the existing optimally precise temperature probes are local, meaning their operation is optimal only for a narrow range of temperatures. Second, aforesaid optimal local probes mandate complex energy spectrum with immense degeneracy, rendering them impractical. Here, we address these challenges by formalizing the notion of global thermometry leading to the development of optimal temperature sensors over a wide range of temperatures. We observe the emergence of different phases for such optimal probes as the temperature interval is increased. In addition, we show how the best approximation of optimal global probes can be realized in spin chains, implementable in ion traps and quantum dots.


I. INTRODUCTION
Recent advancements in quantum technologies have pushed the boundaries of thermodynamics into new territories, where small objects are cooled to ultra-low temperatures [1,2]. This has led to the development of a fast-growing field of quantum thermodynamics [3][4][5][6]. From a fundamental perspective, this provides new definitions for some of the old concepts, such as work [7,8] and heat [9], a new formulation for the laws of thermodynamics [10][11][12][13] and scaling relations [14]. From a practical viewpoint, however, measuring the thermodynamic quantities at the quantum level mandates unprecedented precision [15] and advanced refrigeration [16][17][18]. Temperature, defined through the zeroth law of thermodynamics, is one of the key thermodynamical parameters, with its precise measurement having numerous applications from our daily life to almost any quantum experiment. Thermometry has been explored on various experimental platforms [4], including nitrogen-vacancy (NV) centres in diamonds [19,20], optical nanofibres [21] and nano-photonic cavities coupled to nano-optomechanical resonators [22].
At low temperatures, precise temperature measurement is extremely challenging [23][24][25][26][27][28][29][30][31][32][33][34][35]. To measure the temperature of a quantum system, one brings in a probe, i.e. thermometer, and interact it with the system. Then, the procedure of thermometry can be pursued in two ways: (i) non-equilibrium dynamics in which the temperature is extracted as a parameter from the state of the probe before its thermalization [25,26,31,[36][37][38][39][40][41][42]; and (ii) equilibrium approach in which the probe is measured after reaching an equilibrium with the system and, thus, is described by a thermal state with the same temperature as the system [23,33,[43][44][45][46][47]. In the first approach, the optimal measurement, which minimizes the uncertainty of the estimation through saturating the Cramér-Rao inequality [48], generally depends on the unknown temperature of the system which makes its achievement challenging in practice. In the second approach, which is the focus of this paper, the energy measurement is known to be the optimal choice which saturates the quantum Cramér-Rao bound [23] independent of temperature. Nonetheless, not all probes provide the same precision in equilibrium thermometry. Therefore, one may wonder what an optimal probe for equilibrium quantum thermometry is.
In Ref. [43], the above question has been answered analytically for a general N -level quantum probe. The result shows that the probe has to be an effective two-level system with a unique ground state and N − 1 degenerate excited states. Unlike the optimal measurement basis, the energy gap of the optimal probe is temperaturedependent. This means that the design of an optimal probe needs prior information about the temperature of the system. In other words, the probe can only be used for local thermometry in which the temperature is roughly known, and the objective of thermometry is just to measure it more precisely. Moreover, this optimal probe, with enormous degeneracy in its excited state, is very difficult to be realized in practice. Based on these, there are several natural questions that one can ask: (i) How can we design a probe which operates optimally over a wide range of temperatures? (ii) What does the optimal probe look like if one takes the practical constraints into account?
In this paper, we address all of the aforementioned questions. We first quantitatively develop the concept of global thermometry over an arbitrary temperature interval and introduce the average variance as the quantity   A probe weakly interacts with the system and thus reaches an equilibrium at the system temperature T ∈ [Tmin, Tmax]. Energy measurements on the probe yield a probability distribution of temperatures with an estimated temperature T * and variance (∆T ) 2 . The global thermometry measure G defined in Eq. (4) is a property of the probe energy spectrum, and is minimized to achieve the optimal probe. The optimal energies against temperature ratio Tmax/Tmin for a general N -level system is obtained for: (a) N = 16, (b) N = 64. The energies are scaled with the characteristic temperature T hm , where T hm is the harmonic mean of Tmin and Tmax. The leftmost data point corresponds to the case of the locally optimal thermometer. The dashed lines indicate the approximate bounds for the energies (explained in main text), while the dash-dotted line shows the optimal energy gap for an effective two-level system. (d) Critical ratios τ k against N .
which has to be minimized to get the optimal probe. Our notion of global thermometry is distinct from existing works in literature, where the word "global" refers to system size [32] and not temperature range. Using our approach, we can determine the optimal probe over a wide range of temperature intervals. Interestingly, the structure of the optimal probe goes through different phases, each with its own energy structure, as the temperature interval increases. We then focus on spin chain probes with various constraints to get the structure of the optimal probes considering practical limitations which one may face in realistic scenarios. Our results show that for the non-uniform XYZ Hamiltonians, the Ising spin chain provides the optimal probe. Interestingly, by considering the non-uniform Heisenberg Hamiltonians, the dimer spin chains become optimal. Our results pave the way for global thermometry in various physical systems, including ion traps and quantum dot arrays.

II. LOCAL QUANTUM THERMOMETRY
In this section, we review the concept of local quantum thermometry at equilibrium and its optimal probes. Let us consider a thermometer that weakly interacts with a system at some temperature T (see scheme in Fig. 1(a)). At thermal equilibrium, we can assume that the probe thermalizes at the system temperature T , and is thus described by the Gibbs state ρ th = exp (−βH p )/Z, where β ≡ 1/k B T is the inverse temperature (we set k B = 1 henceforth), H p is the probe Hamiltonian with N eigenvalues and Z is the partition function. For M measurement samples, the variance in the estimation of temperature (see Fig. 1(a)) satisfies the Cramér-Rao inequality: where F th is the thermal quantum Fisher information (QFI) at equilibrium, which can be related to the heat capacity and hence the energy variance of the probe [4]: It is worth emphasizing that the Cramér-Rao bound is saturated for all temperatures if one measures the probe in the energy basis [23], for which ρ th is diagonal. Thus, in equilibrium thermometry, the only way to increase precision is by increasing the thermal QFI through proper engineering of the probe. However, F th depends on the actual energy spectrum of the probe. An interesting question then arises: what is the optimal Hamiltonian spectrum for a N -level system that maximizes the thermal QFI? This question was answered in a previous work by Correa et al. [43], where they proved that the optimal energy spectrum is an effective two-level system with a single ground state and a (N − 1)-fold degenerate excited state. They also showed that the energy gap between the excited state and ground state is the solution of a transcendental equation [43]: where x ≡ /T is the dimensionless energy gap. Nonetheless, this optimal thermometry has a serious limitation as from Eq. (3), one can only obtain the ratio /T . Hence, for a fixed number of energy levels N , the optimal energy gap scales linearly with the temperature T . However, T is generally unknown to us. Thus, the probe cannot be optimized unless the temperature is already known within a narrow range, which limits the usefulness of the probe. Due to this limitation, this scheme is known as local thermometry.

III. GLOBAL QUANTUM THERMOMETRY
In order to go beyond the limitations of local thermometry, one has to first define the paradigm of global thermometry in which the probe can operate optimally over a wide range of temperatures. We define the average variance G(T max , T min ) over some given temperature range [T min , T max ] as where the right hand side is proportional to the average of Cramér-Rao bound in Eq. (1). Unlike the local thermometry scheme, in which the QFI is maximized, in the global thermometry one has to minimize the average variance G(T max , T min ). In the limit of T max /T min → 1, G → 1/F th , and the minimization of G becomes equivalent to maximizing F th . This recovers the special case of local thermometry. The temperature estimation can also be done adaptively in the sense that once the temperature is estimated for a given range then one can then use a secondary probe optimized for a tighter range to get a better estimate. This procedure can be repeated until the desired precision is achieved. For a given probe of size N , one has to optimize the N − 1 energy levels to minimize G(T max , T min ), setting the ground state energy E 0 = 0 as a reference point. The aforementioned integral in Eq. (4) is very difficult to compute analytically (see Appendix A for some analytical approximations), so we use numerical optimization to minimize G over all the N − 1 independent energy levels. We note that for large system sizes, especially for the spin chains, the optimization routine becomes infeasible due to the computational costs from diagonalizing the Hamiltonian and the large number of iterations required to ensure a global optimum. In such cases, we combine local optimization with transfer learning to speed up the convergence to optimality (see Sec. VI for more details).
Figs. 1(b) and 1(c) show the optimized energy spectrum for N = 16 and N = 64 energy levels, for a temperature range of up to T max /T min = 150. We use the harmonic mean temperature T hm ≡ (1/T max +1/T min ) −1 as the characteristic temperature, and plot the energy levels normalized by T hm against the temperature ratio T max /T min . Since the ground state is fixed to be E 0 = 0, we only plot the energy levels of the excited states, where E k is the energy of the k th excited state. In the limiting case where T max /T min = 1, the situation reduces to the local thermometry case studied in Ref. [43]. Unsurprisingly, numerical optimization gives the energy gap E 1 = E 2 = . . . E N ≈ 7.708 T hm , which is consistent with Eq. (3). This exactly describes the effective two-level solution obtained in Ref. [43]. As the ratio T max /T min is increased further, the optimal solution is again an effective two-level system with a (N − 1)-fold degenerate excited state. We call this regime of the optimal energy spectrum, namely an effective two level system, Phase 1. The energy gap here, of course, cannot be described by Eq. (3), as both T min and T max have to be taken into account. The corrections to Eq. (3) for the regime T max /T min near unity can be found in Appendix A.
The upper and lower dashed lines in Figs. 1(b) and 1(c) denotes the optimal energy gap when the probe is optimized for only T max or T min respectively. This gives a nice physical intuition for the optimal energy gap, as a compromise between the locally optimal probes at T max and T min . A simple estimate of the energy gap is the average energy between the upper and lower bounds, which is equivalent to optimizing the probe at the average temperature (T max + T min )/2. This is fairly accurate, within 3 % of the actual energy gap in Phase 1 for N = 16.
As the temperature ratio T max /T min is increased beyond some critical ratio τ 1 , the optimal energy spectrum is no longer an effective two-level system. Instead, the energy levels remarkably bifurcate into two branches creating a new regime of energy spectrum, namely Phase 2. The optimal probe in Phase 2 is an effective threelevel system. The dashed-dotted lines in Figs. 1(b) and 1(c) show the optimization results when the probe is constrained to an effective two-level system, and, can be thought of as an extrapolation of the Phase 1 solutions.
The bifurcation of energy levels can be physically interpreted as the case where the optimal probe has to be sensitive to both ends of the temperature range. When the range is small (i.e. T max /T min below the critical ratio), optimizing the probe at a temperature near the mean gives a sufficiently high F th at both ends of the range. The optimal solution is the highly-degenerate two-level system which has been previously found to be the most sensitive probe for local thermometry [43]. This argument is obviously not true in the limit where the temperature range is large (i.e. T max /T min above the critical ratio), and the energy gaps have to be split up to produce an effective probe over the entire temperature range. The above intuition is supported by the dashed lines, corresponding to the optimized local probes at T min and T max respectively, which provide approximate bounds for the actual energy levels.
The huge discrepancy between the degeneracies of E 1 and E 2 (1 vs N − 2) is consistent with previous findings [33]. This is because the population of the higher excited states are exponentially suppressed, which in turn demands a significantly higher degeneracy in order to achieve a reasonable sensitivity at higher temperatures. As the temperature ratio is increased further, we get further bifurcations of the energy levels in Phases 3 and 4 at the critical ratios τ 2 and τ 3 respectively in Fig. 1(c), leading to an effective four-level system. The difference in the bifurcation diagram can be intuitively understood: for a larger N, more energy levels can be split up from the upper branch to 'support' the lower temperatures without sacrificing too much sensitivity at higher temperatures. The critical ratios are plotted against N in Fig. 1(d). An interesting observation is that the critical ratio τ 2 decreases sharply at N = 40, with the emergence of Phase 4 as indicated by the presence of τ 3 .
In short, we have discovered new phases of optimal solutions for global quantum thermometry, when the previously found effective two-level system is no longer ideal. This allows us to delineate global thermometry into various regimes. We also emphasize that our observations for the emergence of various phases for the optimal global probe are universal. In other words, it does not depend on the specific T min and T max , and only depends on the ratio T max /T min and the harmonic mean T hm .

IV. REALIZATION OF OPTIMAL PROBES
Before we study the optimization of various practical spin chain models, we first demonstrate that the opti-mal energy spectrum for Phase 1 thermometry, the effective two-level system, can be obtained from a generalized version of the classical (or longitudinal-field) Ising model. Consider the Hamiltonian for n spin- 1 2 particles (i.e. N = 2 n ): where is the k-local Hamiltonian with coupling parameters J k (omitting the spin indices), and σ i z is the Pauli Z operator for the i th spin. For example, H 1 can be interpreted as the interaction of individual spins with their respective external magnetic fields J 1 , while H 2 is the usual ZZinteraction in the Ising model. Diagrammatically, this Hamiltonian can be depicted by the union of complete k-uniform hypergraphs (k = 1, 2, . . . , N ) where the vertices denote the spins and the the hyperedges denote the couplings between them.
To simplify the model, we can set the magnitudes of all the J k to be the same, i.e. |J k | = J, k = 1, 2, . . . n. By choosing the signs appropriately, the energy spectrum can be made such that there is one ground state and (N − 1) degenerate excited states, with an energy gap of N J. Thus, by knowing the theoretically optimal energy gap (T min , T max ), one can tune J = /N to obtain the optimal probe for the Phase 1 thermometry. Interestingly, our numerical evidence suggests that the optimal energy structure in other phases can also be obtained with this generalized model (more details in Appendix B).
Although one could achieve the theoretical limits of equilibrium quantum thermometry with the classical Hamiltonian in Eq. (5), this generalized model is unrealistic since it requires full control of arbitrary k-body interactions. This is clearly not feasible for a reasonably large n. In the following subsection, we discuss the optimal global thermometry in realistic spin chain setups with much fewer control parameters.

V. SPIN CHAIN PROBES
As mentioned above, the optimal probes for global thermometry demand special form of energy structures, which are difficult to engineer with physical systems. Moreover, even if such spectra can be engineered, it might be challenging to measure the probe in the energy basis which is required to saturate the Cramér-Rao bound. Hence, there is a need to design practical probes with a high thermometric performance (compared to the theoretical limit). In this section, instead of optimizing over all the (N − 1) independent energy levels, we first start with a spin chain system and minimize G over the spin chain parameters which can be controlled experimentally.
Restricting ourselves to 1D spin chains with only nearest-neighbour (two-body) interactions and periodic boundary conditions, we can write down a non-uniform Heisenberg XYZ Hamiltonian: with the presence of local external magnetic fields in all three directions. The couplings and fields are also allowed to vary independently throughout the spin chain. A further constraint J i x = J i y = J i z = J i can be added, which gives the non-uniform Heisenberg XXX Hamiltonian: In practice, it is difficult to engineer exchange couplings with varying signs. Therefore, we impose the constraint that the spin chain probe must either be antiferromagnetic (all J > 0) or ferromagnetic (all J < 0), while the signs of the local magnetic fields can be arbitrarily varied. In the following, we numerically optimize H XYZ and H XXX for global quantum thermometry.

A. Special case: XYZ probe
As before, we minimize the average variance G(T min , T max ) for various T min and T max over the parameters in H XYZ . Interestingly, the optimization yields the classical (longitudinal-field) Ising model with J x = J y = h x = h y = 0 (omitting the spin indices). Having the Ising probe as the optimal solution also means that the same results would apply for the Heisenberg XXZ model as well. Figs. 2(a) and 2(b) shows the optimal Ising couplings and magnetic fields obtained from H XYZ for n = 4 spins. For thermometry in Phase 1, it turns out that the optimal solution is a uniform ferromagnetic Ising model with J i z = −J < 0 and h i z = h > 0. We note that the solution is not unique, and an antiferromagnetic Ising model with J i z = J > 0 is also possible with a different h i z . Interestingly, at the critical ratios indicated by the dashed lines, the uniformity of the optimal parameters breaks down, and the optimal parameters show a more sophisticated pattern. For more details, see Appendix C.

B. Special case: XXX probe
For the XXX probe, for the sake of simplicity, we first impose another constraint on H XXX by setting a homogenous magnetic field in each direction, i.e. h i x = h x , h i y = h y , h i z = h z ∀i. Surprisingly, the optimal probe in this case turns out to be a fully dimerized spin chain with J i > 0 for odd i and J i = 0 otherwise. The optimal solutions require no external magnetic field (h x = h y = h z = 0). Fig. 3 shows the optimal couplings for the dimer chain obtained from H XXX , for n = 6 spins. This gives us three independent dimers with coupling parameters J 1 , J 2 and J 3 . In Phase 1, the dimers are all identical to one another. Again, at the critical ratios denoted by the dashed lines, the coupling parameters split into multiple branches.
One can physically explain why the fully dimerized spin chain is the optimal solution for H XXX . The Heisenberg XXX Hamiltonian has a triply-degenerate first excited state for all even values of n. Having a uniform dimerized chain gives a 3n/2-fold degeneracy in the first excited state, which is the maximum attainable value for the XXX Hamiltonian. That is why the fully dimerized chain becomes the optimal probe in Phase 1. As new phases emerge, one of the couplings of the dimers changes to vary the degeneracy of the spectrum, replicating the bifurcations found for the optimal probes. It is also noted that if we relax the constraint of homogeneous magnetic fields in H XXX , we obtain a probe that is only marginally better than the dimerized chain.

C. Optimal measurements
In general, energy measurements is very difficult in practice, making the saturation of Cramér-Rao bound challenging. Remarkably, the probes obtained from optimizing H XYZ and H XXX are not just solutions that minimize G, but also have the added advantage of being easily measurable in the energy basis. In the case of H XYZ where the longitudinal-field Ising model is optimal, the energy measurements are equivalent to measuring all the spins in the computational basis, i.e. σ z , which has been realized in various physical setups [49,50]. In the case of H XXX where the fully dimerized chain is the optimal probe, the energy measurements is reduced to a series of singlet-triplet measurements on all the dimer pairs, which is a typical measurement in quantum dot arrays [51,52].
Thus, the optimization results discussed earlier can saturate the Cramér-Rao bound on top of having a low G.

D. Comparison with theoretical limit
It is insightful to study the energy spectra of the optimized spin chain probes for H XYZ and H XXX . For optimal probes of size n = 4, we plot in Figs. 4(a) and  Optimal coupling parameters J k against temperature ratio Tmax/Tmin for an optimized HXXX (reduced to an dimerized chain) for n = 6 spins. The coupling parameters are scaled with the characteristic temperature T hm , where T hm is the harmonic mean of Tmin and Tmax. The dashed lines indicate the onset of the splitting of optimal parameters. 4(b) the energy spectra for T max /T min = 1 (Phase 1) and T max /T min = 5 (Phase 2), respectively. For Phase 1, the Ising excited energy levels shown in Fig. 4(a) are on average closer to the optimal energy E opt , denoted by the dashed line. Likewise, considering the case of Phase 2 thermometry in Fig. 4(b), the Ising energy levels are closer to the respective optimal energies E 1,opt (degener-acy = 1) and E 2,opt (degeneracy = N − 2). In particular, we see that the Ising model has a single first excited state very close to E 1,opt , whereas the first excited state of the dimer must be 3-fold degenerate. This suggests that the Ising probe performs better than the dimerized probe in both cases. This is not surprising since H XYZ is more general than H XXX , so we must always have G Ising ≤ G dimer .
In order to quantify the quality of the optimal spin chain probes, one has to compare their performance with the theoretically ideal thermometers. To do so, we compute the relative difference in G with G opt , i.e. ∆G/G opt ≡ G/G opt − 1 for probes with n = 4, over a range of T max /T min for which two phases are observable. When ∆G is small, it means that the probes perform closer to the theoretical limit. The results are plotted in Fig. 4(c). Remarkably, the Ising and dimerized probes perform closer to the theoretical limit in Phase 2 as compared to Phase 1. In addition, as expected, the Ising probe indeed outperforms the dimerized probe at all values of T max /T min .

VI. NUMERICAL METHODS
The numerical optimization in this work is done primarily using global optimization routines. In particular, we use the SciPy implementation [53] of differential evolution [54], which is an example of an evolutionary algorithm. Differential evolution is a metaheuristic search algorithm that iteratively improves the candidate solution by evolving the population which navigates the search space. It does not rely on gradient information, making it suitable for exploring large search spaces which is use- ful for optimizing over large number of energy levels. In all cases, we use a population of 500, and increasing the population further does not improve the quality of the optimal solution found. The results are also verified with other popular global optimization routines such as simulated annealing and basin-hopping. Hence, our results do not depend on the specific optimization algorithm used. For spin chains with n ≥ 10, global optimization becomes infeasible due to two sources of computational costs: (i) diagonalization of the Hamiltonian (in an exponentially large Hilbert space) to obtain all the eigenenergies at each step, and (ii) large number of iterations required for global optimization. While it is possible to speed up the computation by restricting the diagonalization to only return a subset of the lowest eigenenergies, we found that the optimal results are rather inaccurate unless most of the eigenvalues are retained. Hence, the speed up from this approach is marginal. In order to proceed with the optimization for larger systems, we employ a transfer learning approach where the optimal probe for a smaller N is recursively used as an initial guess for an incrementally larger system size, and perform local optimization using the gradient-based BFGS algorithm (see Appendix C).

VII. CONCLUSION
In this paper, we quantitatively formalize the notion of global thermometry, which operates over arbitrary large temperature ranges. This is achieved by minimizing the average of variance over a given temperature interval. The proposed approach naturally provides the energy structure of an optimal probe. Interestingly, depending on the temperature range, the optimal thermometer goes through different phases, each favouring a particular energy structure. We provide a realization of such optimal probes in generalized Ising models with multi-particle interactions. In practice, however, such interactions might be challenging to fabricate. Hence, by imposing further constraints, we provide new designs for optimal probes which are limited to two-body interactions in the form of nearest neighbours of special type of interactions. Starting from a non-uniform XYZ Hamiltonians, our optimization results in a uniform Ising model as the optimal thermometer which can be realized in ion traps. On the other hand, if we restrict ourselves to non-uniform Heisenberg models, then the optimal thermometer is a dimerized chain which can be realized in quantum dot arrays. We also observe the appearance of various phases for practically optimal probes as we vary the temperature range.
Our results unlock several fresh research avenues. For instance, how one can generalize the developed global thermometry procedure to non-equilibrium probes. Another direction to pursue is to find optimal designs for thermometers in other physical platforms, such as optomechanical systems or itinerant particles. In the narrow-range regime where T max /T min is near unity, the optimal conditions can be evaluated. From numerical simulations in Fig. 1, we know that the optimal probe in Phase 1 thermometry is an effective two-level system with (N-1)-fold degeneracy in the excited state. Using this Ansatz, the quantum Fisher information is (setting k B = 1): where is the energy gap between the ground and excited state. The measure for global thermometry in Eq. (4) is proportional to the integral of 1/F th against temperature in the range [T 0 , T 0 + δ]: (A2) where we have assumed δ T 0 . To minimize the integral, we define dimensionless variables x ≡ /T 0 and δ ≡ δ/T 0 and set the partial derivative ∂g/∂ to zero. We thus obtain the optimal condition which can be solved numerically to get the optimal energy gap. To get further insights, we can solve for e x implicitly from Eq. (A3) which is quadratic in e x , and expand the solution in powers of δ . This gives Note that the zeroth-order term exactly recovers the optimal condition in Eq. (3) discovered in Ref. [43]. Thus, we have found finite-range corrections to the optimal probe for local thermometry. Note that if we expanded g to only first order, we do not obtain the correction terms. As an example, we set T 0 = 1 and δ = 0.1. Numerical optimization gives the optimal energy gap x ≡ /T = 4.05268, while the second-order correction in Eq. (A4) give x = 4.04085, which is only 0.292% away from the numerical result. In the main text, we pointed out that the generalized Ising model comprising all k-body ZZ-interactions with k ≤ n can realize the optimal energy spectra for global thermometry. We provide an intuitive justification based on numerical evidence, leaving a rigorous investigation for future studies. To obtain the optimal two-level solution, one needs to control 2 n − 1 energy levels using the Hamiltonian parameters, in order to engineer the maximal degeneracy (the remaining level can be chosen as the ground state without loss of generality). In this generalized Ising model, we have exactly 2 n − 1 free parameters {J k }. Moreover, since the Hamiltonian is diagonal, the eigenenergies are simply a linear combination of the J k parameters. As a result, all the energy levels can be controlled independently, and the degeneracy condition can be easily achieved.
As an example, let us consider the n = 4 case. This gives us 4 J 1 parameters, 6 J 2 parameters, 4 J 3 parameters and 1 J 4 parameter for a total of 15 free parameters. Setting the magnitude of all the parameters to be the same, and choosing the signs (for instance) to be J 1 : (− − ++), J 2 : (− + + + +−), J 3 : (+ + −−), J 4 : (−), the optimal solution can be obtained with energy gap 2 n J.
Following a similar procedure, one can also fix the magnitude of 2 (n−1) parameters to be some J and the rest of the parameters to have magnitude K, with J < K. Choosing appropriate signs, the energy spectrum with 1 ground state (with zero energy), 1 first excited state (with energy 2 n J) and (2 n − 2) degenerate second excited states (with energy 2 n−1 (J + K) ) can be obtained, which is the optimal solution for Phase 2 thermometry.
Based on strong numerical evidence, we posit that the generalized Ising model can simulate any energy spectrum. To see this, we can write down the eigenvalues of the generalized Hamiltonian in Eq. (5) as a 2 n × 2 n − 1 coefficient matrix A with the rows denoting the Ising eigenstates and the columns denoting the various J k parameters. Since the eigenvalues are linear in J k , finding the coupling parameters J k reduces to a linear algebra problem AJ = E, where J is the column vector containing the 2 n − 1 parameters J k , and E is the column vector containing the 2 n eigenenergies. The rank of A is upper bounded by 2 n − 1, so we are free to set any one row in A to zero. It can be checked that the eigenenergy of |111 . . . 1 is (−1)× (the sum of all other eigenenergies). Thus, without loss of generality, we can truncate the row corresponding to |111 . . . 1 in A, and set the corresponding eigenenergy to zero For each value of , the quantum Fisher information F th is averaged over 30 runs. The average value is plotted, with the gray band denoting the range of values found.