In computational complexity theory, the complexity class PH is the union of all complexity classes in the polynomial hierarchy:
PH was first defined by . It is a special case of hierarchy of bounded alternating Turing machine. It is contained in P#P = PPP (by Toda's theorem; the class of problems that are decidable by a polynomial time Turing machine with access to a #P or equivalently PP oracle), and also in PSPACE.
PH has a simple logical characterization: it is the set of languages expressible by second-order logic.
PH contains almost all well-known complexity classes inside PSPACE; in particular, it contains P, NP, and co-NP. It even contains probabilistic classes such as BPP and RP. However, there is some evidence that BQP, the class of problems solvable in polynomial time by a quantum computer, is not contained in PH.
P = NP if and only if P = PH. This may simplify a potential proof of P ≠ NP, since it is only necessary to separate P from the more general class PH.