CQCL / hugr

Hierarchical Unified Graph Representation for quantum and classical programs
https://crates.io/crates/hugr
Apache License 2.0
18 stars 5 forks source link

feat(hugr-py): add builders for Conditional and TailLoop #1210

Closed ss2165 closed 3 months ago

ss2165 commented 3 months ago

Closes #1204

Including a short hand for if/else style conditionals

Includes some other simplifications and refactors, reccommend going commit by commit

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.47577% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.88%. Comparing base (f7ea178) to head (4b5cd90).

Files Patch % Lines
hugr-py/src/hugr/_ops.py 95.65% 4 Missing :warning:
hugr-py/src/hugr/_cond_loop.py 97.10% 2 Missing :warning:
hugr-py/src/hugr/_dfg.py 95.23% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1210 +/- ## ========================================== + Coverage 86.73% 86.88% +0.14% ========================================== Files 97 98 +1 Lines 18351 18530 +179 Branches 16827 16827 ========================================== + Hits 15917 16099 +182 + Misses 1660 1657 -3 Partials 774 774 ``` | [Flag](https://app.codecov.io/gh/CQCL/hugr/pull/1210/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/CQCL/hugr/pull/1210/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | `91.30% <96.47%> (+1.21%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ss2165 commented 3 months ago

Docstrings will be added before the tracking issue is closed: https://github.com/CQCL/hugr/issues/486