Meet-in-the-middle quantum circuit synthesizer