Seol mar théacs é seo: Discrete circuit optimization