Gravity resonance spectroscopy constrains dark energy and dark matter scenarios.
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×108 at 95% confidence level (C.L.), and an attractive (repulsive) dark matter axionlike spin-mass coupling is excluded for the coupling strength gsgp>3.7×10-16 (5.3×10-16) at a Yukawa length of λ=20  μm (95% C.L.).