{'fraction_non_alphanumeric': 0.036661721925751824, 'fraction_numerical': 0.010229834126418402, 'mean_word_length': 4.088021956479122, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Arboreal Bound Entanglement

In this paper, we discuss the entanglement properties of graph-diagonal states, with particular emphasis on calculating the threshold for the transition between the presence and absence of entanglement (i.e. the separability point). Special consideration is made of the thermal states of trees, including the linear cluster state. We characterise the type of entanglement present, and describe the optimal entanglement witnesses and their implementation on a quantum computer, up to an additive approximation. In the case of general graphs, we invoke a relation with the partition function of the classical Ising model, thereby intimating a connection to computational complexity theoretic tasks. Finally, we show that the entanglement is robust to some classes of local perturbations.


I. INTRODUCTION
Multipartite entanglement is still a phenomenon that is poorly understood and categorised. For some types of entangled state, such as N -qubit GHZ states, it requires very little noise (loss of a single qubit) to entirely destroy the entanglement, whereas others are much more robust, such as the multipartite states based on error correcting codes. One is therefore prompted to ask about the types of multi-particle entanglement that arise in nature, and query how persistent entanglement is within the thermal states of local Hamiltonians. The ability of entanglement to persist at high temperatures will be crucial to future experiments and could have a direct bearing on the construction of quantum memories [1].
We defer the analysis of the persistence of entanglement in general Hamiltonians to future studies. In this paper, we instead concentrate on a specific class, graph Hamiltonians, with the intent of gaining insights for these future analyses. Graph states are particularly interesting because they frequently arise within the study of quantum information. Many states such as Bell states, GHZ states and CSS error correcting codes are all equivalent, under the action of local unitary rotations, to graph states. It is already known that all thermal graph states can be distilled up to a finite temperature [2] and that for some subset, which includes many interesting examples such as the graphs corresponding to square lattices of arbitrary dimension, this temperature is tight i.e. above that temperature, entanglement can't be distilled [2,3]. On the other hand, for some models, it has already been shown that there is still entanglement present in these models. This was first demonstrated for GHZ Hamiltonians [4], but has since been shown to exist in simpler models, such as for square lattices [5].
Papers such as [5] simply give an existence proof for bound entanglement, which comes as little surprise since it would be quite remarkable if the distillability temperature (upper bounded by the temperature at which there exists a bipartition of the qubits such that the state is positive under the partial transpose operation) coincided with the full separability temperature (lower bounded by the temperature at which there exists a bipartition of the qubits such that the state is negative under the partial transpose operation), and do not tackle the question the maximum temperature to which the entanglement persists. This is part of what we address here, although we also discuss other issues such as those arising in [6] about when one can give a fully separable decomposition of the thermal state, as well as giving the optimal entanglement witnesses (in Sec. IV). In Sec. III, we will analyse the linear graph (also known as the 1D cluster state) in particular detail, and prove that the state becomes fully separable as soon as all possible bipartitions are positive under the partial transpose operation (PPT), as is the case for the thermal states of all tree graphs. In conjunction with the previous distillability result, we thus know the entire entanglement structure of these states. We will demonstrate what features of the proof are particular to thermal states by contrasting with the global and local depolarising noise cases in the appendices, which also serves to resolve some outstanding questions from [3]. The techniques that appear here are a generalisation of those presented in [7], in which the geometry of the star graph was found to be particularly beneficial for proving many of the same properties for GHZ-diagonal states. For treatment of that special case, we refer the reader back to that paper; we will not dwell on it here.
The treatment of entanglement witnesses in this paper is important in its own right. There have been numerous studies of the entanglement in graph states [8][9][10][11][12][13]. Many of these detect entanglement on an ad hoc basis, i.e. an operator is found which detects some entanglement. Our strategy rather takes the opposite approach; we start from determining the absolute limits of the presence of entanglement, describe the witnesses that work at these limits, and then show how to approximate these on a quantum computer. These witnesses can therefore be expected to be substantially stronger than existing witnesses in certain regimes (particularly in the case of thermal noise), although in some instances these other witnesses can also be shown to be optimal [8,14]. Other recent studies [15,16] provide an alternative perspective -given a set of measurement data, they solve a semi-definite program in order to determine the most and least entangled states compatible with those measurement results with respect to a specific entanglement measure.

A. Multipartite Entanglement Structure
Beyond a simple statement of whether a particular graph-diagonal state is entangled, we wish to be able to categorise this entanglement. A first natural question is how useful is this entanglement? The most useful type would be distillable entanglement, and the distillability regime has already been investigated [2,3]. Beyond that, [17] suggested a hierarchy of separability criteria: for a state of N qubits, with respect to how many independent groupings of the qubits, k, is the state separable? It is said to be k-separable. For instance, if a state can be written as for some grouping of the qubits, the state is 3-separable. If a state is not k-separable with respect to some partition, we say that there is some k-partite bound entanglement present (the smaller k, the stronger one might consider the entanglement to be). The particular case which will arise frequently is when the state is not distillable, and yet not every bipartition is separable, so there exists some bipartite bound entanglement. We emphasise that this is not the same as the genuine multipartite entanglement that is often discussed, particularly in the pure state case. For instance, in that case, a 3-qubit state (|00 + |11 ) |0 / √ 2 is bipartite entangled, whereas (|000 +|111 )/ √ 2 is tripartite entangled. Since this class of entanglement will never arise in the present treatment, we are not unduly worried about possible confusion.

B. Graph State Basics
Consider a graph G which is composed of edges E and N vertices V . With each vertex we can associate a qubit. The stabilizer operators are defined as and the Hamiltonian for the graph G is where X n is the Pauli X matrix applied to the qubit on vertex n. We use Z x to denote the application of Z rotations to all qubits for which the N -bit string x is 1, i.e. if we denote the n th bit of x ∈ {0, 1} N as x n , we have K x is similarly defined in terms of the elementary K n . The eigenstates of the Hamiltonian are |ψ x = Z x |ψ , where |ψ denotes the ground state of the Hamiltonian (known as 'the' graph state for the graph G). These states are all simultaneous eigenstates of the stabilizers K n |ψ x = (−1) xn |ψ x and they have energies −N ∆/2 + ∆w x , where w x is the Hamming weight of x. A general graph-diagonal state ρ (meaning that ψ x | ρ |ψ y = 0 if x = y) can be written as for real coefficients s y with s 0 = 1 and Any state can be made graph state diagonal via stochastic local operations while maintaining the values of s y [18,19]. The thermal state is written more succinctly since s y = s wy where s = tanh(β∆/2) and β is the standard inverse temperature, This state is the ground state |ψ with Z rotations applied independently at each site with probability This interpretation shows that there is a single critical temperature for the persistence of entanglement -it is not the case that as the temperature is varied the system starts entangled, becomes separable, and then becomes entangled again because, through local operations (probabilistic application of Z rotations), we can convert any thermal graph state into one of a higher temperature, and this process must only reduce the entanglement. It also makes this model of interest in a variety of experimental scenarios, since the thermal state corresponds to local dephasing noise acting on |ψ .
Alternatively, |ψ can be defined constructively. It is formed by preparing each qubit in the state |+ and applying a controlled-phase gate between every nearest-neighbour pair (i.e. every two vertices forming an edge). Perhaps the most vital observation, which allowed the previous proof of distillability [2,3], is that the controlled-phase gate commutes with the Z noise. This allows us to map between different graph states without propagating the noise in a bad way.
One can apply local unitary operations to graph states and this can map them into other interesting states, such as those related to error correcting codes [20,21]. Certain local unitaries, however, can map graph states into different graph states [22]. Such operations will keep graph diagonal states as graph diagonal states (but for a different graph). However, the permutation of the diagonal elements means that these local rotations do not map thermal states into thermal states.
It will often be the case that we are interested in two-colourable graphs. In the literature on graph theory, the term 'bipartite' is more commonly used. However, we avoid this terminology in order to avoid confusion since bipartite will arise in other contexts. For the graph-theoretic terminology not defined here, we refer the reader to [23].

II. BIPARTITE BOUND ENTANGLEMENT
In [2,3], we described a class of graphs whose thermal states can be optimally distilled. Every graph state can be distilled up to the temperature Clearly, it is necessary for distillability that there should be distillable entanglement between every possible bipartition, i.e. every bipartition should be non-positive with respect to the partial transpose operation (NPT).
Our program now consists of deriving when there exists at least one NPT bipartition of a thermal graph state, and comparing it with the temperature for distillability. Let us emphasise that there could still be entanglement above this bipartite bound, which would correspond either to bipartite entanglement not detected by the NPT condition, or to genuine multipartite bound entanglement, but we need to establish this bound first. We start from Eqn. (1) and introduce a bipartition z ∈ {0, 1} N i.e. all the vertices with z n = 0 are on one side of the partition and those with z n = 1 are on the other side. We will take the partial transpose on the z n = 1 side. Recall that under the partial transpose, the Pauli operators alter by Z n → Z n , X n → X n but Y n → (−1) zn Y n . Thus, Observe that products of stabilizers remain as products of stabilizers and, as a result, the eigenvectors of ρ P T are just |ψ x , with eigenvalues For thermal states, we are interested in finding the smallest positive value of s such that the smallest eigenvalue is zero. In the remainder of this section, we will establish the optimal choices of both x and z. Proof. Z-measurements (which serve to remove vertices from a graph state) commute with the local Z noise present in the thermal state, so by applying these measurements (and applying compensating Z rotations on the neighbours of any spins we measure in the |1 state), we can cut out any spins we want from G. In particular, we can remove all the vertices in G but not in H. This leaves behind H, from which we conclude that if entanglement persists in any bipartition of H, it must also persist in an identical partition of G (where it is irrelevant on which side of the partition we place the additional spins).
We learn from Lemma 1 that bound entanglement is more persistent in large systems than in small ones! Let us neglect the factor of 2 N , since it is of no consequence. The eigenvalues are thus denoted by for the thermal state. By neglecting the subscript x, we mean the case of x = {11 . . . 1}, and by neglecting z we mean (for two-colourable graphs) the two-colouring partition.
We will be particularly loose with the superscript N . As an N , it denotes the number of vertices in a graph (and hence the number of bits of x and z), which is useful for recursion relations. However, we might instead use G to denote a particular graph and, often, it can be neglected entirely as it is clear from the context. The notation of neglecting the x and z subscripts will arise because we can prove the best choices: Proof. Consider a bipartition z. Select a spin n, using x to index all bit strings on the N − 1 bits not n, and use k as an N − 1 bit string which is 0 except in the positions which have an edge to spin n which crosses the bipartition, k m = E m,n (z m ⊕ z n ). One can show that G\n x⊕k (s).
From Lemma 1, we know that the graph G is at least as entangled about any bipartition as it is when qubit n is removed. Therefore, in the region when all the f G x,z (s) are positive (i.e. for values of s > 0 but smaller than the critical value), all the f G\n x,z (s) are also positive. Therefore, in this region, the smallest of all the f G x,z (s) is for x = {11 . . . 1}, i.e. this is the one that will become 0 first. Lemma 3. The optimal bipartition for the thermal state of a two-colourable graph is a partition into its two colour classes.
Proof. Consider each pair of nearest-neighbour variables z n ⊕ z m as if it were an independent variable z nm . We can now apply the same technique, comparing when one of these variables is either 0 or 1: where the bits of k, k l = E n,l z nl + E m,l z ml . Again, in the region we're interested in, the right hand side is positive, meaning that the optimal choice is to set the value z nm = 1. Thus, we should set all pairs z n ⊕ z m = 1. In general this is not possible because the variables are not really independent. However, for two-colourable graphs, the natural bipartition allows us to do this.

A. The Classical Ising Model and Computational Complexity Considerations
We want to evaluate f x,z (s) for some bipartition z of a thermal graph. With a fixed bipartition, then the partial transpose condition is unaffected by unitaries that are local with respect to the bipartition. As such, we can use controlled-phase gates to remove any edges of the graph that are on one side of the bipartition, and this always reduces us to a two-colourable graph on which we wish to evaluate Eqn. (2) and for which z is the two-colouring bipartition. We could just as easily rewrite this as which is equivalent to the partition function of the classical Ising model for the same graph, where, since the S n take values ±1, we rescale the y n with S n = 2y n − 1. To complete this mapping, we identify where |E| corresponds to the number of edges in G and d n is the degree (coordination number) of site n. Of particular interest would be a solution in 2D. However, the general solution to the 2D Ising model for arbitrary h is unknown. Indeed, there are known instances of field strengths for which the problem is NP-hard [24]. This leads to the suspicion that identifying the exact critical temperatures is a hard problem.
From [25,26], we know that f (1) can be efficiently evaluated. However, were we able to evaluate f (s) at several values of s, we would be able to resolve the values of y∈{0,1} N wy=k (−1) y T ltr(A)y for all k, where ltr(A) is the lower triangular component of the adjacency matrix A (this is equivalent to the graph theoretic problem of calculating the number of induced subgraphs of G of k vertices which have an odd number of edges). There is a closely associated problem for which there exists a dichotomy theorem [27] between instances of the problem which are efficiently solvable and those which are #P-complete, based on whether the logical expressions represented by i,j ltr(A) ij y i y j can be written using a constraint language which is affine of width 2 (i.e. as a string of conjunctions, where each term is only an xor of two variables y i ), and there are many #P-complete tasks that remain so, even under the restriction to planar bipartite graphs [28]. Unfortunately, however, classifying the graphs that would give us an efficient solution is related to a long standing open problem in complexity theory, ⊕2sat [29]. As such, while we are left believing that evaluating f (s) is hard at most values of s for certain graphs, we have not succeeded in proving this.

III. 1D CLUSTER STATE
There are many graphs that we could consider, and try to evaluate the critical temperatures. Since our study is motivated by the wish to understand the entanglement properties in thermal states of naturally arising Hamiltonians, we ideally wish to understand regular lattices such as the 1D and 2D square lattices, and compare them to the case of GHZ states studied in [7]: does the finite degree of each vertex mean that entanglement only persists to a finite temperature? We shall start by applying our formalism to the 1D chain. We want to determine when f N (s) = 0 in order to find if the state is entangled according to the PPT criterion. If f (s) is negative, the state is certainly entangled, but, if the value is positive, we may learn very little. One can verify that which can be solved to find f N (s) for a specific s. The solution is of the form f N = Ar N + + Br N − , where r ± are the roots of the equation The coefficients A and B allow us to match the initial conditions of f 1 (s) = 1 − s and f 2 (s) = 1 − 2s − s 2 . We want to find the value of s for which f N (s) → 0 in the large N limit. This is readily achieved if |r| < 1. However, we also want to know the largest value of s that achieves this without undergoing a sign change as N increases -this assures us that we have the smallest root. These sign changes are brought about only if the r ± are complex. The roots are real in the region 0 < s ≤ 3−2 √ 2 and thus we have f N →∞ (3 − 2 √ 2) → 0 without any sign changes, which means that in the thermodynamic limit, NPT bound entanglement persists until tanh(β∆/2) = 3 − 2 √ 2. Fig. 1 compares this limit to the numerical values calculated for finite N .

A. Full Separability
We now know a temperature up to which there is certainly a bipartition with respect to which the system remains NPT and hence entangled. It could be that NPT doesn't detect all the bipartite bound entanglement or that there is some multipartite bound entanglement present. Hence, it will be useful to establish a limit on when there can be entanglement by giving a threshold temperature above which the state is fully separable. If this comes out to be the same as the above PPT limit, all the entanglement is bipartite bound entanglement, and is detected by PPT.
We use essentially the same considerations as in [7], that is to say that we define two stabilizers K x and K y to be compatible if they have a simultaneous product state decomposition. A sufficient condition for this is that for any site where K x is a Pauli matrix σ = 1 1, at the same site, K y should either by σ or 1 1, and vice versa 1 . For instance, on a 3-qubit chain, the 3 terms This is not a necessary condition and, for completeness, we will illustrate an alternative way of making the decomposition in Appendix D.
have a common product basis of |± |0 |± and |± |1 |± , but are incompatible with K 2 . For a 3-qubit chain, these are the only compatible terms. This means that the expression is a separable state (we have added sufficient 1 1 such that the smallest eigenvalue is 0). So, let us return to the 3-qubit thermal state and expand it as By construction, each of the terms is a separable density matrix provided the coefficients in front of them are positive. In particular, this means that the coefficient in front of the 1 We now aim to perform a similar construction for chains of length N . We will define a basic string y to be a string which is of the form 00 . . . 011 . . . 100 . . . 0, i.e. it is a continuous block of w y 1s, with some unspecified number of 0s on either side. A basic stabilizer is a stabilizer K y where y is a basic string. Two basic stabilizers have a compatible basis if and only if their basic strings are non-overlapping, and separated by at least one vertex. Let b y denote the decomposition of y into its set of compatible basic strings, i.e. K y = x∈by K x . The members of b y are the generators of a group B y . We are also interested in the set of strings C y defined such that x ∈ C y if y ∈ B x , i.e. it is the set of strings which are compatible with y and have all bits set to 1 if the corresponding bit of y is set to 1. Since a basic string y necessarily satisfies the property then evaluation of (−1) wy (−1) N −1 n=1 ynyn+1 for any general y simply returns the parity of |b y |, the number of basic strings that y is formed from.
With these definitions in place, it is easier to state what we wish to prove, where This quantity f y (s) is exactly the same as evaluating s wy f (s) over the induced subgraph specified by taking the chain and removing all the vertices, and their neighbours, where y n = 1. Hence, we learnt from Lemma 1 that in the region where the state is PPT with respect to all bipartitions, all f y (s) ≥ 0, and the interpretation of the decomposition giving a separable state will be correct.
In order to prove our desired decomposition, we start by reverting to the more general notation of which will make it easier to keep track of a given term s y = s wy . Observe that if C y = y, i.e. y is not compatible with any strings of weight greater than w y , then the coefficient f y (s) = s y .
If y is not a basic string, K y will decompose, and we have to remove s y from the coefficients in front of all the K x terms where x ∈ B y . If K y = K x K a and a is a basic string, then the coefficient in front of the K x term will be altered by −s y because of the weight s y K x in the s y z∈by (1 1 + K z ) expansion. Now consider instead that K y = K x K a K b where a and b are basic strings. The expansion of K y has altered the K a K x and K b K x coefficients by −s y , and the expansion of all 3 of these terms alters the K x coefficient by 2s y − s y = s y (in addition to the s a+x and s b+x coefficients which we can follow through independently in exactly the same way). It now follows inductively that if K x and K y differ by r basic strings, the K x coefficient is altered by (−1) r s y . Now, from our previous observations, we have that So, if we start with ρ = 1 2 N y s y K y working from the strings y of highest weight, replacing K y with x∈by (1 1 + K x ), we end up with the decomposition in Eqn. (4), which is separable provided all the coefficients are positive.
It follows immediately that for all thermal graph states where the graph is a chain, or indeed a tree, the state being PPT with respect to all possible bipartitions is necessary and sufficient for separability.
Why does this proof apply to trees but not to more general graphs? It was vitally important in the construction that the compatibility of the stabilizer operators was hierarchical, meaning that for every x ∈ B y , B x ⊆ B y . In a ring of N qubits, for instance, this does not hold -N n=1 K n is compatible with N/2 n=1 K 2n and N/2 n=0 K 2n+1 , and then N/2 n=0 K 2n+1 is compatible with each K 2n+1 , but N n=1 K n is not compatible with K n . In Appendix C, we will show how far we have been able to extend our results to this more general case. Can the proof extend to graph-diagonal states other than thermal states? There will certainly be some for which this is true, and in Appendices A and B we look at some common noise models.

IV. ENTANGLEMENT WITNESSES SATURATING PPT
Using the formalism that we've developed, it's relatively simple to find an entanglement witness for a given graph G that will saturate the PPT threshold for any state which is diagonal in the graph state basis. To do this, we measure the observables For any arbitrary density matrix ρ, we calculate i.e. f x,z /2 N , the eigenvalues of the partial transpose of the state about bipartition z. Hence, for a graph diagonal state, finding Tr(W x,z ρ) < 0 for any x or z proves it's entangled. Moreover, such witnesses saturate the PPT bounds for this class of states. An important observation is that this is a genuine entanglement witness i.e. for any state ρ = x,y µ x,y |λ x λ y |, which may not be diagonal in the graph state basis, finding one of the observable to be negative witnesses the fact that it's entangled.
To prove this, note that any ρ can be converted, via local probabilistic operations, into a graph diagonal state ρ d = x µ x,x |λ x λ x | with the same diagonal elements [19], and hence the same values of s y = x µ x,x (−1) x·y . So, if ρ is fully separable, it will have the same value of Tr(W ρ) as ρ d , which we know will be positive since the local conversion to a diagonal state cannot introduce entanglement.
Since trees have the existence of an NPT bipartition as a necessary and sufficient condition for the existence of entanglement in the thermal state, the witnesses are optimal in this case.

A. Implementing the Entanglement Witnesses
So far in this section, we have seen how entanglement witnesses can be designed for any given graph which work up to the transition between NPT and PPT. For a vast range of GHZ states [7], and the thermal states of trees, we know that this transition point is also the transition to full separability. Thus, in experiments, we will be extremely interested in measuring these witnesses in order to detect entanglement. However, measuring Tr(W x,z ρ) appears to be a daunting task since W x,z is a sum of exponentially many terms K y . We will now show how this worry can be circumvented; we can efficiently measure Tr(W x,z ρ) up to an additive approximation. The protocol that we will follow is largely inspired by studies of the evaluation of tensor networks on a quantum computer [30] which proved particularly useful for calculating partition functions in classical statistical mechanics. Related problems also arose in [31].
Let us assume that we are given k copies of ρ with which we are to estimate Tr(W x,z ρ). This is equivalent to combining the probabilities of detection of each of the graph states |ψ a via The naïve approach would be to measure each of these probabilities independently, and then combine them, but that is a very inefficient approach. Instead, we would like to measure Tr(W ρ) directly. Consider the circuit The top wire, A, is a single ancilla qubit, whereas the other two wires represent N qubits on which gates are applied transversally, except for CP E which indicates that controlled-phases need to be applied between the qubits of a given register for those pairs of qubits corresponding to an edge of the graph. CP z E is a modification of this in which a controlled phase is only applied between two vertices n and m if joined by an edge of the graph and z n ⊕ z m = 1.
For any ρ = a,b µ b,a |λ b λ a |, the first two gates are just the sequence that maps |λ a into a computational basis state |a , so this circuit simply represents the input of a state if Tr(σV ) is real. After k repetitions, the probability of incorrectly estimating the value of Tr(σV ) to an accuracy ε is bounded by Chernoff's bound to be no worse than 2e −2kε 2 , so using k ∼ O(ε −2 ) gives a constant failure probability, independent of N . It remains to argue that Tr(σV ) = Tr(W x,z ρ), which is readily verified. We conclude that using k ∼ O(ε −2 ) copies of ρ allows us to estimate Tr(W ρ) (which is bounded between ±1) to an accuracy ε, independent of system size, with a number of gates O(N d) where d is the maximal degree of any vertex. The difficulty with any additive approximation is the accuracy scale that we need to achieve. Given that the eigenvalues are bounded between ±1, we don't expect to significantly outperform the protocol we've just described. However, if we look at the 1D thermal chain, for instance, then for the two-colouring bipartition and x = {11 . . . 1}, the size of the eigenvalue scales as −( 1 2 s) N/2 (see Appendix A), which shows that we would require O((2/s) N ) copies of ρ to have any hope to detect entanglement using this bipartition, and we will most likely be doing this at finite s. How, then, are we to proceed? There is one saving grace in that we can sum many eigenvalues together. Indeed, this happens naturally in our protocol as a result of the trace operation. Clearly, if several eigenvalues sum to give a negative value, then at least one of them is negative, and so this also acts as an entanglement witness. For instance, we can use the bipartition z to define a subset of vertices, S, which have at least one edge crossing the bipartition. The vertices in S = V \ S can then be disentangled from the graph state without changing the eigenvalues of the partial transpose operation. If we just trace out those qubits, however (without applying the transversal controlled-controlledphase on those qubits), then we end up summing 2 |S | eigenvalues. For thermal states, this provides the ability to measure the entanglement witness on any induced subgraph of |S| qubits, and the required accuracy is only exponential in |S| not N . The reason for it being particularly useful for the thermal state is that all of the qubits that we remove are separable from the rest of the system, in the state 1 2 (1 + s) |0 0| + 1 2 (1 − s) |1 1|. Since for the thermal state (see Lemma 1) these bipartitions/induced subgraphs induce a partial ordering in the entanglement detection ability, each of which can detect entanglement up to some finite temperature, this is extremely promising for the detection of entanglement in this case. Moreover, we observe from Fig. 1 that even short lengths (|S| independent of N ) of induced subgraph can detect almost all of the temperature range of any longer chain.

Evaluating Critical Temperatures on a Quantum Computer
The technique that we have used for implementing the entanglement witnesses also suggests that we might be able to implement a quantum computation to evaluate f (s) to some level of approximation, such that we might search for the critical temperature. Although the problem of exponentially vanishing eigenvalues will remain, we will now see how the exponent is at least reduced compared to the witnesses above.
Consider the following circuit The use of ρ is what distinguishes this algorithm from the entanglement witnesses -if we are provided with the thermal state, there is no simple way to convert it into this form of ρ, but we can certainly create it if we know the value of s that we want to test. The probability of getting the |0 result on the top register is given by which allows us to evaluate f (s)/2 N (the eigenvalues of the partial transpose operation), although exponential accuracy is still required in order to detect entanglement close to the separability threshold. There are some further improvements that can be made using the observations made in App. C for the classical algorithm 2 , although they do not significantly impact the scaling.

V. STABILITY TO PERTURBATIONS
Calculating the temperature at which a particular thermal state becomes PPT with respect to all bipartitions, and being able to detect it, are important steps. In the real world, however, we will never generate exactly the Hamiltonian that we want. Thus, we must examine how stable the entanglement is to small perturbations. The simplest possible case is to redefine the Hamiltonian as H = − 1 2 n ∆ n K n with s n = tanh(β∆ n /2), corresponding to different dephasing rates on each qubit. Due to the numerical work of [5], we already expect that the critical temperature will not be significantly affected. In the case of a 1D chain, we can derive a recursion relation for the polynomial, which yields the temperature at which the state becomes positive with respect to the partial transpose taken on any possible bipartition. Numerically, we could sample the ∆ n from some distribution -we chose a Gaussian distribution of width σ -and calculate the critical temperature. This has been plotted in Fig. 2, indicating a substantial robustness. Analytically, we can note that min s k = 3 − 2 √ 2 gives a lower bound on the critical temperature in the thermodynamic limit. While this is a relevant perturbation to consider, perturbations are likely to exhibit much greater variety. There is a further case where we can make significant progress, although it remains far from the case of arbitrary local magnetic field: we add a perturbative field of the form As |δ| increases, the ground state is progressively less entangled. The terms K n = ∆ n K n + δ n Z n mutually commute, [K n , K m ] = 0, and K 2 n = (∆ 2 n + δ 2 n )1 1, so one can write the thermal state as For simplicity of notation, we'll take all the ∆ n equal, and all the δ n equal, although none of the subsequent analysis is contingent upon it. The thermal state is expanded as although the summation over y is restricted to cases where y n = 0 if x n = 1. We can now take a partial transpose with respect to a bipartition z, No longer is this a product of commuting terms, so the eigenvectors are not as obvious as the case where δ = 0. Nevertheless, the minimum eigenvalue is no larger than ϕ| ρ P T |ϕ for any |ϕ . If we take |ϕ = |ψ x , this is entirely equivalent to measuring the expectation value of the entanglement witness W x,z . Let us take |ψ 11...1 . This gives This is exactly the expression we had for no perturbation, except that the effective s has changed. The critical temperature β δ at which the expectation value of this state is zero is hence related to the unperturbed β 0 by Furthermore, β δ is an upper bound on the true critical β. If one examines this expression, it is remarkably robust. For the infinite 1-D chain, we find that the lower bound on the critical temperature T decreases monotonically, but is still at 99.0% of the unperturbed value for δ = 1.
In the special case of a 1D geometry, we could make progress in analysing other perturbative fields such as X, Y and ZZ through transformation into a standard form which can be analysed via the Jordan-Wigner transformation [32,33]. However, we have not succeeded in analytically calculating the expectations W x,z .

VI. CONCLUSIONS
We have shown that, for the 1D thermal graph state, bound entanglement persists to a finite temperature, in contrast to the extremely non-local GHZ systems [7], which have entanglement persistence that grows with system size. In the thermodynamic limit, the critical temperature for the chain is in comparison to the distillability threshold Note that as the length of the chain increases, so does the temperature for the persistence of bound entanglement, unlike the distillable entanglement. Furthermore, this entanglement is all bipartite bound entanglement; there is no multipartite bound entanglement present. We have given entanglement witnesses that detect all the PPT entanglement that is present in any graphdiagonal state of any graph, and are hence optimal if the state is the thermal state of a tree -the state is fully separable if not NPT. We have discussed the implementation of these witnesses on a quantum computer. The entanglement in the thermal state is robust to perturbations in the Hamiltonian. In the appendices, we have discussed how optimality of the PPT condition might extend to other graph-diagonal states for chains, and for thermal states of graphs containing loops. We conjecture that for k-colourable graphs, the thermal state becomes fully separable when it becomes k-separable. However, it seems likely that determining the critical temperature for graphs such as the 2D lattice will be a computationally hard problem. Resolving these questions are interesting avenues for future study.
This work was supported by the National Research Foundation & Ministry of Education, Singapore, and Clare College, Cambridge. The author thanks Simone Severini and Ravishankar Ramanathan for useful conversations.

Appendix A: Global Depolarising Noise on the Chain
In [7], the optimality of the PPT condition for detecting entanglement was proved for a vast parameter regime, which simply included thermal noise as a special case. Any instance in which all the coefficients s y were positive was also covered. As such, we might ask how far beyond the thermal state our results apply, even just for chains. This is certainly an interesting avenue for future study, however proofs are going to be vastly more difficult than for GHZ states. For instance, in the full separability proof, for star graphs, if K x is compatible with K y and K z , then K y and K z are compatible, and this makes it very easy to group terms together. However, this is not the case for graphs such as the chain (consider, for instance, K 1 , K 1 K 3 and K 1 K 4 ). Still, we can briefly consider how likely it seems that this should hold. Do the PPT and full separability thresholds coincide? Are the optimal eigenvector and bipartition the same as for the thermal state? Do the NPT and distillability thresholds coincide?
We shall provide some hints to these answers by considering the graph-diagonal state ρ = 1 1 + α |ψ ψ| , which we will again address for the linear graphs. This noise model was considered in [3], where it was observed numerically, using the distillation protocol of [18,19], that distillation of the state was possible at α 2 N/2 , but the impossibility of distillation was only proven for α ≤ 2. We will analytically show that for even N , the distillation protocol of [18,19] does indeed distil for all α > 2 N/2 , but we shall start by showing the converse, that distillation is impossible for α ≤ 2 N/2 , and our particular reason for doing so is to illustrate that the choices of x and z that are optimal for the thermal state are not optimal in this case.
The eigenvalues of ρ, indexed by x, under bipartition z are given, up to normalisation, by where the sum is just f x,z (1). Let's consider taking the two-colouring bipartition of the chain, and x = {11 . . . 1}.
Using the results of Sec. III, we can evaluate this and find that the state cannot be distilled if 2 N + 2 (N +1)/2 α cos(π(N + 1)/4) ≥ 0.
Hence, for N mod 8 = 2, 3, 4, we have that the critical value is α = 2 N/2 . For other values of N mod 8, there are other choices of x which give this result. For instance, for N mod 8 = 4, 5, 6, the same value is achieved using x = {11 . . . 100}. Now let us instead consider z = {100 . . . 0} and x = {1100 . . . 0}. The corresponding eigenvalue remains negative until α ≤ 2, so the optimal choice of z for probing PPT across all bipartitions is certainly not the twocolourable bipartition. We have also verified by bruteforce that for N ≤ 6, the state is indeed fully separable at α = 2.

Optimal Distillation
Let's consider a two-colourable graph G, with the twocolourable bipartition dividing the vertices into sets V A and V B of sizes N A and N B respectively, N = N A + N B . We are interested in the distillation of a state which has diagonal elements λ x = λ x | ρ |λ x = (1 + αδ x,0 )/(2 N + α). For convenience, we will split the string The distillation protocol of [18,19] gives two protocols P1 and P2 which are defined in terms of their recursion relations for these diagonal elements, If all the coefficients initially obey as they do for the globally depolarised state, then after the application of P 1 or P 2, the new coefficients also have this same structure. One can write down the action of P1 followed by P2.
Under the assumption that λ 00 ≥ λ x0 , λ 0x , λ xx ≥ 0, and recalling that the coefficients must be normalised such that we find that there are two trivial fixed points of the map, These are stable fixed points i.e. local attractors.
If we select N even with N A = N/2, as is the case with a linear graph, then a third trivial point can be found with λ 00 = 1/2 N A for all possible values of λ x0 , λ 0x and λ xx . This is an unstable fixed point. These are the only valid fixed points subject to the aforementioned constraints, and hence we conclude that repeated alternate applications of P1 and P2 serve to distil the state provided the initial state has λ 00 > 1/2 N A , i.e. 1 + α 2 N + α > 1 2 N/2 or α > 2 N/2 , analytically proving the numerical observations made in [3], but also proving optimality of this solution.
Even if the choices of x and z which are optimal for the thermal state are not optimal for the fully depolarising case, the existence of a PPT bipartition is necessary and sufficient for the impossibility of distillation, and, certainly for small sizes, N ≤ 6, the existence of an NPT bipartition is necessary and sufficient for the persistence of entanglement. Let us now treat a different case, that of local depolarising noise For a general bipartite graph with adjacency matrix A, we have that For the special case of a chain of N = 4 qubits, we can evaluate f x,z (p) by brute force and find the optimal choices of x = {1100} and z = {1000}, corresponding to a critical point described by yielding a maximum value of p ≈ 0.468 at which the state becomes PPT with respect to all bipartitions. In comparison, our separable decomposition shows that the state is 489. It appears that the two do not coincide, and so we should not expect the PPT condition to be as universal for the linear graph state as it was for the GHZ states. The techniques of [34] failed to witness any of this entanglement, but this was limited by the finite computational resources available, and is hence inconclusive.

Appendix C: Thermal Graphs
Ideally, we would like to make similar studies to those of the tree graphs for general thermal graphs, i.e. to be able to calculate the critical temperature up to which the PPT condition is violated, and to show that beyond that threshold, the state is fully separable. To date, the combinatoric factors have prevented us from giving a proof, but for completeness, we present those considerations which are possible.
Although we do not know the optimal bipartition for non-two-colourable graphs, evaluation of the partial transpose condition of G will always be identical to the evaluation on a bipartite subgraph of G. Hence, it suffices to restrict to considering two-colourable graphs.
We have already seen how one can evaluate the critical temperature for GHZ states [7] and linear cluster states. We would like to do the same for a 2D graph in spite of any unproven hints from computational complexity. To date, we have been unsuccessful, and have been forced to resort to numerics. The difficulty here is that to evaluate f (s), we need to sum over an exponential number of terms. Some advantage can be gained by rewriting the adjacency matrix of a two-colourable graph in a block structure where A tc is an N A × N B matrix, and we will assume that N A ≤ N B . This yields providing a sufficient speed-up to enable some basic numerics on a square lattice of N = M 2 qubits. We have plotted the critical temperature in Fig. 3, which suggest a tendency to a finite critical temperature for large N , but certainly does not prove it.
A further efficiency saving can be made by observing that the set of strings x that satisfy x · A tc mod 2 = 0 form a subgroup of the group of binary strings under addition modulo 2. It is only necessary to perform the sum in Eqn. (C1) over the strings x ∈ {0, 1} N A that are in the coset to the subgroup.

Full Separability
The other extreme to showing the presence of entanglement is its absence, i.e. the full separability of the state. We have already seen how for trees this corresponds exactly to the PPT threshold. We report our progress towards a similar proof for two-colourable graphs.
Let us define h x = (−1) wx (−1) {i,j}∈E xixj such that f (s) = y h y s wy . If y is compatible with x, then h x = h y h x⊕y because there must be an even number of edges between the two blocks (we will prove this in Lemma 4).
We will now specify how to make our decomposition. For each K x , find a compatible decomposition (and decompose each term as far as possible). Let's assume that K x decomposes into K y and K x⊕y . Let's also further assume that the coefficients s y and s x⊕y appear in the 1 1 term as h y s y and h x⊕y s x⊕y . We want to see that s x appears as h x s x . We use the decomposition This means that s y → s y + h y s x and s x⊕y → s x⊕y + h y s x so that, in the 1 1 term, they become Since h 2 y = 1 and h y h x⊕y = h x , this certainly gives h y s y + h x⊕y s x⊕y +h x s x , as desired. This inductively proves that all the terms in front of the 1 1 term are exactly those that appear in f (s), assuming that the first term of the induction can be proved i.e. every term K x that does not have a compatible decomposition appears as h x s x in the coefficient in front of the 1 1 term. However, we know that if there is no compatible decomposition, we are using s x (1 1 + K x ), and therefore, s x appears in f (s) as −s x . Thus, if our decomposition is to hold, we require that Proof. We start by translating the "compatible basis" decomposition to graph theoretic terms. Consider x as a bit string with bits corresponding to the vertices of the graph. y is a compatible decomposition provided y i = 0 if x i = 0 and, for all sites i, either (1) x i = 0 and {i,j}∈E x j mod 2 = 0 or (2) y i = 0 and {i,j}∈E y j mod 2 = 0 or (3) (x − y) i = 0 and {i,j}∈E (x − y) j mod 2 = 0. Note that if x i = 0, then the only condition that we have is y i = 0 -it does not matter what the neighbours are doing. For that reason, it suffices to consider only induced subgraphs G of G defined by x i = 1 (note that if G is not connected, there is a trivial decomposition given by the distinct graphs). Hence, since h x = 1, G has the property that the number of edges + number of vertices is even, and y and x⊕y represent a non-trivial partitioning of the vertices V of G into V 1 and V 2 , At each site i, we either have where A is the adjacency matrix (edge set) of G . These two terms are mutually exclusive, and we can hence write penalty terms to evaluate when these are violated, which can be rewritten as (x − y) T (Ay mod 2) + y T (A(x − y) mod 2) = 0.
Since both terms are non-negative, this means that both must be 0. The interpretation of this equation is that each vertex in either V 1 or V 2 must have an even number of edges crossing the partition. Thus, the corresponding graph theoretic lemma is Lemma 5. For a connected two-colourable graph G with (number of edges + number of vertices) even, there are two non-empty vertex sets V 1 and 2 , such that each vertex in V 1 has an even number of neighbours in V 2 and vice versa.
Lemma 5 is exactly the property that is referred to as the existence of an 'Eulerian Edge Cut', and its existence has indeed been proven for a two-colourable graph when (number of edges + number of vertices) is even [35] 3 .
This proves that the coefficient in front of the 1 1 term in the separable decomposition is f (s)/2 N for a twocolourable graph, and is hence zero at the critical PPT temperature, becoming negative above that temperature (i.e. not a valid decomposition). This is true for all two-colourable graph states (and thus, graph states of all graphs which are equivalent to two-colourable ones under local unitary rotations). Now, however, the challenge is to prove that the coefficients in front of the non-1 1 terms are also positive, which would prove that beyond the PPT threshold, a thermal graph state is fully separable. To date, we have only achieved this feat for the special cases of the GHZ state and the thermal tree graph states. We have also verified this to be true for all even rings of N ≤ 120 qubits (the coefficients are readily related to those of a chain, for which we gave the solution in the main text). Indeed, if evaluating f (s) for a given s turns out to be a hard computational problem (Sec. II A), one would also expect the same to be true for the difference between f (s) and the coefficients in front of the K x terms. the constructed separable decomposition was not optimal. This last step was done by magically coming up with a new separable decomposition. Here we want to illustrate the logical formulation of how we did this so that it can be more widely applied.
On the other hand, we can give a fully separable decomposition, based on the previously expounded technique of finding a compatible basis, of the form ρ = (1 1 + K n ) − 2K 1 K 3 + α1 1 .
does not satisfy this condition. For α ≥ 2, ρ is a valid state, but also PPT. On the other hand, the above separable decomposition only functions if α ≥ 4. Our aim is now to show constructively how to improve this bound up to the threshold of α = 2 √ 2. The first thing to observe is that the grouping of all the compatible terms is probably as efficient as it's going to get so, as before, we will use y s 0y K 0y − 1 1 min x∈{0,1} N −1 y s 0y (−1) x·y which, in this case, is just (1 1 + K 2 )(1 1 + K 3 ). Now we will concentrate on the K 1y terms, and try to give a better decomposition of them. The first observation that we need to make is that if we had two strings of tensor products of Pauli operators (σ C = σ D ) then in our previous decomposition, we would have added (s ABC +s ABD )1 1 to make these positive. However, we can rewrite them as which only requires s 2 ABC + s 2 ABD 1 1 to make it positive. In fact, for a graph state, this situation can never arise since any two products of stabilizers always differ on at least two sites. However, we will now see how to 'twist' the Pauli basis such that it can potentially arise. Note, however, that this technique is always going to introduce square roots, which are never present in f ( s), so this technique, while having the potential to improve on the previous separable decomposition in some parameter regimes, can never widen the regime where PPT and full separability coincide. The next step is to observe that for a graph where there is a vertex of degree 1, then there are stabilizer terms composed of only 2 Paulis, which means that products differ by only two Paulis. For instance, in the three qubit case we have (note that one has to be very careful with any -ve signs that may appear from multiplying out the stabilizers). We can expand the X and Y on qubit 1 using 1 2 (X + Y ) ± 1 2 (X − Y ). The fact that there are products of stabilizers which differ by only two Paulis, one of which is the spin we've just expanded, means that there will now be terms that differ on only one site each, 2 ≤ α ≤ 2 √ 2 using the numerical techniques of [34]. Using a modification of [8], it can be proven that the state is entangled up to α = 2 √ 2 [36]. This rearrangement of terms to form a new separable decomposition will always give some advantage whenever Eqn. (D1) is not satisfied for the 3-qubit star graph (although the general expression is very messy to write down), and can presumably be applied in other graphs with star-like protrusions if the signs of the weights of s y happen to be of the correct form.