Optimize for circuit size
The IBM challenge scores the total circuit size and not the depth. The approach for the compiler is thus slightly different.
We will use the 4-approximation algorithm given in https://arxiv.org/abs/1602.05150 initially. It applies to general graphs and achieves a 2-approximation on trees (thus subsuming previous 2-approximation results on trees). We can later look for results on grids, since I have found none.
Edited by Eddie Schoute