boschmitt / tweedledum

C++17 Library for analysis, compilation/synthesis, and optimization of quantum circuits
MIT License
97 stars 35 forks source link

ability to specify a timeout on exact synthesis #166

Open ajavadia opened 2 years ago

ajavadia commented 2 years ago

Is your feature request related to a problem? Please describe.

It is hard to know apriori how long a SAT-based or A*-based synthesis will take. Therefore a particular synthesis can get stuck for a long time, with no ability to skip it from e.g. an outer loop.

Describe the solution you'd like

A timeout argument could be used to cap the runtime, and raise a TimeoutError when it is hit. In that case the user can choose to fall back on heuristics.