  Motivated by uncertainty quantification of complex systems, we aim at finding
quadrature formulas of the form $\int_a^b f(x) d\mu(x) = \sum_{i=1}^n w_i
f(x_i)$ where $f$ belongs to $H^1(\mu)$. Here, $\mu$ belongs to a class of
continuous probability distributions on $[a, b] \subset \mathbb{R}$ and
$\sum_{i=1}^n w_i \delta_{x_i}$ is a discrete probability distribution on $[a,
b]$. We show that $H^1(\mu)$ is a reproducing kernel Hilbert space with a
continuous kernel $K$, which allows to reformulate the quadrature question as a
Bayesian (or kernel) quadrature problem. Although $K$ has not an easy closed
form in general, we establish a correspondence between its spectral
decomposition and the one associated to Poincar\'e inequalities, whose common
eigenfunctions form a $T$-system (Karlin and Studden, 1966). The quadrature
problem can then be solved in the finite-dimensional proxy space spanned by the
first eigenfunctions. The solution is given by a generalized Gaussian
quadrature, which we call Poincar\'e quadrature. We derive several results for
the Poincar\'e quadrature weights and the associated worst-case error. When
$\mu$ is the uniform distribution, the results are explicit: the Poincar\'e
quadrature is equivalent to the midpoint (rectangle) quadrature rule. Its nodes
coincide with the zeros of an eigenfunction and the worst-case error scales as
$\frac{b-a}{2\sqrt{3}}n^{-1}$ for large $n$. By comparison with known results
for $H^1(0,1)$, this shows that the Poincar\'e quadrature is asymptotically
optimal. For a general $\mu$, we provide an efficient numerical procedure,
based on finite elements and linear programming. Numerical experiments provide
useful insights: nodes are nearly evenly spaced, weights are close to the
probability density at nodes, and the worst-case error is approximately
$O(n^{-1})$ for large $n$.
