Phase transitions and phase diagrams have been a central area of study in condensed matter physics for well over a century. In particular, in the second half of the twentieth century, interest in superconductors and topological phases spurred work on quantum phase transitions: a discontinuous change of a macroscopic observable happening at zero temperature due to the change in some non-thermal parameter1.

The phase diagrams for many materials have been well studied both experimentally and theoretically. There exist numerous algorithms that are heuristically effective at computing properties of many-body quantum systems, such as the Density Matrix Renormalisation Group for one-dimensional (1D) gapped systems or density functional theory2,3. Classic toy models include the 1D transverse field Ising Model, which is known to have a transition from an unordered to ordered phase at a critical magnetic field strength1. Beyond that, materials with exotic phases, such as topological insulators, or the fractional quantum Hall effect are becoming increasingly important to understand as they become more applicable to real-world applications4,5.

Yet, the quantum phase diagram for such systems can be highly complex. Numerical simulations of quantum systems are computationally difficult, and may even be intractable6,7. Experimentally and computationally one of the best studied is the 2D electron gas—a model for free electrons in semiconductors—which is well known to exhibit a complex phase behaviour: the system undergoes a large number of phase transitions, most notably those associated with the quantum Hall effect. Indeed, the phase diagrams of such systems are known to be incredibly rich, with some producing Hoftstadter butterfly patterns with an infinite number of phases8. All of these are important instances of the general problem of computing the phase diagram of a Hamiltonian, which classifies the system’s state with respect to a macroscopic observable (such as global magnetisation), and with respect to a parameter of the Hamiltonian (such as a transverse field strength).

Quantum phase transitions are associated with the spectral gap of the Hamiltonian closing. More precisely, a non-analytic change in the ground state energy is a necessary (although not always sufficient) condition for a phase transition to occur, and a closing spectral gap is necessary (although not always sufficient) for a non-analytic change in the ground state energy to occur. Cubitt, Perez-Garcia and Wolf9,10 showed that given a (finite) description of a translationally invariant, nearest-neighbour Hamiltonian on a 2D square lattice, deciding whether it has a spectral gap or not is at least as hard as solving the Halting Problem. This was subsequently extended to the case of 1D Hamiltonians11.

In this work, we prove that no general algorithm for determining the phase diagram of a system can exist, even given complete knowledge of the microscopic description of the system’s interactions. To show this, we explicitly construct a continuous, one-parameter Hamiltonian H(φ) on 2D lattice with a fixed, finite-dimensional local Hilbert space \({{\mathcal{H}}}_{\mathrm{A}}\oplus {{\mathcal{H}}}_{\mathrm{B}}\), for which determining whether the low energy subspace below some energy cut-off is supported entirely on the A or B subspace is undecidable (where it is guaranteed that one of the two cases holds on a set of positive measure in the parameter space of the model). With respect to the parameter φ, the phase diagram determined with respect to a macroscopic observable OA/B that measures support on \({{\mathcal{H}}}_{\mathrm{A}}\) vs. \({{\mathcal{H}}}_{\mathrm{B}}\) is thus uncomputable. This observable can also be restricted to a single lattice site, with the same conclusion.


The quantum many-body systems we will consider are translationally invariant, nearest-neighbour, 2D spin–lattice models. The L × L square lattice with open boundary conditions will be denoted as Λ(L); for brevity, we leave the lattice size implicit whenever it is clear from the context. Each lattice site is associated with a spin system with local Hilbert space of dimension d, \({{\Bbb{C}}}^{d}\). The spins are coupled with a nearest-neighbour, translationally invariant Hamiltonian with local terms \(h^{\mathrm{col}},h^{\mathrm{row}}\in {\mathcal{B}}({{\Bbb{C}}}^{d}\otimes {{\Bbb{C}}}^{d})\), such that \(\max \{| | h^{\mathrm{row}}| | ,| | h^{\mathrm{col}}| | \}\le 2\). Since we are interested in phase transitions—identified by a discontinuous change of a macroscopic observable OA/B, which strictly speaking can only occur in the thermodynamic limit of infinitely large lattices—we will take the thermodynamic limit by letting L → . An alternative definition of a quantum phase transition is a non-analytic change in the ground state energy1. This will also be satisfied with our construction. The resulting Hamiltonian over the entire lattice is then

$$H^{{{\Lambda }}(L)}:= \mathop{\sum }\limits_{i = 1}^{L}\mathop{\sum }\limits_{j = 1}^{L-1}h^{{\mathrm{row}}}_{(i,j),(i+1,j)}+\mathop{\sum }\limits_{i = 1}^{L-1}\mathop{\sum }\limits_{j = 1}^{L}h^{{\mathrm{col}}}_{(i,j),(i,j+1)}.$$

As well as being distinguished by the observable OA/B, the two phases are also distinguished by the spectral gap of the Hamiltonian HΛ, defined as the difference between the smallest and second smallest eigenvalue of the Hamiltonian:

$${{\Delta }}(H^{{{\Lambda }}(L)}):= {\lambda }_{1}(H^{{{\Lambda }}(L)})-\lambda_{{\mathrm{min}}} (H^{{{\Lambda }}(L)}).$$

As in ref. 9, we then define a Hamiltonian to be gapped if there exist γ and L0 such that the spectral gap Δ(HΛ(L)) ≥ γ for all L > L0; and gapless if the spectrum above the ground state becomes dense in an interval \([\lambda_{\mathrm{min}} (H^{{{\Lambda }}(L)}),\lambda_{\mathrm{min}} (H^{{{\Lambda }}(L)})+c]\) for some c > 0 in the thermodynamic limit (see Supplementary Definitions 1.1 and 1.2 for mathematically rigorous statements). Throughout the paper, we will be using the notion of a continuous family of Hamiltonians, which—loosely speaking—is a family of Hamiltonians \({\{{H}_{i}(\varphi )\}}_{i\in I}\) such that each Hi(φ) = ∑jhj(φ), and the matrix elements of hj(φ) depend continuously on φ (see Supplementary Definition 1.3).

Our main result is an explicit construction of a one-parameter continuous family of Hamiltonians, such that for all values \(\varphi \in {\Bbb{R}}\) of the external parameter, the system is guaranteed to be in one of two possible phases, distinguished by an order parameter given by the ground state expectation value of a translationally invariant macroscopic observable OA/B. However, determining which phase the system is in is undecidable, hence the phase diagram of the system as a function of φ is uncomputable. More precisely, we prove the following theorem:

Theorem 2.1 (Phase Diagram Uncomputability) For any given Turing Machine (TM), we can construct explicitly a dimension \(d\in {\Bbb{N}}\), d2 × d2 matrices \(a,a^{\prime} ,b,c,c^{\prime}\) and a d × d matrix m with the following properties:

  1. (i)

    a, c and m are diagonal with entries in \({\Bbb{Z}}\).

  2. (ii)

    \(a^{\prime}\) is Hermitian with entries in \({\Bbb{Z}}+\frac{1}{\sqrt{2}}{\Bbb{Z}}\).

  3. (iii)

    b has integer entries.

  4. (iv)

    \(c^{\prime}\) is Hermitian with entries in \({\Bbb{Z}}\).

  5. (v)

    For any real number \(\varphi \in {\Bbb{R}}\) and any 0 ≤ β ≤ 1, which can be chosen arbitrarily small, setting

    $$\begin{array}{lll}\;\;\;\; \;\;\; h^{\mathrm{col}} := c+\beta c^{\prime} \quad \quad independent\,of\,\varphi ,\\ h^{\mathrm{row}}(\varphi ) := a+\beta \left(a^{\prime} +{{e}}^{i\pi \varphi }b+{{e}}^{-i\pi \varphi }{b}^{\dagger }\right),\end{array}$$

    we have hrow(φ) ≤ 2, hcol(φ) ≤ 1.

Define HΛ(L) as in Eq. (1), and let OA/BL−2i Λmi. Then, given φ [2η, 2η + 2η) with \(\eta \in {\Bbb{N}}\), the following statements hold:

  • If TM halts on input η, then for some  ≥ 1, HΛ(φ) is gapless in the sense of Supplementary Definition 1.2, with a ground state that is critical (i.e. with algebraic decay of correlations), and for all eigenstates \(\left|{{{\Psi }}}_{\mathrm{B}}\right\rangle\) with energy \(\left\langle {{{\Psi }}}_{\mathrm{B}}\right|H^{{{\Lambda }}}(\varphi )\left|{{{\Psi }}}_{\mathrm{B}}\right\rangle \le 1\) it holds that \(\left\langle {{{\Psi }}}_{\mathrm{B}}\right|{O}_{\mathrm{A/B}}\left|{{{\Psi }}}_{\mathrm{B}}\right\rangle =0\).

  • If TM is non-halting on input η and  = 1, then HΛ(φ) is gapped in the sense of Supplementary Definition 1.1, with a unique, product ground state \(\left|{{{\Psi }}}_{\mathrm{A}}\right\rangle\) with \(\left\langle {{{\Psi }}}_{\mathrm{A}}\right|{O}_{\mathrm{A/B}}\left|{{{\Psi }}}_{\mathrm{A}}\right\rangle =1\).

The undecidability of which of the two cases pertains follows immediately from the undecidability of the Halting Problem, by choosing TM to be a universal TM. For simplicity, we will refer to the phases A and B determined by the value for the macroscopic observable OA/B as the gapped and gapless phase, respectively.

As a consequence of the new Hamiltonian construction in this paper, we also obtain the following result:

Corollary 2.2 For all φ [0, 1], HΛ(φ) is either in a phase with a product ground state and a spectral gap ≥1, or it is in a gapless phase with algebraic decay of correlations, where the two phases are distinguished by the expectation value of a macroscopic observable OA/B. Moreover, there exists a subset S [0, 1] with Borel measure μ(S) > 0, such that even for computable φS, determining the phase that HΛ(φ) is in is uncomputable.

A less precise but simple interpretation of the above corollary is:

Corollary 2.3 (informal) The phase diagram of HΛ(φ) as a function of its parameter φ is uncomputable.

A set of schematic phase diagrams is shown in Fig. 1.

Fig. 1: A selection of sample phase diagrams of the continuous family {HΛ(L)(φ)}L,φ written for a series of possible universal encoded Turing machines varying from top to bottom, plotted against φ on the x-axis (note the log scaling).
figure 1

Blue means gapless (which is where the TM halts asymptotically on input φ) and yellow gapped (TM runs forever). At the points 2η for \(\eta \in {\Bbb{N}}\), we can have a phase transition between gapped and gapless phases, depending on the behaviour of the encoded TM; there is a positive measure interval above these points where the phase behaviour is consistent. The grey sections are parameter ranges that we do not evaluate explicitly; there will be a phase transition at some point within that region if the bounding intervals have different phases. The lighter yellow area indicates a changing gapped instance. In our construction, the gapless behaviour is more intricately dependent on φ, but the TM can be chosen such that both halting and non-halting phases cover an order one area of the phase diagram.

Constructing the Hamiltonian

Using well-known methods from the field of Hamiltonian complexity, it is possible to construct a quantum many-body system whose lowest-energy eigenstate represents the evolution of any desired computation12. If we introduce a local term in the Hamiltonian that gives additional energy to any state with overlap with the halting state of the computation, we can arrange for states representing computations that halt to pick up additional energy relative to states representing computations that do not halt and open up a gap in the spectrum. In this way, Turing’s well-known Halting Problem can be transcribed into a property of the quantum many-body system, namely whether or not it has a spectral gap. Thus, determining whether the system has a spectral gap is at least as hard as the Halting Problem. Since the Halting Problem is known to be undecidable, determining whether the Hamiltonian is gapped or gapless is also undecidable. Conceptually, this is how Cubitt, Perez-Garcia & Wolf, and Bausch et al.9,10,11 proved the undecidability of the spectral gap.

The starting point for our construction is also the undecidability of the Halting Problem13: in brief, this states that determining whether a universal (classical) TM (UTM) halts or not on a given input is, in general, undecidable. In the quantum computation setting, Cubitt, Perez-Garcia and Wolf9 showed how an input can be extracted from a phase in a quantum gate such as \(U={\rm{diag}}(1,\exp (2\pi i\varphi ))\), using quantum phase estimation (QPE, ref. 14), which outputs a binary expansion of φ. The latter can then be fed as input to a UTM. Thus, this combination of QPE and UTM runs the UTM on any desired input encoded in φ, and the Halting Problem for this combination is undecidable.

How do we reduce this QTM-based Halting Problem to a result about phases in a many-body system? This is a culmination of the following techniques from previous works. However, for each one of them, significant obstacles must be overcome to prove the uncomputability of phase diagrams .

  1. 1.

    The first necessary ingredient is a QTM-to-Hamiltonian mapping, which allows the construction of local, translationally invariant couplings that result in a 1D spin chain Hamiltonian whose ground state energy is exactly zero if the encoded QTM does halts within a certain time interval; or otherwise is positive15. Using such an QTM-to-Hamiltonian mapping, a QTM running the QPE + UTM computation described above is encoded into the spin chain Hamiltonian, with φ now appearing as a parameter of the resulting Hamiltonian. However, the energy difference between the halting and non-halting cases decreases as the time interval increases, meaning we need further techniques to obtain a non-zero energy difference in the thermodynamic limit.

  2. 2.

    A second ingredient is amplifying this penalty. In ref. 9 this is done by combining the QTM-to-Hamiltonian mapping with an aperiodic tiling Hamiltonian, thereby ensuring that, for each length of a computation, a fixed density of such circuit-to-Hamiltonian instances are distributed across the spin lattice. In this way, the ground state energy density is zero iff the QTM-to-Hamiltonian mapping always has zero energy, and thus depends on whether the QPE + UTM computation ever halts.

  3. 3.

    In ref. 11, point 2 is replaced by a so-called Marker Hamiltonian. This in combination with a circuit-to-Hamiltonian construction results in a ground state, which partitions the spin chain into segments just large enough for the UTM to halt, if it halts. Here, the segments do not have a fixed length, but instead self-adjust to find their own length. In contrast to ref. 9, this has the effect that either all encoded instances of computations halt, or none do.

  4. 4.

    The final step is the addition of an Ising-type coupling as in refs. 9,16, which breaks the local Hilbert space up into subspaces \({{\mathcal{H}}}_{\mathrm{A}}\oplus {{\mathcal{H}}}_{\mathrm{B}}\), and which ensures that the low-energy spectrum is contained either entirely in the A or B subspace, depending on the ground state energy density just constructed. Since determining the ground state energy density is uncomputable, it is also uncomputable to determine whether the system is in phase A or B with respect to the Hamiltonian parameter φ.

As mentioned, we require significant alterations to this collection of ingredients. Concretely, the issue is that if we encode an input φ to be extracted using error-free QPE, then we require the circuit gates to depend explicitly on the binary length of φ, denoted φ. Consequently, the resulting matrix elements of the Hamiltonian will also explicitly depend on φ—a discontinuous function of φ. To remove this dependence, we instead perform the QPE procedure approximately, by using a universal gate set that approximates all the gates depending on φ17. However, the constructions of Cubitt, Perez-Garcia & Wolf, and Bausch et al.9,11 crucially rely on the QPE expansion of φ to be performed exactly; any errors destroy the constructions.

To overcome this obstacle, we first encode this approximate QPE plus the evolution of a UTM in a QTM-to-Hamiltonian mapping, which has positive energy iff the QPE + UTM computation does not halt. We label the resulting Hamiltonian Hcomp. This is outlined in sections ‘Encoding computation in Hamiltonians’, ‘The encoded computation’ and ‘From QTM to Hamiltonian’ where the QTM-to-Hamiltonian mapping and the computation it encodes are explained, respectively. A significant novel technical contribution of this work is then a proof that the Marker Hamiltonian used in ref. 11 does, in fact, allow for some leeway in the precision to which QPE is performed and can be used to provide a correction for the energy penalty picked up as a result of any errors in the QPE.

To generate the required energy correction, we consider a 2D spin lattice and construct an underlying classical Hamiltonian, which we denote Hcb, that partitions the lattice into a uniform grid of squares. We note that the method from ref. 9 would be inappropriate for this construction as it would lead to an accumulation of energies we cannot correct for without matrix elements depending explicitly on φ. Within each square, the ground state encodes the evolution of a classical TM (encoded as a tiling problem akin to the ones used in refs. 18,19), which will calculate the energy correction necessary to offset the error introduced by approximately performing QPE. The classical Hamiltonian is then coupled to the Marker Hamiltonian. We denote this combination H().

Section ‘Classical tiling with quantum overlay’ describes the ground state of the resulting Hamiltonian H() such that the halting or non-halting behaviour together with the Marker Hamiltonian determines whether the energy density of the constructed Hamiltonian is non-negative (in the non-halting case) or negative (in the halting case). Crucially, it is now robust with respect to the errors present in the expansion of φ from the approximate QPE procedure. Finally, in section ‘Uncomputability of the Phase Diagram’, we show how Hcomp, Hcb and H() are combined mathematically to lift this undecidability of the ground state energy density, to uncomputability of the phase diagram, using now-standard techniques9,11,16. For a mathematically rigorous derivation, we refer the reader to the Supplementary information.

Encoding computation in Hamiltonians

A QTM can be thought of as a classical TM, but where the TM head and tape configuration can be in a superposition of states. The updates to the QTM and tape configuration are then described by a transition unitary, U, describing the transitions of the QTM state and tape, such that the state is updated via the map \(\left|\psi\,\right\rangle \,\mapsto\,U\left|\psi \right\rangle\)20.

Given a QTM, one can construct a local Hamiltonian that has a ground state encoding the evolution of the computation9,15, closely related to the Feynman–Kitaev Hamiltonian encoding quantum circuits into Hamiltonians12,21. The ground state encodes T steps of the computation, where T is a predefined and fixed function of the Hamiltonian’s size determined by the particular QTM-to-Hamiltonian mapping. The ground state of such a Hamiltonian is called a history state and takes the form

$$\left|{{\Psi }}\right\rangle =\frac{1}{\sqrt{T}}\mathop{\sum }\limits_{t = 1}^{T}\left|t\right\rangle \left|{\psi }_{t}\right\rangle ,$$

where the state of the quantum TM at time step t is \(\left|{\psi }_{t}\right\rangle\). The ground state energy of the Hamiltonian can be made dependent on aspects of the computation by adding a projector that penalises certain computational states, and the resulting energy is known to high precision22,23.

The encoded computation

As in refs. 9,11, the computation we wish to encode via such a QTM-to-Hamiltonian mapping will be a pair of QTMs running in succession: the first will run QPE on a quantum gate Uφ, which outputs a number in binary, and the second will be a UTM, which takes the output of the QPE as input. The gate Uφ is encoded in the transition unitary U describing the QTM, which is in turn encoded in the matrix elements of the Hamiltonian. The energy of the Hamiltonian encoding the computation will then be made dependent on whether the computation halts or not, allowing us to relate its ground state energy to the halting property.

Phase estimation

Given a unitary matrix \({U}_{\varphi }=\left(\begin{array}{cc}1&0\\ 0&{{e}}^{i\pi \varphi }\end{array}\right)\), the QPE algorithm takes as input the eigenvector corresponding to the eigenvalue eiπφ, and outputs an estimate of φ in binary. If the number of qubits on which the phase estimation is performed is smaller than the number of bits required to express φ in full, the algorithm is only approximate14. Furthermore, if a finite gate set is used, some of the required unitary gates in the algorithm must be approximated rather than performed exactly17. Hence, from phase estimation, we get an output state consisting of a superposition over binary strings:

$$\left|\chi (\varphi )\right\rangle =\mathop{\sum}\limits_{x\in {\{0,1\}}^{n}}\,\,{\beta }_{x}\left|x\right\rangle ,$$

where the amplitudes βx are concentrated around those values for which x ≈ φ and rapidly drop off away from φ. Details are in Supplementary Note 2.

Universal QTM

We then feed the output \(\left|\chi (\varphi )\right\rangle\) of this phase estimation into the input of a universal TM, as in ref. 9, which then runs a computation that may or may not halt. By the well-known undecidability of the Halting Problem13, determining whether the QTM halts for a given string is undecidable.

From QTM to Hamiltonian

Using the QTM-to-Hamiltonian mapping described in section ‘Encoding computation in Hamiltonians’, the computation outlined above is mapped to a 1D, translationally invariant, nearest-neighbour Hamiltonian Hcomp(φ)15, with a penalty for the non-halting case. It can be shown that the ground state energy of Hcomp(φ) scales as

$$\lambda_{\mathrm{min}} (H_{\mathrm{comp}}(\varphi )) \sim \epsilon (L)/{\mathrm{poly}}\,L,$$


$$\epsilon (L)=\mathop{\sum}\limits_{x\in S(L)}| {\beta }_{x}{| }^{2}.$$

The βx are the QPE coefficients in Eq. (4), and S(L) is the set of inputs for which the universal TM does not halt within time T(L).

Since the βx are concentrated around the binary expansion of φ, if the latter encodes a halting instance, there will be a length L0 for which ϵ(L) ≈ 0 for all L > L0; otherwise, ϵ(L) ≈ 1 for all L. This immediately yields a Hamiltonian for which the ground state energy is halting-dependent (and hence uncomputable). We refer the reader to Supplementary Note 3 for details.

Tiling and classical computation

In Eq. (5), we see that the difference between the Hamiltonian’s ground state energy in the case where ϵ(L) from Eq. (6) is ~1 or 0 decreases with the system size L. Thus, the energy gap between the two cases goes to zero irrespective of whether φ encodes a halting or non-halting instance. To amplify this gap so that there is a finite energy gap in the thermodynamic limit (as per points 2 and 3), we will combine the Feynman–Kitaev Hamiltonian with a classical Hamiltonian based on a Wang tiling that partitions the space suitably to ensure a fixed density of computation instances is spawned across the lattice. The result we achieve with this is an energy gap opening up as L grows between the cases where ϵ takes different values.

A set of Wang tiles—square, 2D tiles with coloured sides, with the rule that adjacent sides of neighbouring tiles in a tiling of the plane must have matching colours—can be mapped to a classical Hamiltonian: if tiles ti, tj cannot be placed next to each other, then we introduce a term \(\left|{t}_{i}\right\rangle \langle {t}_{j}|\) into the Hamiltonian. The overall Hamiltonian is the sum over all such local terms, such that its ground state represents a tiling satisfying the tiling rules (if such a tiling exists). If no such tiling exists, the ground state energy is ≥1.

Similarly, it is well known that there exist tile sets that encode the evolution of a classical TM18,19 within a square grid: TM tape configurations are represented by rows, such that adjacent rows represent successive time steps of the TM (Fig. 2).

Fig. 2: The evolution of a classical TM can be represented by Wang tiles, where colours of adjacent tiles have to match, and arrowheads have to meet arrow tails of the appropriate kind.
figure 2

Here, the evolution runs from the bottom of the square to the top, where it places a marker • on the boundary as explained in section ‘Classical tiling with quantum overlay’. In this image, the TM’s evolution is contained in an individual square in the checkerboard grid shown in the figure below.

We combine both Wang tiles and the TM tiling ideas by constructing a tile set whose valid tilings have the following properties:

  1. 1.

    A tiling pattern that creates a square grid across the lattice Λ (much like a checkerboard). The side length of the grid squares can be varied (provided all grid squares are the same size) and still correspond to a valid tiling (depicted in Fig. 3).

  2. 2.

    Within each square of the grid, we use the tiles to encode a TM that first counts the size of the square it is contained in, and then outputs a marker • on the top border of the square, where the placement of this marker is a function of the size of the square (depicted in Fig. 2).

Fig. 3: Section of the checkerboard tiling Hamiltonian’s ground state.
figure 3

The white squares form borders, and in the interior, we place tiles simulating the evolution of a classical Turing Machine.

Having developed this tiling, we map it to a corresponding tiling Hamiltonian, which we denote Hcb, such that its ground states retain the properties of the valid tilings listed above. The reader is referred to Supplementary Note 4 for details.

Classical tiling with a quantum overlay

We now want to combine the classical Hamiltonian encoding the Wang tiles, and the quantum Hamiltonian encoding the Halting Problem computation, to create an overall Hamiltonian that has a large ground state energy difference between the halting and non-halting cases, without the ~1/poly(L) decay in Eq. (5). To do so, we split the local Hilbert space of each lattice spin into a classical part \({{\mathcal{H}}}_{{\rm{c}}}\) and a quantum part \({{\mathcal{H}}}_{{\rm{e}}}\oplus {{\mathcal{H}}}_{{\rm{q}}}\) giving \({\mathcal{H}}={{\mathcal{H}}}_{{\rm{c}}}\otimes ({{\mathcal{H}}}_{{\rm{e}}}\oplus {{\mathcal{H}}}_{{\rm{q}}})\), where \({{\mathcal{H}}}_{{\rm{e}}}=\{\left|e\right\rangle \}\) just contains a filler state \({\left|e\right\rangle }_{{\rm{e}}}\). The ground state can then be designed to be a product state of the form \({\left|C\right\rangle }_{{\rm{c}}}\otimes {\left|{\psi }_{0}\right\rangle }_{{\rm{eq}}}\), where \({\left|C\right\rangle }_{{\rm{c}}}\) is a valid classical tiling configuration—as described in section ‘Tiling and classical computation’—and \({\left|{\psi }_{0}\right\rangle }_{{\rm{eq}}}\) is a quantum state with the following properties:

  1. 1.

    We use the 1D Marker Hamiltonian from ref. 11, and couple its negative energy contribution to the size of each grid square in the classical tiling and the placement of the • marker. The negative energy each square contributes is a determined by where the • marker is placed, and thus by the action of the classical TM. We denote this combined Hamiltonian H().

  2. 2.

    We effectively place the ground state of a Hamiltonian Hcomp encoding the QPE plus universal TM along the top edge of the square, by adding additional penalty terms to the Hamiltonian that penalise the classical and quantum layers to occur in this configuration elsewhere.

  3. 3.

    Everywhere not along the horizontal edge of a grid square in \({{\mathcal{H}}}_{{\rm{c}}}\) is in the zero-energy \({\left|e\right\rangle }_{{\rm{e}}}\) filler state in \({{\mathcal{H}}}_{{\rm{e}}}\oplus {{\mathcal{H}}}_{{\rm{q}}}\).

As mentioned, the patterns in the degenerate ground space of Hcb are checkerboard grids of squares with periodicity w × w, where the integer square size w is not fixed.

By choosing the classical TM encoded in the tiling to place a • marker at an appropriate point, we are able to tune the ground state energy of H() such that the total energy of a single w × w square A in the checkerboard pattern is:

$$\begin{array}{ll}{\!\!\!\!}{\!\!\!\!}\lambda_{\mathrm{min}} (w):= \lambda_{\mathrm{min}} \left({\left.H^{( \boxplus )}\right|}_{\mathrm{A}}+{\left.H_{{\mathrm{comp}}}\right|}_{\mathrm{A}}\right)\qquad\qquad\;\, \\ \qquad\qquad\left\{\begin{array}{ll}\ge 0\,&{\mathrm{if}}\;\epsilon (w) \, \ge \, {\epsilon }_{0}(w)\,\forall w,\\ <0\,&{\mathrm{if}}\;\epsilon (w)\,<\,{\epsilon }_{0}(w)\,\forall w \, \ge \, {w}_{0},\end{array}\right.\end{array}$$

where ϵ0(w) is some cut-off point, w0 is the halting length (recall from the previous section that the runtime of the computation encoded in the ground state depends on the size of the available tape, i.e. the size of the checkerboard square edge that the TM runs on), and where \(\lambda_{\mathrm{min}} ({w}_{0})=-\delta ({w}_{0})\,<\,0\) for the halting length w0 is a small negative constant.

The Marker Hamiltonian’s energy bonus thus compensates for the QPE approximation errors by lowering the energy by just enough such that a halting instance has negative energy. On the other hand, the energy of the non-halting instance remains large enough that the energy of a single square remains positive11,23.

Thus, provided ϵ(w) is sufficiently small, the ground state of Hcb + Hcomp + H()(+coupling terms) is a checkerboard grid of squares with a constant but negative energy density. Otherwise, the ground state energy density of the lattice is lower bounded by zero. Which of the two cases holds depends on determining whether ϵ(w) ≥ ϵ0(w) or <ϵ0(w), which is undecidable; undecidability of the ground state energy density follows. The reader is referred to Supplementary Note 5 for more details.

We define the Hamiltonian formed by Hcb, Hcomp and H() and the coupling terms as Hu(φ). Assume φ encodes a halting instance and set \(w={\mathrm{argmin}}_{s}\{\lambda_{\mathrm{min}} (s)\,<\,0\}\), and A is a single square of size w × w. Then, the ground state energy Hu(φ) on a grid Λ of size L × H is given by

$$\lambda_{\mathrm{min}} ({H}_{u}(\varphi ))=\left\lfloor \frac{L}{w}\right\rfloor \left\lfloor \frac{H}{w}\right\rfloor \lambda_{\mathrm{min}} ({H}_{u}(\varphi ){| }_{\mathrm{A}}).$$

Uncomputability of the phase diagram

To go from undecidability of the ground state energy density, demonstrated at the end of section ‘Classical tiling with quantum overlay’ to the undecidability of the phase (and spectral gap), we follow the approach of Cubitt, Perez-Garcia and Wolf9 by combining Hu(φ) with a trivial state \(\left|0\right\rangle\) such that \({\left|0\right\rangle }^{\otimes {{\Lambda }}}\) has zero energy, and the spectrum of Hu(φ) is shifted up by +1 (Supplementary Lemma 6.5). From this shift and Eq. (8) it can be shown that

$$\lambda_{\mathrm{min}} ({H}_{u}(\varphi ))\left\{\begin{array}{ll}\ge 1&{\mathrm{in}}\;{\mathrm{the}}\;{\mathrm{non}}{\hbox{-}}{\mathrm{halting}}\;{\mathrm{case}},\;{\mathrm{and}}\,\\ \longrightarrow -\infty &{\mathrm{otherwise}}.\end{array}\right.$$

Let hu(φ) denote the local terms of Hu(φ), let hd be the local terms of the critical XY model, and let \(\left|0\right\rangle\) be a zero energy state, such that the total Hilbert space is \(({{\mathcal{H}}}_{1}\otimes {{\mathcal{H}}}_{2})\oplus \{\left|0\right\rangle \}\). Then, the local terms of the total Hamiltonian HΛ(φ) are defined as

$$\begin{array}{ll}{h}_{i,i+1}(\varphi ):= \left|0\right\rangle {\left\langle 0\right|}^{(i)}\otimes {({\Bbb{1}}-\left|0\right\rangle \left\langle 0\right|)}^{(i+1)}\\ \qquad\qquad\quad +{({\Bbb{1}}-\left|0\right\rangle \left\langle 0\right|)}^{(i)} \otimes \left|0\right\rangle {\left\langle 0\right|}^{(i+1)}\end{array}$$
$$+\,{h}_{u}^{i,i+1}(\varphi )\otimes {{\Bbb{1}}}_{2}^{(i)}\otimes {{\Bbb{1}}}_{2}^{(i+1)}+{{\Bbb{1}}}_{1}^{(i)}\otimes {{\Bbb{1}}}_{1}^{(i+1)}\otimes {h}_{d}^{i,i+1}.$$

The result is the following: the overall spectrum of the Hamiltonian is

$${\mathrm{spec}}\,(H^{{{\Lambda }}}(\varphi ))=\{0\}\cup ({\mathrm{spec}}\,({H}_{u}(\varphi ))+{\mathrm{spec}}\,({H}_{d}))\cup G,$$

where G [1, ). To understand this, we consider the two cases. If a non-halting instance is encoded \(\lambda_{\mathrm{min}} \, \ge \, 0\) in Eq. (7), then Hu(φ)—from Eq. (9)—has ground state energy lower-bounded by 1; the ground state of the overall Hamiltonian is the trivial zero energy classical product state \({\left|0\right\rangle }^{\otimes {{\Lambda }}}\), and HΛ has a constant spectral gap. If \(\lambda_{\mathrm{min}} \, < \, -{\!}| \delta |\), then Hu(φ) has a ground state with energy diverging to −. We further note that the critical XY model has a dense spectrum with zero ground state energy, hence from the Hd term we obtain a dense spectrum above the ground state24. As a result, the Hamiltonian becomes gapless and has a highly entangled ground state with algebraically decaying correlations.

Since the existence of a halting length w0 in Eq. (7) is undecidable, discriminating between \(\lambda_{\mathrm{min}} \, \ge \, 0\) or <−δ is also undecidable. This implies determining whether the Hamiltonian is in the critical, quantum-correlated phase or the trivial product state gapped phase is undecidable as well.

As HΛ(φ) is a continuous function of φ, there exist finite measure regions for which all values of φ have the same ground state and for which there is no closing of the spectral gap, which delineates the two phases. Setting \({{{\Pi }}}_{i}:= \left|0\right\rangle {\left\langle 0\right|}^{(i)}\), the observable OA/B = L−2iΛΠi has expectation value 1 when in the state \({\left|0\right\rangle }^{\otimes {{\Lambda }}(L)}\), and 0 in the other case. This is true even if the observable is restricted to a finite geometrically local subset of the lattice. We refer the reader to Supplementary Note 6 for more details.


Our result proves the undecidability of the phase and spectral gap for a continuous, one-parameter family of Hamiltonians on a two-dimensional lattice. An immediate consequence is that there is no algorithm that can compute a Hamiltonian’s phase diagram in general, even given a complete description of its microscopic interactions.

Qualitatively, this brings the results close to classic condensed matter models, for example, the transverse Ising model described by the Hamiltonian \({H}_{{\rm{TIM}}}={\sum }_{\langle i,j\rangle }{\sigma }_{z}^{(i)}{\sigma }_{z}^{(j)}+\varphi {\sum }_{i}{\sigma }_{x}^{(i)}\). Here, the real parameter φ determines the strength of an external magnetic field. Its phase diagram comprises an ordered and a disordered phase, with an order parameter given by the macroscopic observable \({O}_{{\rm{TIM}}}=\frac{1}{N}\mathop{\sum }\nolimits_{j = 1}^{N}{\sigma }_{z}^{(j)}\) corresponding to the global magnetisation per spin. In the ordered phase, the ground state expectation value \(| \langle {O}_{{\rm{TIM}}}\rangle | =1\). In the disordered phase, the ground state expectation value is 0. Both these phases have a non-zero spectral gap in the thermodynamic limit. At the critical point φ = 1 between the two phases, the system is gapless and exhibits criticality.

As mentioned previously, we can take as the order parameter the macroscopic observable \({O}_{\mathrm{A/B}}=\frac{1}{N}{\sum }_{j}{{{\Pi }}}_{\mathrm{A}}^{(j)}\), where \({{{\Pi }}}_{\mathrm{A}}^{(j)}\) is a projector onto the local Hilbert space \({{\mathcal{H}}}_{\mathrm{A}}\) on lattice site j. This definition yields a familiar picture: for those φ such that H(φ) is in the A phase, we prove that the ground space is non-degenerate with 〈OA/B〉 = 1. In the B phase, all ground states have an expectation value 〈OA/B〉 = 0 with respect to this observable. Thus, phases A and B are distinguished by an order parameter given by a macroscopic observable OA/B, and the system undergoes a (first-order) phase transition between these as φ varies.

However, unlike the Ising model, in our case, one phase (phase A, say) is gapped, but the other (phase B) is a gapless phase. This gapped vs. gapless phase transition has further phenomenological consequences. For instance, a transition between A and B implies a transition from exponential decay of correlations to long-range correlations with algebraic decay of correlation functions. In fact, something stronger holds in our case: in the gapped phase, the ground state is a product state and all connected correlation functions are strictly zero.

If we define a phase diagram of a k-parameter Hamiltonian as a normalised parameter space [0, 1]k, which maps out the different phases as a function of the parameters at each point p [0, 1]k, then previous undecidability results9,11 do not imply uncomputablity of phase diagrams, for multiple reasons. There, as here, the matrix elements of the local interactions of the Hamiltonian H(φ) depend on an external parameter φ, which determines the gappedness of the Hamiltonian. However, importantly, in the previous constructions, the matrix elements also depend on the binary length of φ, denoted φ, which is a discontinuous function of φ. A consequence of this, it is not possible to define a meaningful phase diagram for these Hamiltonians over the required parameter range. This significantly limits the implications one can draw from previous spectral gap undecidability results, in particular for quantum phase diagrams, which are one of the main reasons for caring about spectral gaps in the first place.

Although the construction developed herein proves undecidability between phases defined by OA/B, the result can be extended to more general phase diagrams by a small modification to the construction. If we modify the Hamiltonian by introducing two terms h¬X and hX, which are Hamiltonians that, respectively, have and do not have the ground state property X in the thermodynamic limit (specifically, in Eq. (10) defining the Hamiltonian, we replace \(\left|0\right\rangle \left\langle 0\right|\) and hd with h¬X and hX), then the new overall Hamiltonian will have two phases, one of which has property X and another which does not. Determining which of the two properties holds is undecidable.

Furthermore, the algorithmic uncomputability of the phase diagram problem implies axiomatic independence of the problem25. That is, for any consistent formal system with a recursive set of axioms, there exists a Hamiltonian of the form given in Theorem 2.1 such that determining the phase diagram from the given axioms is not possible.

There are other consequences: a common technique in numerical condensed matter physics to estimate the phase of a physical system is to take the Hamiltonian on an L × L lattice, calculate the phase for this lattice size by some numerical means, and then extrapolate its phase to the thermodynamic limit. This is justified by the assumption that as long as L is sufficiently large, the system already displays the behaviour of the thermodynamic limit. In ref. 10 it was shown that this assumption is not justified in all cases, as the phase may without warning appear completely different at some arbitrarily large and uncomputably system size. Leading to the phenomenon of sized-driven phase transitions explored in ref. 16. Our result further extends this to show that attempting to compute the phase diagram by extrapolating from some finite-size system may not reflect the phase diagram in the thermodynamic limit.

We note, however, that our result only establishes uncomputability for certain highly complex and artificially constructed Hamiltonians. Furthermore, the Hamiltonians constructed by our techniques are necessarily frustrated. For many commonly occurring Hamiltonians—particularly those with small local Hilbert space dimension—determining the phase may well be rigorously decidable. For example, using techniques from refs. 26,27, as done for example in ref. 28, completely solves the case of frustration-free, nearest-neighbour 1D qubit chains.

As aforementioned, previous gap undecidability results9,11 required the explicit inclusion of the binary length of φ, that is, φ, as matrix elements of the form

$${2}^{-2| \varphi | }\quad \quad {\rm{or}}\quad \quad {{e}}^{-i\pi {2}^{-2| \varphi | }}.$$

It is clear that one cannot vary φ along a continuous path between two points φ1 and φ2 while keeping the length of its binary expansion φ fixed at all points along the path. Moreover, varying φ and φ separately breaks the construction. As a result, it is impossible to draw a phase diagram with respect to the parameter φ for the Hamiltonians of refs. 9,11.

Phase transitions are typically defined as points at which there is a non-analyticity in the ground state energy (or some associated order parameter) with respect to continuous changes in φ. If one were to view φ as an explicitly discontinuous function of φ, the ground state may no longer analytically depend on φ even at points where the system is gapped. As such it is unclear if it is even meaningful to define a phase or phase transition for the models presented in refs. 9,11. In addition, Hamiltonians depending discontinuously on a continuously varying parameter are not typically encountered in physics.

The family of Hamiltonians we construct in this work is truly continuous, that is, we define our local terms hrow(φ) for arbitrary \(\varphi \in {\Bbb{R}}\), thus even irrational numbers with infinitely long binary expansions are perfectly fine as instances of our problem set-up. This brings us qualitatively closer to models of Hamiltonians of real systems, where the parameter varied will typically be some physical property, such as an applied magnetic field, which can be varied continuously.

Since Theorem 2.1 shows that for any φ there exists a small finite interval around φ for which the phase of the Hamiltonian is the same, we have a notion of stability of undecidability under perturbations to φ—something that was not the case in previous results. However, it is not clear if there is any stability of the Hamiltonian’s properties with respect to perturbations in arbitrary matrix elements. Stability of undecidability under arbitrary local perturbations to the Hamiltonian remains a challenging but important topic for future research, but one that has yet to be fully resolved even for simple models such as the Ising model. Finally, it important to emphasise that the Hamiltonian constructed here is highly artificial, in the sense that it has an unnaturally large local Hilbert space dimension and highly complex, specifically tailored interactions. While size-driven phase transitions have been discovered in much simpler models16, and recent results in Hamiltonian complexity theory29,30,31,32 show that related complexity-theoretic properties can also occur in far simpler models, it remains an open question whether undecidability occurs in any remotely natural Hamiltonians.

Ongoing research directions both in Hamiltonian complexity and computability focus on reducing the physical dimensionality of the system, reducing the local Hilbert space dimension and choosing physical interactions comparable to those seen in physical systems. A further route of investigation would be to determine how difficult it is to compute phases for systems of finite size, rather than in the thermodynamic limit, for some suitable definition of phase in the finite-size setting.