[WIP] Add UnitarySynthesis transpiler pass to C API #14740
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This commit adds a standalone transpiler pass function to the C API for
running the UnitarySynthesis transpiler pass. This pass mutates a dag
in place and updates the provided circuit pointer with the newly
generated circuit. Right now the pass doesn't support >= 3q unitaries,
targets that would rely on the XX decomposer, or have the unitary
synthesis plugin interface that exists in Python. The first two could be
fixed if/when those synthesis algorithms are ported to C, but the plugin
interface will need some thought to think about how to expose that via
the C FFI, it will certainly be different/distinct from the Python
interface but some discovery and design will be needed to come up with a
reasonable interface to make unitary synthesis pluggable from C.
Details and comments
Fixes #14451
This depends on #14732 and will need to be rebased after that PR merges. In the meantime you can look at the HEAD commit to see the contents of this PR: 2524561
TODO: