QuantumBFS / YaoLang.jl

YaoLang: The next DSL for Yao and quantum programs.
https://yaoquantum.org/YaoLang.jl/dev/
Apache License 2.0
31 stars 6 forks source link

sink quantum statements in SSA block #44

Closed Roger-luo closed 4 years ago

Roger-luo commented 4 years ago

This PR lets YaoIR sink the quantum statements in each SSA block if the quantum statement is permutable with the following classical statements. This groups quantum statements into a larger contiguous statement which can be found in the new field quantum_blocks. The quantum blocks can then be further transformed as a whole pure quantum circuit component in the hybrid program (e.g circuit simplification pass)

Roger-luo commented 4 years ago

cc: @ChenZhao44 we could use this feature to implement hybrid program simplification later.