  We introduce a novel quadratic unconstrained binary optimization (QUBO)
formulation for a classical problem in electrical engineering -- the optimal
reconfiguration of distribution grids. For a given graph representing the grid
infrastructure and known nodal loads, the problem consists in finding the
spanning tree that minimizes the total link ohmic losses. A set of constraints
is initially defined to impose topologically valid solutions. These constraints
are then converted to a QUBO model as penalty terms. The electrical losses
terms are finally added to the model as the objective function to minimize. In
order to maximize the performance of solution searching with classical solvers,
with hybrid quantum-classical solvers and with quantum annealers, our QUBO
formulation has the goal of being very efficient in terms of variables usage. A
standard 33-node test network is used as an illustrative example of our general
formulation. Model metrics for this example are presented and discussed.
Finally, the optimal solution for this example was obtained and validated
through comparison with the optimal solution from an independent method.
