locations. For the sphere packing problem this works very well, where in ${\mathbb{R}}^{24}$ it leads to a density upper bound that is sharp to within a factor $1 + 10^{-51}$ of the optimal configuration [@CM]. We have also tried this approach for the optimization problems in this paper, but this did not work very well because the optimal functions seem to have very few real roots, which produces a strange effect in the numerical computations, where the last forced root tends to diverge when you increase the degree of the polynomial[^2]. Instead we use sum-of-squares characterizations and semidefinite programming, as was done in [@dLOV] for the binary sphere packing problem.

*Semidefinite programming* is the optimization of a linear functional over the intersection of a cone of positive semidefinite matrices (real symmetric matrices with nonnegative eigenvalues) and an affine space. A semidefinite program is often given in block form, which can be written as $$\begin{aligned}
\text{minimize} \; \sum_{i=1}^I \mathrm{tr}(X_iC_i) : \; & \sum_{i=1}^I \mathrm{tr}(X_iA_{i,j}) = b_j \text{ for } j \in [m],\\
& \,X_1,\ldots,X_I \in \mathbb R^{n \times n} \text{ positive semidefinite},\end{aligned}$$ where $I\in {\mathbb{N}}$ gives the number of blocks, $\{C_i\} \subseteq {\mathbb{R}}^{n \times n}$ is the objective, and $\{A_{i,j}\} \subseteq 