We report on precision resonance spectroscopy measurements of quantum states of ultracold neutrons confined above the surface of a horizontal mirror by the gravity potential of Earth. Resonant transitions between several of the lowest quantum states are observed for the first time. These measurements demonstrate that Newton's inverse square law of gravity is understood at micron distances on an energy scale of 10 −14 eV. At this level of precision, we are able to provide constraints on any possible gravitylike interaction. In particular, a dark energy chameleon field is excluded for values of the coupling constant β > 5.8 × 10 8 at 95% confidence level (C.L.), and an attractive (repulsive) dark matter axionlike spin-mass coupling is excluded for the coupling strength g s g p > 3.7 × 10 −16 (5.3 × 10 −16 ) at a Yukawa length of λ ¼ 20 μm (95% C.L.). DOI: 10.1103/PhysRevLett.112.151105 PACS numbers: 04.80.Cc, 14.80.Va, 29.30.Hs, 95.36.+x Experiments that rely on frequency measurements can be performed with incredibly high precision. One example is Rabi spectroscopy, a resonance spectroscopy technique to measure the energy eigenstates of quantum systems. It was originally developed by Rabi to measure the magnetic moment of molecules [1]. Today, resonance spectroscopy techniques are applied in various fields of science and medicine including nuclear magnetic resonance, masers, and atomic clocks. These methods have opened up the field of low-energy particle physics with studies of particle properties and their fundamental interactions and symmetries. In an attempt to investigate gravity at short distances, we applied the concept of resonance spectroscopy to quantum states of very slow neutrons in Earth's gravity potential [2]. Here, we present the first precision measurements of gravitational quantum states with this method that we refer to as gravity resonance spectroscopy (GRS). The strength of GRS is that it does not rely on electromagnetic interactions. The use of neutrons as test particles bypasses the electromagnetic background induced by van der Waals and Casimir forces and other polarizability effects.Within this work, we link these new measurements to dark matter and dark energy searches. Observational cosmology has determined the dark matter and dark energy density parameters to an accuracy of 2 significant figures [3]. While dark energy explains the accelerated expansion of the universe, dark matter is needed in order to describe the rotation curves of galaxies and the large-scale structure of the universe. The true nature of dark energy and the content of dark matter remain a mystery, however. The two most obvious candidates for dark energy are either Einstein's cosmological constant [4] or quintessence theories [5,6], where the dynamic vacuum energy changes over time. The resonant frequencies of our quantum states are intimately related to these models. If some as yet undiscovered dark matter or dark energy particles interact with neutrons, this should result in a measurable energy shift of the obser...