This project is mirrored from https://github.com/ornl-qci/qcor. Pull mirroring updated .
  1. 17 Nov, 2021 3 commits
  2. 15 Nov, 2021 2 commits
  3. 09 Nov, 2021 2 commits
  4. 03 Nov, 2021 2 commits
  5. 28 Oct, 2021 2 commits
  6. 27 Oct, 2021 2 commits
  7. 26 Oct, 2021 2 commits
  8. 22 Oct, 2021 1 commit
    • Nguyen, Thien's avatar
      Squashing all work to implement region-based OpenQASM3 modifier scope block · 1fe7e526
      Nguyen, Thien authored
      
      
      Descriptions: modifier (inv, ctrl, pow) Ops in the dialect has an associated (single-block) region. These ops have proper data flow tracking, i.e., subsequence quantum ops will take output of these modifier ops, not the wrapped instructions. The connection b/w the region-wrapped code and the op returns are handled by the quantum yield op (terminator for these modifier ops).
      
      Lowering/optimization:
      
      - If no optimization is required, these ops will be lowered to runtime (start/end) functions, identical to the current behavior. I need to separate part of this lowering (involves inlining the wrapped region into the parent region) to a individual pass, executed before the quantum-to-llvm dialect conversion b/c of some weird interactions with other dialect conversion patterns (e.g., qvs conversion) and type conversion. In some sense, when inlining the body, we are creating (cloning/copying) new MLIR Ops in the quantum dialect, so it needs to be executed before the whole quantum-to-llvm pass.
      
      - If optimization is turned on: when possible (e.g., the wrapped code only contains qvs ops), it will resolve the modifier at compile time: reverse gates for inv, derive the ctr-gates, rewrite pow->for loops.
      
      Modifiers that cannot be optimized will remain and  be handled by the lowering step above.
      
      Added tests. There is an edge case that this doesn't cover is compute-action. I retain the existing behavior by directly calling runtime functions. Hence, the SSA tracking in this use case is not reliable for optimization.
      Signed-off-by: Nguyen, Thien's avatarThien Nguyen <nguyentm@ornl.gov>
      1fe7e526
  9. 19 Oct, 2021 2 commits
  10. 13 Oct, 2021 2 commits
  11. 12 Oct, 2021 4 commits
  12. 11 Oct, 2021 4 commits
  13. 07 Oct, 2021 1 commit
  14. 24 Sep, 2021 1 commit
  15. 23 Sep, 2021 1 commit
  16. 22 Sep, 2021 8 commits
  17. 21 Sep, 2021 1 commit