openqasm / qe-compiler

An MLIR based compiler dynamic circuit compiler for real-time control systems supporting OpenQASM 3
Other
38 stars 12 forks source link

Add ExtractCircuitsPass #284

Closed bcdonovan closed 4 months ago

bcdonovan commented 4 months ago

This PR adds a new ExtractCircuitsPass. This pass will walk the main function and extract quantum operations into quir.circuits. It is intended to be run after all reordering and merging has been completed. The pass currently requires --enable-circuits=true in order to have effect.

Circuit formation during QUIRGen has been deprecated. This form of circuit generation is now controlled by the --enable-circuits-from-qasm command line option.

mbhealy commented 4 months ago

Needs a merge with main. Reviewing now.

bcdonovan commented 4 months ago

Copyrights updated with def120c

I have also support for scf.while and expanded the unit test with 95d12e0. @mbhealy Is there any control flow operations we currently support that I have missed?

bcdonovan commented 4 months ago

@mbhealy This should be ready for your re-review.