Role of topology in determining the precision of a finite thermometer

Temperature fluctuations of a finite system follows the Landau bound $\delta T^2 = T^2/C(T)$ where $C(T)$ is the heat capacity of the system. In turn, the same bound sets a limit to the precision of temperature estimation when the system itself is used as a thermometer. In this paper, we employ graph theory and the concept of Fisher information to assess the role of topology on the thermometric performance of a given system. We find that low connectivity is a resource to build precise thermometers working at low temperatures, whereas highly connected systems are suitable for higher temperatures. Upon modelling the thermometer as a set of vertices for the quantum walk of an excitation, we compare the precision achievable by position measurement to the optimal one, which itself corresponds to energy measurement.


I. INTRODUCTION
Thermometry is based on the zero-th law of thermodynamics. A probing object (the thermometer) is put in contact with the system under investigation and when they achieve thermal equilibrium the temperature of both is determined by performing a measurement on the thermometer. Good thermometers are those with a heat capacity much smaller than the object under study, such that the thermal equilibrium is reached at a temperature very close to the original temperature of the object. This straightforward line of reasoning leads to consider small thermometers, possibly subject to the laws of quantum mechanics [1]. Additionally, since the heat capacity itself depends on temperature, one is led to investigate whether the heat capacity of a thermometer may be tailored for a specific range of temperatures [2].
As a matter of fact, temperature is not an observable in a strict sense, i.e., it is not possible to build a self-adjoint * alessandro.candeloro@unimi.it † luca.razzoli@unimore.it ‡ paolo.bordone@unimore.it § matteo.paris@fisica.unimi.it operator corresponding to temperature. Besides, temperature represents a macroscopic manifestation of random energy exchanges between particles and, as such, does fluctuate for a system at thermal equilibrium. In fact, this has made the concept of temperature fluctuations controversial [44][45][46][47][48][49][50][51][52]. In order to retain the operational definition of temperature, one should conclude that although temperature itself does not fluctuate, any temperature estimate is going to fluctuate, since it is based on the measurement of one or more proper observables of the systems, e.g., energy or population. In this framework, upon considering temperature as a function of the exact and fluctuating values of the other state parameters, Landau and Lifshitz derived a relation for the temperature fluctuations of a finite system [53,54]. This is given by δT 2 = T 2 /C where C = C(T ) is the (temperature-dependent) heat capacity of the system and appears as a fundamental bound to the precision of any temperature estimation. The same problem may be addressed by leveraging tools from quantum parameter estimation and the Landau bound may be shown to be equivalent to the so-called Cramér-Rao bound to precision, built by evaluating the quantum Fisher information (QFI) of equilibrium states [55]. In turn, the link between the QFI and the heat capacity have been established in different frameworks, such as in quantum phase transition and in systems with vanishing gap [55][56][57][58][59].
In this paper, we exploit the above connection to address the role of topology in determining the precision of a finite thermometer. In particular, upon modeling a finite thermometer as a set of connected subunits, we employ graph theory, together with QFI, to assess the role of topology on the thermometric performance of the system. We confirm that measuring the energy of the system is the best way to estimate temperature, and also find that systems with low connectivity are suitable to build precise thermometers working at low temperatures, whereas highly connected systems are suitable for higher temper-atures. We also compare the optimal precision with that achievable by measuring the position of thermal excitations. Our results indicate that quantum probes are especially useful at low temperatures and that systems with low connectivity provide more precise thermometers. At high temperatures, precision degrades as O(T 4 ) with highly connected systems providing at least a better proportionality constant. Reference models are physical systems in which the connectivity plays a relevant role, e.g. quantum dots arranged in lattices [60] and qubits in quantum annealers [61,62]. Evidences suggest that a system of qubits in D-Wave quantum annealers quickly thermalizes with the cold environment [63] and that a pause mid-way through the annealing process increases the probability of successfully finding the ground state of the problem Hamiltonian, and this has been related to the thermalization of the system [64].
The paper is structured as follows. In Sec. II we briefly review the tools of quantum estimation theory, focusing on the ultimate performance of equilibrium states in estimating the temperature of an external environment. According to these results, in Sec. III we consider the equilibrium states of the Laplacian matrix of simple graphs, addressing the efficiency of our probes in both the highand low-temperature regimes. The Laplacian matrix is indeed the Hamiltonian of a quantum walker moving on discrete positions. In Sec. IV we derive analytical and numerical results for some remarkable simple graphs and two-dimensional lattices. In Sec. VI we summarize and discuss our results and findings. Then, in the appendixes we offer analytical proofs and details of the results presented.

A. Estimation Theory
Given an experimental set of outcomes of size M { x} ∈ M ⊕M which depends on some parameter λ, we can infer the value of the parameter through an estimator functionλ( x). The variance Var(λ) is the usual figure of merit that quantifies the precision of an estimator: the lower the variance, the closer the outcomes are spread around the expected value of the estimator. According to the probability distribution p(x m |λ) of the outcomes (throughout the section we will consider a discrete set of outcomes M with cardinality N M ), the variance of any unbiased estimators of the parameterλ( x) can be lower bounded as where In the literature, this result is known as the Cramér-Rao bound (CRB) [65,66], and F c (λ) is the Fisher information (FI) for the statistical model p(x m |λ). The latter quantifies how much information on λ is encoded in the probability distribution: a large FI means that the outcomes carry significant information on the parameter, which is reflected by the possibility of having more precise estimators, see Eq.
(1). The attainability of the CRB is the fundamental problem of classical estimation theory. Indeed, it is known that the lower bound can be saturated by the maximum likelihood estimator in the limit of infinite set of measurements M → +∞ [67].
If we move to the quantum realm, observables are described by self-adjoint operators. However, if the quantity of interest is not an observable (such as the temperature), then we can not directly measure it. For this reason, one needs the tools provided by quantum estimation theory to find the best optimal probing strategy. As known, in quantum mechanics probability distributions are naturally described by the Born rule p(x m |λ) = Tr[ρ λ Π m ], in which we have assumed that the information of the parameter is encoded in the density matrix, while the measurement is λ-independent and it is identified by the set of positive operator-valued measures {Π m } m . From this perspective, we see that there is arbitrariness in the choice of the positive operator-valued measure (POVM). Thus, once the state ρ λ is fixed, we have a family of possible probability distribution depending on this choice. Among the FI arising from all the possible POVMs, we can show that [68] there is an optimal POVM that maximizes the FI, which is given by the set of projectors {|L j L j |} j of the symmetric logarithmic derivative Λ λ , implicitly defined as The maximum of the FI among all the possible POVMs is known as the quantum Fisher information (QFI) [69], which can be obtained as From that, we have a corresponding quantum inequality for the variance of any estimator which is known as the quantum Cramér-Rao bound (CRB) [70] Var Thus, the QFI sets the minimum attainable error among the sets of all probing schemes in the estimation problem of λ. Notice that all these considerations hold as long as the state ρ λ is fixed.

B. Quantum Fisher Information
In this paper we focus on a finite-size quantum system living in a N -dimensional Hilbert space and described by a Hamiltonian operatorĤ = k E k |e k e k |, with k = 0, ..., N − 1. The idea is to use a finite system as a probe to estimate the temperature T of an external environment. We thus consider the customary thermodynamic situation occurring in thermalization processes, when a system is in contact with a thermal bath at temperature T and, after some time, it eventually reaches an equilibrium state at the same temperature T of the bath. The final equilibrium state of the probing system is thus given by the Gibbs state Throughout the paper we set the Boltzmann constant k B = 1. In the last equality we make explicit the possible degeneracy of the energy levels: n labels the distinct energy levels, and g n is the corresponding degeneracy.
In terms of the latter, the partition function Z can be written as Since the state (6) is diagonal in the energy eigenbasis, and since the latter does not depend on the parameter T , the statistical model reduces to a classical-like estimation problem, where the optimal POVM is realized exactly by {|e n,α e n,α |}. Moreover, the QFI is easily obtained and turns out to be proportional to the variance of the Hamiltonian operatorĤ, i.e.
where the expectation values ofĤ p for a Gibbs state are given as C. Fisher Information for a position measurement Our system lives in a N -dimensional space, and we assume the position space to be finite and discrete. When a system is confined to discrete positions, a position measurement is a suitable and standard measurement. In this section we study how informative the position measurement is for estimating the temperature. The POVM is given by {|j j|}, where j = 0, . . . , N −1 labels the discrete positions. The probability of observing the system in the jth position given the temperature T is Therefore, the FI (2) for the position measurement is which can be rewritten (see Appendix B) in a form similar to that of the QFI, where is the expectation value ofĤρ T on the position eigenstate |j .

III. NETWORK THERMOMETRY
We focus on the estimation of temperature using quantum probes which may be regarded as set of connected subunits, i.e., described by connected simple graphs (undirected and not multigraph). A graph is a pair G = (V, E) where V denotes the nonempty set of vertices and E the set of undirected edges, which tell which vertices are connected. The set of vertices is the finite set of discrete positions the quantum system can take. The set of edges accounts for all and only the possible paths the system can follow to reach two given vertices. The number of vertices |V | = N determines the order of the graph, and the number of the edges is |E| = M . All this information determines the topology of the graph and is encoded in the Laplacian matrix L = D − A. In the position basis {|j j|}, the degree matrix D is diagonal with elements D jj = deg(j) =: d j , the degree of vertex j, while the adjacency matrix A has elements A jk = 1 if the vertices j and k are connected by an edge or A jk = 0 otherwise. A graph G is said to be k-regular if all its vertices have the same degree k. The Laplacian matrix for an undirected graph is positive semidefinite, and symmetric, and the smallest Laplacian eigenvalue is 0, which, for connected graphs, has degeneracy g 0 = 1. Instead, the second-smallest Laplacian eigenvalue is also known as algebraic connectivity [71][72][73]: smaller values represent less connected graphs.
A continuous-time quantum walk (CTQW) is the motion of a quantum particle with kinetic energy when confined to discrete positions, e.g. the vertices of a graph. In a discrete-position space, −∇ 2 of the kinetic energy is replaced by the Laplacian matrix L [74]. Hence, a quantum walker has intrinsically the topology of the graph, and so it is a promising candidate to be the probe for estimating the temperature of an external environment with respect to the topology of the network. The CTQW Hamiltonian is H = γL, where the parameter γ > 0 is the hopping amplitude of the walk and accounts for the energy scale of the system. We have already set k B = 1, and in the following we also set γ = 1. Therefore, energy and temperature are hereafter dimensionless. Notice that, in this way, the energy eigenvalues E n are the Laplacian eiegenvalues and the scale of temperature should be intended as referred to the energy scale specific of the system considered, i.e., to γ.
max of the transcendental equation (17) for different values of g1.

A. Low-temperature regime
First, we analyze the regime of low temperatures T . Therefore, we assume that the system is mostly in the ground state and can access only the first excitation energy E 1 , i.e. E n T for n > 1. For this reason, the partition function is Since the ground state energy is null, the mean value of the energy is Ĥ = g 1 E 1 e −E1/T Z −1 and it follows that the QFI in the low temperature regime can be approximated as The value x max > 0 at which the latter exhibits the maximum is the solution of the following transcendental equation obtained from df g1 (x)/dx = 0. Solutions of this equation can be obtained graphically, as shown in Fig. 1. The x max depends only on the degeneracy g 1 and numerical results show that x max (g 1 ) is a sublinear function, i.e. it increases less than linearly with g 1 . The FI in the low-temperature regime can be approximated as

B. High-temperature regime
We move now to the opposite regime, high temperature, in which we assume that T E k for all k. The single-walker probe is no longer valid in the hightemperature regime, where many excitations, not only one, come into play. Yet, it can be used for small thermometers with bounded spectrum and large energy gap E 1 − E 0 , so that we may expect few excitations, and the single-walker model can still approximate the real system. In this regime, the density matrix, in the energy eigenbasis, can be approximated by the maximally mixed Refer to Appendix A for details on the sum of the energy eigenvalues and that of their square. Thus, in the limit of high temperatures, the QFI tends to zero as O(T −4 ) and proportionally to a topology-dependent factor. The sum of the squared degree can be bounded as where the upper bound is proved in [75] and the lower bound follows from the Cauchy-Schwartz inequality for the inner product of two N -dimensional vectors, (1, . . . , 1) and (d 0 , . . . , d N −1 ), using The upper bound in (20) is saturated by the complete graph, while the lower bound is saturated, e.g, by the cycle graph and the complete bipartite graph whose partite sets have both cardinality N/2: hence, these bounds are actually achievable, and, accordingly, the bounds (21) on the QFI are saturated by the above mentioned graphs (see Sec. IV for details). For high temperatures the optimal thermometer is the complete graph, which, among the simple graphs, has the maximum number of edges M . Notice also that the complete graph has the maximum energy gap, since E 1 − E 0 = N . Thus, unlike the lowtemperature regime, in the high-temperature regime the graphs which perform better are those with high connectivity, in the sense of those with a high number of edges M .
Recalling that in the high-temperature regime ρ T I N /N , we can approximate the FI as where the second equality follows from Therefore, the asymptotic value of the ratio where we have introduced the quantity to capture the (asymptotic) discrepancy between the FI and the QFI in terms of the topology features of the graphs: small λ N,M means a ratio close to 1, F c (T ) F q (T ); large λ N,M means a ratio close to 0, F c (T ) F q (T ).

C. Fisher Information for circulant graphs
In this section we prove that the FI for position measurement is identically null in the case of circulant graphs, e.g., the complete graph and the cycle graph. A circulant graph is defined as the regular graph whose adjacency matrix is circulant, and accordingly so is the Laplacian matrix [76][77][78]. A circulant matrix is a special Toeplitz matrix where every row of the matrix is a right cyclic shift of the row above it. The eigenproblem for circulant matrices is solved [79], and the Laplacian eigenstates of circulant graphs are with ω = exp{2πi/N } and 0 ≤ k ≤ N − 1. This means that | j|e k | 2 = 1/N ∀k and consequently while From Eq. (12) we clearly see that F c (T ) = 0. We conclude that for circulant graphs the position measurement does not carry any information on the temperature T . Actually, the result is more general: the FI for a position measurement is null not only for circulant graphs, but for all the graphs such that | j|e k | 2 = t j does not depend on k. Indeed, in this case we have p(j|T ) = t j and Ĥ ρ T j = t j Ĥ , from which we see that (12) is identically 0, since

IV. NETWORK THERMOMETRY: RESULTS
In this section, we address the study for some remarkable connected simple graphs and some lattice graphs by means of the previously found general results. To avoid repetitions, we recall that the ground state energy E 0 = 0 is not degenerate for connected simple graphs, g 0 = 1, and the corresponding eigenstate is Results of QFI and FI for position measurement for graphs (see Fig. 2) are shown in Fig. 3 and 4, for lattices (see Fig. 5) in Fig. 6, and results of the ratio of FI and QFI for both graphs and lattices are summarized in Fig.  7. The analytical results suitable for a comparison are reported in Table I.  30)). Dashed colored line: FI for position measurement Fc. The FI for complete graph and cycle graph (circulant graphs) is null, and therefore is not shown. Because of the different ranges, values of QFI are referred to the left y-axis, and values of FI are referred to the right y-axis.

A. Complete graph
A complete graph is a simple graph whose vertices are pairwise adjacent, i.e. each pair of distinct vertices is connected by a unique edge (see Fig. 2(a)). The complete graph with N vertices is denoted K N , is (N − 1)-regular, and has M = N (N − 1)/2 edges. Its energy spectrum consists of two energy levels: the ground state and the second level E 1 = N with degeneracy g 1 = N − 1. The graph is circulant, thus the eigenvectors are given by (26) and the FI for a position measurement is identically null.
In this case, the approximation for the lowtemperature regime is actually exact and holds at all the temperatures, because the system has precisely two distinct energy levels. Hence, the QFI reads as The algebraic connectivity E 1 = N and the degeneracy g 1 = N − 1 grow with the order N of the graph. In Fig. 3(a) we observe that maxima of QFI occur at higher temperatures as N increases. According to Eq. (17) and Fig. 1, we expect the maximum of QFI to occur at increasing values of Hence, this means that T max increases less than linearly with N . For this reason the complete graph is not a good thermometer for low T . On the other hand, the complete graph saturates the upper bound in (20), since M = N (N −1)/2. It follows that in the high-temperature regime the complete graph is the optimal thermometer and, accordingly, the QFI is F high

B. Cycle graph
A cycle graph with N ≥ 3 vertices (or Ncycle) is a simple graph whose vertices {v j } j=1,...,N can be (re)labeled such that its edges are v 1 v 2 , v 2 v 3 , . . . , v N −1 v N , and v N v 1 (see Fig.  2(b)). In other words, we may think of it as a one-dimensional lattice with N sites and periodic boundary conditions. The cycle graph with N vertices is denoted C N , is 2-regular, and has M = N edges. Its energy spectrum is E k = 2[1 − cos(2πk/N )], with k = 0, . . . , N − 1. The lowest energy level is not degenerate, while the degeneracy of the highest energy level depends on the parity of N : no degeneracy for even N , g N/2 = 1, but double degeneracy for odd N , g (N +1)/2 = 2. The remaining energy levels have degeneracy 2. The cycle graph is circulant, thus the eigenvectors are (26), the same of those of the complete graph, and the FI for a position measurement is identically null.
The algebraic connectivity E 1 = 2[1 − cos(2π/N )] decreases as N increases, while g 1 = 2 is constant. According to Eq. (17) and Fig. 1, we expect the maximum of QFI to occur at the constant value of x max = E 1 /T max independently of N , because g 1 is constant. Since E 1 decreases as N increases, then T max must also decrease to ensure x max constant. Indeed, the maxima of QFI occur at lower temperatures as N increases, as shown in Fig. 3(b). It follows that the larger N the better the cycle graph behaves as a low-temperature probe. Instead, the cycle graph saturates the lower bound in (20)

C. Complete Bipartite Graph
A graph G is bipartite if the set of vertices V (G) is the union of two disjoint independent sets V 1 and V 2 , called partite sets of G, such that every edge of G joins a vertex of V 1 and a vertex of V 2 . A complete bipartite graph is a simple bipartite graph such that two vertices are adjacent if and only if they are in different partite sets, i.e. if every vertex of V 1 is adjacent to every vertex of V 2 (see Fig.  2(c)). The complete bipartite graph having partite sets with |V 1 | = N 1 and |V 2 | = N 2 vertices is denoted K N1,N2 , has M = N 1 N 2 edges, and the total number of vertices is N = N 1 + N 2 . Without loss of generality we assume N 1 ≤ N 2 . The energy spectrum is given by E 1 = N 1 , E 2 = N 2 , and E 3 = N 1 + N 2 , with degeneracy g 0 = 1, g 1 = N 2 − 1, g 2 = N 1 − 1, and g 3 = 1, respectively. The corresponding eigenvectors are |k − m |m , where n = 1, . . . , N 2 − 1 and m = 1, . . . , N 1 − 1.
Regarding the low-temperature regime, the algebraic connectivity is E 1 = N 1 while g 1 = N 2 −1. The complete bipartite graph is completely defined only by the total number of vertices N , so we discuss where the maximum of the QFI occur according to Eq. (17) and Fig. 1 first for a given value N 1 , and then for a given value of N = N 1 + N 2 .
For N 1 fixed, we expect the maximum of QFI to occur at increasing values of x max = E 1 /T max as N increases, because N 2 and thus g 1 increase. Since E 1 is constant, then T max must decrease to ensure that x max increases. Indeed, for a given N 1 , the maxima of QFI occur at lower temperatures as N increases, as shown in Fig. 4(a). In particular, this is also the case of the star graph S N , because it is K 1,N −1 , even if such behavior is less evident in Fig. 3(c).
For N fixed, we expect the maximum of QFI to occur at decreasing values of x max = E 1 /T max as N 1 increases, because N 2 and thus g 1 decrease. Since E 1 increases as N 1 increases, then T max must increase more than N 1 to ensure that x max decreases. Indeed, for a given N , the maxima of QFI occur at higher temperatures as N 1 increases, as shown in Fig. 4(b). This means that, at fixed N , we can tune the temperature at which the QFI is maximum just by varying the number of of vertices in the two partite sets. From Fig. 4(b) we observe that the highest maximum of QFI is provided by the star graph S N , whose algebraic connectivity E 1 = 1 is constant and minimum, while the lowest maximum of QFI is provided by K N/2,N/2 , i.e. for N 1 = N 2 , whose algebraic connectivity E 1 = N/2 is the largest among all the complete bipartite graphs.
In the high-temperature regime, since k d 2 Notice that for N 1 = N 2 = N/2, the complete bipartite graph is N/2-regular, and saturates the lower bound in (20), since M = N 2 /4, and so the QFI at high temperatures is F high q (T ) = N/(2T 4 ). The asymptotic behavior of the ratio F c (T )/F q (T ) at high temperature (24) is characterized by λ N1+N2,N1N2 = 2(N 1 + N 2 )/(N 2 − N 1 ) 2 . Depending on the number of vertices in the two subsets, results differ. When N 1 = N 2 , the difference N 2 − N 1 is null, the complete bipartite graph is circulant and so the FI is identically null, for any T . Instead, the difference N 2 − N 1 is maximum for the star graph S N . This results in λ N,N = 2N/(N − 2) 2 : hence, λ N,N → 0 for large N and, accordingly, the FI approaches the QFI in the limit of high temperatures. Actually, since for the star graph k d 2 k = N (N − 1), the QFI in the high-temperature regime has the same asymptotic behavior of the complete graph, i.e.  (N T 4 )).
In this section we have approximated the QFI for the complete bipartite graph under the assumptions of low or high temperature. The exact analytical expression of the QFI is reported in Appendix D.

D. Path graph
A path graph with N vertices is a simple graph whose vertices {v j } j=1,...,N can be (re)labeled such that its Fig. 2(d)). In other words, we may think of it as a one-dimensional lattice with N sites and open boundary conditions. The path graph with N vertices is denoted P N , and has M = N − 1 edges. Its nondegenerate energy spectrum is E k = 2[1 − cos(πk/N )], with k = 0, . . . , N − 1, and the corresponding eigenvectors are The energy spectrum is similar to that of the cycle, and this is reflected in its thermometric behavior. Indeed, the algebraic connectivity E 1 = 2[1 − cos(π/N )] decreases as N increases, while g 1 = 1 is constant. Hence, as for the cycle graph, the maximum of the QFI occurs at lower temperature as N increases, as shown in Fig. 3(d). Further, the similarity extends also in the high-temperature regime, where, due to k d 2 k = 2(2N −3) and M = N −1, we have that F high q (T ) = 2/T 4 + O(1/(N 2 T 4 )), which is asymptotically equivalent to that of the cycle.
Nevertheless, there is a difference between the cycle and the path, and this is due to the different boundary conditions of the two graphs. In the first, the periodic boundary conditions ensure that the cycle graph is a circulant graph, and consequently the FI for the position measurement is null. Instead, in the second, the open boundary conditions lead to a non-null FI for the position measurement. The asymptotic behavior of the ratio F c (T )/F q (T ) at high temperature (24) is characterized by λ N,N −1 = N (N − 1)/(N − 2), which is monotonically increasing with the order of the graph. Thus, in the limit of high temperature the FI is very small compared to QFI.

E. Lattices
In this section we address the thermometry on some two-dimensional lattices. There are three regular tessellations composed of regular polygons symmetrically tiling the Euclidean plane: equilateral triangles, squares, and regular hexagons [ Figs. 5(a)-(c)]. In addition to these we also consider the truncated square lattice in Fig. 5(d). Triangular and square lattices are Bravais lattices, while honeycomb and truncated square lattice are not. This difference is reflected in the spreading of CTQWs, which is ballistic on Bravais lattices and subballistic on non-Bravais lattices [81]. A generic vertex in the triangular lattice has degree 6, in the square lattice has degree 4, and both in the honeycomb and in the truncated square lattice has degree 3. We consider the lattices either with open boundary conditions (OBC) or with periodic boundary conditions (PBC). Notice that the lattices with PBC are regular, while the lattices with OBC are not, because the vertices at the boundaries have a lower degree than the vertices within the lattice. Numerical results of QFI and FI for the lattices with OBC are shown in Fig. 6. We observe that the maximum of the QFI gets sharper and higher, and shifts to lower temperatures as the size of the lattice, i.e., the number of vertices, increases. A similar behavior occurs as the degree of the vertex of the lattice decreases: the maximum of the QFI for honeycomb and truncated square lattices is sharper and higher, and at lower temperature than the peak of the QFI for the triangular lattice. The predicted behavior of the QFI at low temperature (15) is a good approximation for honeycomb and truncated square lattices, because it fits the maximum of the QFI, its height and position. For the square it is fairly good approximation, but for the triangular lattices it fits only the QFI at the temperatures closer to zero. The FI of position measurement is a couple of orders of magnitude lower than the QFI [see the ratio F c (T )/F q (T ) in Fig.  7], and its maximum is at higher temperature than the maximum of the QFI.
For lattices with PBCs the behavior of the QFI is qualitatively the same as regards the goodness of the lowertemperature approximation (15) and the dependence of the QFI on the size of the lattice and the degree of the vertices. However, the maxima of QFI for lattices with PBCs are lower and occur at higher temperature than the maxima of QFI for lattices with OBCs. Remarkably, the FI for these lattices with PBCs is identically null. Some analytical results can be obtained for the square lattice, both with OBCs and with PBCs. Indeed, the m × n square lattice with OBCs is actually a grid graph and is the Cartesian product of two path graphs, G m,n = P m P n [82]. Instead, the m×n square lattice with PBCs is actually the torus grid graph and is the Cartesian product of two cycle graphs, T m,n = C m C n [83]. For the Cartesian product G 1 G 2 of two graphs G 1 and G 2 we can easily obtain the QFI and FI as follows (proof in Appendix C): Thus, since the FI of position measurement for the cycle graph is identically null, this result analytically proves the null FI for the square lattice with PBCs.

V. ROLE OF COHERENCE
Temperature is a classical parameter, i.e. any change in the temperature modifies the eigenvalues of the Gibbs state but not the eigenvectors, which coincide with the eigenvectors of the Hamiltonian at any temperature. As a consequence, one may wonder whether quantumness is playing any role in our analysis, which also does not rely upon quantum effects as entanglement. Despite the above arguments, the quantum nature of the systems under investigation indeed plays a role in determining topological effects in thermometry. In fact, thermal states (6) are diagonal in the Hamiltonian basis, but show quantum coherence in the position basis, which itself is the reference classical basis when looking at topological effects in graphs. In turn, as we will see in the following, the peak of the QFI occurs in the interval of temperatures over which the coherence starts to decrease.
In order to quantitatively assess the role of coherence, let us consider the l 1 norm of coherence [84] as a measure of quantum coherence of a state ρ. For convenience, we normalize this measure to its maximum value C(ρ N ) = N −1, thus defining C(ρ) := C(ρ)/(N −1). At T = 0, the system is at thermal equilibrium in its ground state and since the Hamiltonian of the system is the Laplacian of a simple graph, the ground state is the maximally coherent state |ψ N = N j=1 |j / √ N . The normalized coherence is thus equal to one.
As far as the temperature is very low, the ground state is robust, the coherence remains close to one, and the QFI is small, i.e. the robustness of the ground state prevents the system to effectively monitor any change in temperature. On the other hand, when temperature increases, thermal effects becomes more relevant, coherence decreases, and the QFI increases. In other words, it is the fragility of quantum coherence which makes the system a good sensor for temperature (a common feature in the field of quantum probing). For higher temperatures, the Gibbs state approaches a flat mixture, almost independent of temperature, and both the coherence and the QFI vanish. In order to illustrate the argument, let us consider the case of complete graphs, for which we have analytic expressions for the QFI, see Eq. (30), and for the normalized coherence As it is apparent from Fig. 8, where we show the two quantities, the peak of QFI indeed occurs in the interval of temperatures over which the coherence is reduced by a factor 1/e (we have numerically observed analogous behavior also for the other graphs). Upon comparison of Eq. (30) with Eq. (37) we may also write

VI. CONCLUSION
We have addressed the role of topology in determining the precision of thermometers. The key idea is to use a finite system as a probe for estimating the temperature T of an external environment. The probe is regarded as a connected set of subunits and may be ultimately modeled as a quantum walker moving continuously in time on a graph. In particular, we have considered equilibrium thermometry, and evaluated the quantum Fisher information of Gibbs states. Since the Hamiltonian of a quantum walker corresponds to the Laplacian matrix of the graph, the topology is inherently taken into account. We have considered some paradigmatic graphs and two-dimensional lattices, evaluated the Fisher information (FI) for a position measurement and compared it with the quantum Fisher information (QFI, energy measurement), providing analytical and numerical results. In particular, we have focused on the low-and the high-temperature regimes, which we have investigated by means of analytic approximations which allow us to have a better understanding of the behavior of the system. We have proved, by numerical and analytical means, that the maximum of the QFI and the corresponding optimal temperature depend on the two topological parameters of the graph: the algebraic connectivity and the degeneracy of the first energy level. In our system, the algebraic connectivity also represents the energy gap between the first excited energy level and the ground state, and the smaller is the algebraic connectivity, the higher is the maximum of the QFI. These results are supported by a number of examples. In particular, graphs and lattices whose vertices have low degree, e.g. path and cycle graphs, as well as honeycomb and truncated square lattices, show the highest maxima of QFI. We also notice that the maximum of the QFI and the corresponding optimal T decrease as N increase in the complete graph, while in all the other cases we have the opposite behavior.    ), with a proportionality constant which depends on the topology of the graph. In this regime, the maximum QFI is attained by the complete graph, which is the simple graph that, at given number of vertices, has the highest number of edges. A remarkable thermometer is also obtained considering the complete bipartite graph. Despite its low QFI (if compared with the cycle and path graphs) it is possible to tune the position of the maximum of QFI  (15) in the low-temperature regime and QFI F high q (19), FI F high c (22), and their ratio in the hightemperature regime for the graphs considered in the present work: complete graph KN , cycle graph CN , complete bipartite KN 1 ,N 2 , star graph SN , and path graph PN . Analytical results are also available for the √ N × √ N square lattice with OBC (grid graph G √ N , √ N ) and with PBC (torus grid graph T √ N , √ N ), since grid graph and torus grid graph are the Cartesian product of two path graphs and two cycle graphs respectively (see Appendix C). To have a fair comparison in terms of the total number of vertices N , in the table we report the result for √ N × √ N square lattices, and for the complete bipartite graph KN 1 ,N 2 we write results as a function of N = N1 + N2 and ∆ = N2 − N1 (N2 ≥ N1 as assumed in the paper), except for the QFI in the low-temperature regime. The FI F low c in the low-temperature regime is not reported, because an expression suitable for a comparison is not available (see Eq. (18)). Both QFI and FI in the high-temperature regime depend on the temperature as T −4 , thus we report their values multiplied by T 4 to focus on the factor which depends on the topology of the graph. The same criterion is adopted for the QFI in the low-temperature regime for consistency. Numerical results show that graphs with low degree, e.g. CN and PN , exhibit the highest maxima of the QFI at low temperatures. Conversely, at high temperatures and at fixed N , the maximum QFI is obtained with the complete and the star graph, whose QFI scales linearly with the order N . Indeed, in the limit of N → ∞, the QFI of PN approaches that of CN , as well as the QFI of G √

At intermediate temperatures, the analytical approxi-
Low-temperature High-temperature Finally, we have discussed the role of coherence (in the position basis) in determining the precision. Our results provides some general indications on the role of topology in using quantum probes for thermometry, and provide new insights in the thermometry of finite-size quantum systems at equilibrium, at least for the class of systems where the Hamiltonian is in the form of a Laplacian matrix. In particular, our results suggest that quantum probes are particularly efficient in the low-temperatures regime, where the QFI reaches its maximum. They also pave the way to investigate the role of topology in outof-equilibrium thermometry.
where the last equality was first proved by Euler and it is known as the degree sum formula or the handshaking lemma [85,86]. Next, we write the sum of the E 2 k as Using the definition of degree and adjacency matrices, we see that and clearly Tr[DA] = Tr[AD] = 0, whereas since the adjacency matrix is symmetric, A k,m = A m,k , and for simple graphs A k,m ∈ {0, 1}, thus A 2 k,m = A k,m . We also notice that this result is somehow related to the well-known fact that (A 2 ) k,j is the number of walk of length 2 connecting the vertexes k and j. Eventually we obtain Appendix B: Fisher Information for a position measurement Let us consider the position measurement, whose POVM is given by {|j j|}. Given an equilibrium state ρ T at temperature T , the probability distribution of the outcomes is given by the Born rule and the FI by definition is (11). From classical thermodynamics we recall that and the first derivative of the probability distribution is where Ĥ ρ T j is given in Eq. (13). From this result, the FI simplifies as from which the FI for a position measurement (12) follows.
Appendix C: QFI and FI for the Cartesian product of two graphs

Cartesian product of two graphs
The Cartesian product G 1 G 2 of two graphs G 1 and G 2 is a graph with vertex set V (G 1 ) × V (G 2 ). Therefore, a generic vertex of G 1 G 2 is denoted by (j, k) ∈ V (G 1 ) × V (G 2 ) and the adjacency of vertices is determined as follows: two vertices (j, k) and (j , k ) are adjacent if either (j = j and k ∼ k ) or (j ∼ j and k = k ), where the ∼ symbol indicates the adjacency relation between two vertices. If G 1 and G 2 are graphs on N 1 and N 2 vertices, respectively, then the Laplacian matrix of where I N denotes the N × N identity matrix. If (E

Quantum Fisher Information
The Laplacian matrix L(G) is the Hamiltonian of a CTQW on the graph G 1 G 2 . According to the energy eigenvalues (C2), the partition function is where Z(G 1 ) is the partition function for a CTQW on the graph G 1 , and Z(G 2 ) is the partition function for a CTQW on the graph G 2 . It follows that the expectation value of the energy is Moreover Ĥ 2 (G 1 G 2 ) = Ĥ 2 (G 1 ) + Ĥ 2 (G 2 ) and so the QFI (34) follows by definition (8).

Fisher Information for position measurement
A generic vertex of G 1 G 2 is (j, k) ∈ V (G 1 ) × V (G 2 ), meaning that j ∈ V (G 1 ) and k ∈ V (G 2 ). Accordingly, a position eigenstate in G 1 G 2 is |j ⊗ |k . According to Eqs. (C2)-(C4), the Gibbs state is The probability of finding the walker in (j, k) at a given temperature T is where p 1 (j|T ) is the probability of finding the walker in the vertex j of G 1 , and, analogously, p 2 (k|T ) is the probability of finding the walker in the vertex k of G 2 . Notice that j p 1 (j|T ) = k p 2 (k|T ) = 1. Since we find that the FI (12) is from which Eq. (35) follows, since j ∂ T p 1 (j|T ) = ∂ T j p 1 (j, T ) = 0 and analogously k ∂ T p 2 (k|T ) = 0.

Grid graph and torus grid graph
In this section we offer some details to assess the QFI and the FI for the grid graph and torus grid graph in Table I. In particular, we report the number of edges M and the sum of the degrees squared k d 2 k required to compute the QFI (19) and the FI (22) in the hightemperature regime, as well as the energy level E 1 and its degeneracy g 1 required to compute the QFI (15) in the low-temperature regime.
The grid graph G N,N = P N P N is the Cartesian product of two path graphs P N , and represents a N ×N square lattice with OBCs. The total number of vertices is N 2 , while the number of edges is M = 2N (N − 1). There are four vertices with degree 2 (the corners), (N − 2) vertices with degree 3 on each side of square lattice, and the remaining N 2 − 4 − 4(N − 2) = (N − 2) 2 vertices have degree 4. Hence k d 2 k = 4(4N 2 − 7N + 2). The path graph P N has nondegenerate energies E 0 = 0 and E 1 = 2[1 − cos(π/N )]. The grid graph has exactly the same E 1 but with degeneracy g 1 = 2, since, according to Eq. (C2), it results from the two possible combinations of E 0 and E 1 of the two P N .
The torus grid graph T N,N = C N C N is the Cartesian product of two cycle graphs C N , and represents a N × N square lattice with PBC. The total number of vertices is N 2 , while the number of edges is M = 2N 2 . It is 4-regular, hence k d 2 k = 16N 2 . The cycle graph C N has nondegenerate energy E 0 = 0 and 2-degenerate energy E 1 = 2[1 − cos(2π/N )]. The torus grid graph has exactly the same E 1 but with degeneracy g 1 = 4, since, according to Eq. (C2), it results from the four possible combinations of E 0 and E 1 of the two C N .

Appendix D: Exact QFI for the complete bipartite graph
The energy spectrum of the complete bipartite graph K N1,N2 consists of only four energy levels (see Sec. IV C). This allows us to obtain the QFI at all the temperatures from Eq. (8) where Z = 1 + (N 2 − 1)e −N1/T + (N 1 − 1)e −N2/T + e −(N1+N2)/T . For the star graph S N , which is the complete bipartite graph K 1,N −1 , the spectrum reduces to three energy levels, and the resulting QFI is (D2)