{'fraction_non_alphanumeric': 0.02851137713606872, 'fraction_numerical': 0.008270127021840446, 'mean_word_length': 4.405532230180292, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Two qubits can be entangled in two distinct temperature regions

We have found that for a wide range of two-qubit Hamiltonians the canonical-ensemble thermal state is entangled in two distinct temperature regions. In most cases the ground state is entangled; however we have also found an example where the ground state is separable and there are still two regions. This demonstrates that the qualitative behavior of entanglement with temperature can be much more complicated than might otherwise have been expected; it is not simply determined by the entanglement of the ground state, even for the simple case of two qubits. Furthermore, we prove a finite bound on the number of possible entangled regions for two qubits, thus showing that arbitrarily many transitions from entanglement to separability are not possible. We also provide an elementary proof that the spectrum of the thermal state at a lower temperature majorizes that at a higher temperature, for any Hamiltonian, and use this result to show that only one entangled region is possible for the special case of Hamiltonians without magnetic fields.

We have found that for a wide range of two-qubit Hamiltonians the canonical-ensemble thermal state is entangled in two distinct temperature regions. In most cases the ground state is entangled; however we have also found an example where the ground state is separable and there are still two regions. This demonstrates that the qualitative behavior of entanglement with temperature can be much more complicated than might otherwise have been expected; it is not simply determined by the entanglement of the ground state, even for the simple case of two qubits. Furthermore, we prove a finite bound on the number of possible entangled regions for two qubits, thus showing that arbitrarily many transitions from entanglement to separability are not possible. We also provide an elementary proof that the spectrum of the thermal state at a lower temperature majorizes that at a higher temperature, for any Hamiltonian, and use this result to show that only one entangled region is possible for the special case of Hamiltonians without magnetic fields.

I. INTRODUCTION
A topic that has emerged recently within the field of quantum information is the study of entanglement in spin systems (see [1,2] for early examples). Entanglement is often considered necessarily a low-temperature phenomenon that becomes less important as the temperature is increased. It was therefore surprising that in [1] an example for two qubits was given where the ground state (T = 0) is separable but the thermal state is entangled at higher temperatures. This behavior can be understood as due to the presence of low-lying excited states that are entangled. Thus at least two qualitatively-different entanglement scenarios are possible for two qubits (apart from the uninteresting case of no entanglement at any temperature); (i) the ground state is entangled, and hence the thermal state is entangled at low temperatures up to a critical temperature, T S , above which it is separable, and (ii) the ground state is separable, but the thermal state is entangled for temperatures within some finite range (T 1 , T S ) (and separable again above T S ).
The question we address here is what other entanglement scenarios are possible for two qubits. We were stimulated to ask this question by [3] which studies the generic behavior of thermal entanglement as a function of temperature. There it was shown that the generic behavior is closed intervals in temperature where the thermal state is separable interspersed with open intervals of entanglement. Examples of the two types mentioned above were given for two qubits. Also two examples of qubitqutrit systems (d 1 = 2 and d 2 = 3, where d j , j = 1, 2 are the dimensions of the two subsystems) were given where there are two distinct entangled regions; in one case the ground state is entangled, and in the other case the ground state is separable. * Electronic address: dowling@physics.uq.edu.au Non-monotonic behavior of thermal entanglement has also been observed for qubit spin chains [4,5]. Ref. [4] studies the reduced state of two nearby qubits in particular spin chains and finds examples of two distinct entangled regions in temperature. Ref. [5] uses a multipartite entanglement measure, and observes three regions. In [6] transitions from separability to entanglement are studied as a type of phase transition using geometric arguments about the set of separable states.
Here we restrict to the case of just two qubits (as opposed to the reduced state of two qubits out of a large chain), and present a class of Hamiltonians for which most have a value of the magnetic field strength such that the ground state is entangled and there are two entangled regions. In addition, we present an example of a Hamiltonian outside this class that has a separable ground state and, again, two entangled regions. Thus we find that all the classes of behavior for the thermal states of qubit-qutrit systems found in Ref. [3] are also observed for the two-qubit case.
These results raise the question of how many distinct "entangled regions" in temperature are possible. Our numerical search failed to find Hamiltonians with more entangled regions for two qubits, indicating that this is the most complicated behavior. We show that for a class of commonly considered Hamiltonians -those without magnetic fields -it is impossible to obtain more than one entangled region. In addition we derive upper bounds on the number of entangled regions in the general case.
This paper is set out as follows. In Sec. II we present results for the dimer case of the spin-chain Hamiltonian studied in Ref. [7], then give our general class of twoqubit Hamiltonians. In Sec. III we give an example of a Hamiltonian in our class that does not exhibit two entangled regions, and show that small perturbations are sufficient to give two entangled regions. In Sec. IV we give our example with a separable ground state and two entangled regions. We derive bounds on the total number of entangled regions possible for two qubits in Sec. V, specialize to the case with zero magnetic field in Sec. VI, and then conclude in Sec. VII.

II. GENERAL CASE
The two-qubit case of the XY X spin-chain studied in Ref. [4] is of the following form: where {X j , Y j , Z j } are the Pauli sigma matrices acting on qubits j = 1, 2, J is a coupling constant with dimensions of energy and h is a dimensionless parameter corresponding to the magnetic fields experienced by the qubits. The results for this Hamiltonian on two-qubits were given in the inset of Fig. 4 in an early version of this paper [7]. This figure showed that two entangled regions were obtained, though this aspect of the results was not discussed.
An isolated system (i.e. not exchanging particles with the environment) in thermal equilibrium with a bath at temperature T will reach the canonical-ensemble thermal state ρ(T ) given by where β = 1/k B T and Z = Tr[exp(−βH)] is the partition function.
In Fig. 1 we plot the concurrence [8] as a function of (scaled) temperature and the scaled magnetic field h for the canonical-ensemble thermal state [16]. We see that there is a significant range of values of h (approximately √ 2 < h < 2.36) such that the entanglement as a function of temperature behaves as claimed -there are two entangled regions, one at low temperatures, [0, T 1 ), and then another distinct region at higher temperatures, (T 2 , T S ).
A general two-qubit Hamiltonian may be written in the form (omitting any global phase shift) where R is a real 3 × 3 matrix, A and B are real row vectors, and It is possible to add local unitary operations before and after the Hamiltonian without affecting the entanglement of the thermal state. This is because where V 1 and V 2 are local unitary operations on subsystems 1 and 2. These local unitaries act to rotate the If the local operations are chosen such that O 1 and O 2 are the orthogonal matrices which result from a singularvalue decomposition of R, then O T 1 RO 2 is a positive diagonal matrix [9].
Hence H ′ is of the form where the α j are positive, and the β jk are real. Note that the local unitaries do not remove the local component of the Hamiltonian. If it were possible to use different local unitaries before and after the Hamiltonian, the local component of the Hamiltonian could be removed entirely [10]. However, this would change the entanglement of the thermal state.
Hamiltonians of the form (6) are the most general twoqubit Hamiltonians for the problem of thermal entanglement. Now we introduce a class of Hamiltonians which is slightly restricted, in that we require β j1 = β j2 = β j . This is equivalent to requiring the magnetic field to be homogeneous. These Hamiltonians may be written as As before, the α j are positive, and the β j are real. To determine properties of these Hamiltonians, random Hamiltonians were generated, and for each it was determined if there exists a value of h such that there are two entangled regions. The α j were chosen at random in the interval [0, 1), and the β j at random in the interval (−1, 1). From a sample of 2 20 of these Hamiltonians, it was found that all had a value of h such that there are two entangled regions. Arbitrary two-qubit Hamiltonians were also tested. These were generated according to the Gaussian unitary ensemble. Each Hamiltonian was divided into a local part H L and a nonlocal part H N , and Hamiltonians of the form H h = H N + hH L were tested. It was found that, out of 2 12 samples, there were 106 such that there was a value of h for which H h has two entangled regions. This gives the overall probability for this behavior for arbitrary Hamiltonians as 2.59 ± 0.25%.

III. EXAMPLES
Although we have shown that it is extremely common for Hamiltonians of the form (7) to have two entangled regions, not all exhibit this behavior. For example, consider the XY interaction with a magnetic field, as studied by Wang [11]: Wang found that it was possible for the thermal entanglement to be zero for T = 0 but nonzero for T > 0. Wang also considered the anisotropic XY interaction, but without a magnetic field. In neither case were two regions found.
It turns out that we can vary the Hamiltonians very slightly from this example, and again recover the two entangled regions. For example, consider the anisotropic XY interaction For γ = 0 this is the Hamiltonian of Eq. (8). However, for γ equal to just 10 −6 , we again recover the two entangled regions (see Fig. 2).
Another perturbation which recovers the two entangled regions is that where the magnetic field is not exactly aligned on the z-axis: For δ ≪ 1 this is the XY interaction with a misaligned transverse magnetic field. The concurrence for δ = 10 −6 is shown in Fig. 3. Even with this very small misalignment in the magnetic field, the distinct entangled regions are again seen.

IV. SEPARABLE GROUND STATE
The next most complicated case is that where the ground state is separable, so the thermal state is separable at T = 0, but there are still two entangled regions. As local unitaries do not alter the entanglement, one can arbitrarily choose the separable ground state without loss of generality. Thus to numerically search for such examples we took the ground state to be |00 . The other eigenstates and eigenenergies were then chosen at random.
The example found was (after rounding the coefficients) The concurrence as a function of temperature is as shown in Fig. 4. There are two distinct regions of entanglement, with a separable ground state. Note that there appears to be a finite region without entanglement for low temperature. However, for much of this region the concurrence is extremely small (less than 10 −20 ) but nonzero. This indicates that the thermal state may be completely separable only for zero temperature, and the entanglement for small temperatures is not observed due to finite precision.

V. BOUND ON NUMBER OF ENTANGLED REGIONS
We used numerical techniques to search for examples of more complicated scenarios from the hierarchy, i.e. three or more entangled regions, but were unable to find any. Of course no numerical technique can be exhaustive so it remains an intriguing possibility that even more entangled regions are possible, even for two qubits. We now show that there is, in fact, a finite upper bound, 17, on the number of entangled regions for two qubits. However it remains entirely plausible that this bound is not tight and the above examples of two entangled regions represent the most complicated behavior possible for two qubits.
To analytically bound the number of entangled regions for two qubits we use the well-known fact that a twoqubit mixed state is entangled or separable depending on whether its partial transpose with respect to one of the qubits has a negative eigenvalue or not. Therefore, by solving where T A denotes the partial transpose with respect to the first subsystem, we find the transitions between entangled and separable thermal states. We may scale the energies so that the minimum energy eigenvalue is zero. If we multiply by Z, the resulting equation is polynomial in e −1/kB T with noninteger powers and 35 terms [17]. Provided the ratios of the energy eigenvalues are all rational, the polynomial has integer powers in x = e −r/kB T for some constant r. To place a bound on the number of solutions, we first take the derivative of the polynomial, then apply Descartes' rule of signs. The derivative of the polynomial has no more than 35 terms, and so has no more than 34 sign changes. By Descartes' rule there are no more than 34 (positive) zeros of the derivative, and no more than 34 turning points of the polynomial.
It is easily seen that, provided the derivative has no more than 34 zeros, there are no more than 17 regions where the polynomial is negative. In the two-qubit case, the partial transpose has no more than one negative eigenvalue [12]; thus the determinant is negative if and only if the partial transpose is negative. Hence there can be no more than 17 entangled regions. Thus we obtain a finite limit on the number of entangled regions, though this is much larger than the number of intervals which have been found numerically. In practice the number of sign changes is likely to be far less than 34, although we do not see a way of showing this analytically.
In the case where there are irrational ratios of the energy eigenvalues, the situation is more complicated because the polynomial has noninteger powers. In this case, we can achieve an arbitrarily close approximation of the Hamiltonian with rational energies. In the case where a function f is the limit of a sequence of functions f n , it is not possible for f to have more turning points than f n . The only situation where f ′ (where the prime indicates the derivative) can have more zeros than f ′ n is when f ′ n has an extremum which approaches zero in the limit n → ∞, and is only exactly equal to zero for f ′ . However, this zero would correspond to a point of inflection, rather than an extremum, for f . Thus we find that the polynomial in e −1/kB T can have no more than 17 regions where it is negative, and the limit on the number of entangled regions must hold for irrational powers also.
For a qubit coupled to a qutrit entangled mixed states must still have a non-positive partial transpose [13], however there is a complication due to the fact that the partial transpose can have more than one negative eigenvalue. The main problem in this case is that, at a point where det[ρ(T ) TA ] changes sign, the state could be separable for det[ρ(T ) TA ] = 0, but entangled for slightly higher or lower temperatures. This could happen if one of the eigenvalues passes from positive to negative, while another passes from negative to zero to negative.
However, despite this possibility it can be seen that the number of turning points of det[ρ(T ) TA ] still provides an upper bound on the number of entangled regions. For a qubit-qutrit system there are six energy levels and so up to 462 terms in the polynomial corresponding to det[ρ(T ) TA ] (assuming rational eigenvalues). There are therefore no more than 461 turning points, even in the limit of irrational eigenvalues. Combined with the fact that the state must be separable at high temperature, this implies that the number of entangled regions can be no higher than 462 (some of them may be separated by single points in temperature where the system is separable).
More generally, for the case of two subsystems of arbitrary dimensions, d 1 and d 2 , one might hope to put a finite upper bound on the number of entangled regions as a function of d 1 and d 2 . However, in higher dimensions entangled mixed states do not necessarily have a non-positive partial transpose. In fact it has recently been shown that even the problem of distinguishing separable and entangled mixed states is N P -hard in arbitrary dimension [14]. It is therefore unlikely that this approach will yield upper bounds for higher dimensional systems.

VI. ZERO MAGNETIC FIELD
Although we were unable to definitively answer the question of what entanglement scenarios are possible for an arbitrary two-qubit Hamiltonian, we can for a certain class of Hamiltonian -those that have no local terms (corresponding to a magnetic field), and only interaction terms. A Hamiltonian without local terms may be written in the form As in Sec. II, we can apply local unitaries without altering the entanglement of the thermal state. These simplify the Hamiltonian to a form that is diagonal in the Bell Basis.
The Bell basis is a set of maximally entangled states where Z|↑ = |↑ , Z|↓ = −|↓ (up and down spins if the qubit is a spin 1/2 quantum system).
To determine the behavior of the entanglement, we compare the state at two different temperatures, T 1 and T 2 , such that T 1 < T 2 . We first note that the eigenvalues for ρ(T 2 ) are majorized by those for ρ(T 1 ). It is straightforward to show this result for all bipartite thermal states (not just those for two-qubit systems). For T 1 < T 2 , β 1 > β 2 . Therefore, for ∆E ≥ (≤) 0, we have e −β2∆E ≥ (≤) e −β1∆E . Taking the energy eigenvalues E i to be sorted into nondescending order, we have Multiplying gives Hence which is the result claimed. Now, for density operators ρ 1 and ρ 2 such that the eigenvalues for ρ 2 are majorized by those for ρ 1 , we have [15] where the unitaries U j permute the eigenstates [18]. For the specific case where the Hamiltonian is diagonal in the Bell basis, the eigenstates are just the Bell basis states. In this case, if the state ρ 1 is separable, then all states U † j ρ 1 U j obtained by permuting the eigenstates are also separable. To show this, we first note that it is not necessary to preserve phase when permuting the eigenstates, because any phase cancels out in the density matrix. In order to permute the eigenstates (without regard for phase), it is sufficient to show that it is possible to perform three swaps between eigenstates. All permutations may be constructed from these three swaps. We may obtain three swaps between Bell basis pairs using local unitaries as follows: where H = (X+Z)/ √ 2 is the Hadamard operation. Thus we find that it is possible to perform any permutation of the Bell basis using local operations, so if ρ 1 is separable, each of the states U † j ρ 1 U j is separable. Hence the state ρ 2 must be separable.
Thus, for Hamiltonians that are diagonal in the Bell basis, the eigenvalues of ρ(T 2 ) for T 2 > T 1 are majorized by those for ρ(T 1 ), so if ρ(T 1 ) is separable, then so is ρ(T 2 ). Thus we can not have a situation where the thermal entanglement increases with temperature. As we may simplify any two-qubit Hamiltonian without local terms to a form which is diagonal in the Bell basis, this result holds for all two-qubit Hamiltonians without local terms.

VII. CONCLUSIONS
We have presented a class of Hamiltonians for which almost all examples have a value of the magnetic field such that the thermal state has two distinct entangled regions. One example of this class previously appeared as a figure in an online paper [7], but this aspect of the results was not discussed explicitly. This result is somewhat surprising as one may have expected that the small Hilbert space for two qubits would mean that only one entangled region were possible.
There are, however, particular cases from this class where distinct regions do not occur, for example the isotropic XY interaction with a transverse magnetic field [11]. However, we find that if the interaction is perturbed only slightly by making it anisotropic or misaligning the magnetic field, distinct regions do occur. This suggests that those cases where the distinct regions do not occur are a set of measure zero in this class.
It is also possible for there to be two entangled regions when the ground state is separable. In contrast to the case where there are two regions and an entangled ground state, this behavior is extremely rare. It was necessary to test millions of Hamiltonians before an example of this form was found.
We have also shown that certain features of the examples are necessary in order to observe the distinct entangled regions. We proved that for Hamiltonians without local terms (i.e. no magnetic field) the entanglement must necessarily decrease with increasing temperature, so only one entangled region is possible (at low temperatures).
For general two-qubit Hamiltonians we showed, by considering zeros of the determinant of the partial transpose of the thermal density matrix, that there can be no more than 17 entangled regions. Thus arbitrarily many transitions from entanglement to separability are not possible for two qubits (or a qubit and a qutrit).