Quantum theory of matter