A broad range of quantum optimization problems can be phrased as the question of whether a specific system has a ground state at zero energy, i.e., whether its Hamiltonian is frustration-free. Frustrationfree Hamiltonians, in turn, play a central role for constructing and understanding new phases of matter in quantum many-body physics. Unfortunately, determining whether this is the case is known to be a complexity-theoretically intractable problem. This makes it highly desirable to search for efficient heuristics and algorithms to, at least, partially answer this question. Here we prove a general criterion-a sufficient condition-under which a local Hamiltonian is guaranteed to be frustration-free by lifting Shearer's theorem from classical probability theory to the quantum world. Remarkably, evaluating this condition proceeds via a fully classical analysis of a hardcore lattice gas at negative fugacity on the Hamiltonian's interaction graph, which, as a statistical mechanics problem, is of interest in its own right. We concretely apply this criterion to local Hamiltonians on various regular lattices, while bringing to bear the tools of spin glass physics that permit us to obtain new bounds on the satisfiable to unsatisfiable transition in random quantum satisfiability. We are then led to natural conjectures for when such bounds will be tight, as well as to a novel notion of universality for these computer science problems. Besides providing concrete algorithms leading to detailed and quantitative insights, this work underscores the power of marrying classical statistical mechanics with quantum computation and complexity theory.quantum satisfiability | local Hamiltonian | hardcore lattice gas | critical exponents | universality A n overwhelming majority of systems of physical interest can be described via local Hamiltonians:[1]Here, the "k-local" operator Π i acts on a k-tuple of the microscopic degrees of freedom, best thought of as qudits for the computer scientists among our readers or spins for the physicists. The M operators define an interaction (hyper)graph G, displayed in Fig. 1. A surprisingly diverse and important class of such model Hamiltonians is defined by the additional property of being "frustrationfree": The ground state jψi of H is a simultaneous ground state of each and every Π i . This class comprises both commuting Hamiltonians-for which ½Π i , Π j = 0 ∀i, j-such as the toric code, general quantum error correcting codes, and Levin-Wen models (1-3), and noncommuting ones, such as the Affleck-Kennedy-Lieb-Tasaki (AKLT) and Rokhsar-Kivelson models (4-6). Their particular usefulness is also related to the fact that many of these examples can be viewed as "local parent Hamiltonians" for generalized matrix product states (7). In general, frustration-free conditions provide analytic control of ground state properties in otherwise largely inaccessible quantum problems.Determining whether a given Hamiltonian H is frustration-free is well known in quantum complexity theory as the quantum satisfiability...