  We describe a new method to compute general cubature formulae. The problem is
initially transformed into the computation of truncated Hankel operators with
flat extensions. We then analyse the algebraic properties associated to flat
extensions and show how to recover the cubature points and weights from the
truncated Hankel operator. We next present an algorithm to test the flat
extension property and to additionally compute the decomposition. To generate
cubature formulae with a minimal number of points, we propose a new relaxation
hierarchy of convex optimization problems minimizing the nuclear norm of the
Hankel operators. For a suitably high order of convex relaxation, the minimizer
of the optimization problem corresponds to a cubature formula. Furthermore
cubature formulae with a minimal number of points are associated to faces of
the convex sets. We illustrate our method on some examples, and for each we
obtain a new minimal cubature formula.
