cda-tum / mqt-qudits

A Framework For Mixed-Dimensional Qudit Quantum Computing
https://mqt.readthedocs.io/projects/qudits
MIT License
17 stars 4 forks source link

Quantum Week Tutorial Related Improvements #53

Closed KevinMTO closed 4 weeks ago

KevinMTO commented 1 month ago

Description

This PR fixes bugs and code code usability issues along the compilation side of the stack. New compilation methods have been added for the default selection of compilation flags.

Checklist:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 35.29412% with 88 lines in your changes missing coverage. Please review.

Project coverage is 75.7%. Comparing base (590d98f) to head (e081295). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/mqt/qudits/simulation/backends/innsbruck_01.py 29.0% 39 Missing :warning:
src/mqt/qudits/compiler/dit_compiler.py 44.7% 21 Missing :warning:
...er/twodit/entanglement_qr/phy_ent_qr_cex_decomp.py 13.3% 13 Missing :warning:
...er/compilation_minitools/naive_unitary_verifier.py 18.1% 9 Missing :warning:
src/mqt/qudits/quantum_circuit/circuit.py 25.0% 6 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53/graphs/tree.svg?width=650&height=150&src=pr&token=qDDZkemicI&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) ```diff @@ Coverage Diff @@ ## main #53 +/- ## ======================================= - Coverage 76.4% 75.7% -0.7% ======================================= Files 117 118 +1 Lines 6123 6242 +119 Branches 279 279 ======================================= + Hits 4679 4731 +52 - Misses 1444 1511 +67 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [cpp](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `63.7% <ø> (ø)` | | Carriedforward from [f62929d](https://app.codecov.io/gh/cda-tum/mqt-qudits/commit/f62929d5a538f0e2e203f7fb0be3ab85ee8efeec?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | | [python](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `79.9% <35.2%> (-1.0%)` | :arrow_down: | | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) to find out more. | [Files with missing lines](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [...dits/compiler/naive\_local\_resynth/local\_resynth.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fnaive_local_resynth%2Flocal_resynth.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvbmFpdmVfbG9jYWxfcmVzeW50aC9sb2NhbF9yZXN5bnRoLnB5) | `95.1% <100.0%> (+0.6%)` | :arrow_up: | | [...g\_aware\_transpilation/phy\_local\_adaptive\_decomp.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fonedit%2Fmapping_aware_transpilation%2Fphy_local_adaptive_decomp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvb25lZGl0L21hcHBpbmdfYXdhcmVfdHJhbnNwaWxhdGlvbi9waHlfbG9jYWxfYWRhcHRpdmVfZGVjb21wLnB5) | `78.0% <ø> (ø)` | | | [...er/twodit/entanglement\_qr/log\_ent\_qr\_cex\_decomp.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fentanglement_qr%2Flog_ent_qr_cex_decomp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L2VudGFuZ2xlbWVudF9xci9sb2dfZW50X3FyX2NleF9kZWNvbXAucHk=) | `85.4% <100.0%> (ø)` | | | [src/mqt/qudits/simulation/backends/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fsimulation%2Fbackends%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvc2ltdWxhdGlvbi9iYWNrZW5kcy9fX2luaXRfXy5weQ==) | `100.0% <100.0%> (ø)` | | | [src/mqt/qudits/simulation/qudit\_provider.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fsimulation%2Fqudit_provider.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvc2ltdWxhdGlvbi9xdWRpdF9wcm92aWRlci5weQ==) | `55.8% <100.0%> (ø)` | | | [src/mqt/qudits/quantum\_circuit/circuit.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fquantum_circuit%2Fcircuit.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvcXVhbnR1bV9jaXJjdWl0L2NpcmN1aXQucHk=) | `89.3% <25.0%> (-2.4%)` | :arrow_down: | | [...er/compilation\_minitools/naive\_unitary\_verifier.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fcompilation_minitools%2Fnaive_unitary_verifier.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvY29tcGlsYXRpb25fbWluaXRvb2xzL25haXZlX3VuaXRhcnlfdmVyaWZpZXIucHk=) | `81.3% <18.1%> (-14.5%)` | :arrow_down: | | [...er/twodit/entanglement\_qr/phy\_ent\_qr\_cex\_decomp.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fentanglement_qr%2Fphy_ent_qr_cex_decomp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L2VudGFuZ2xlbWVudF9xci9waHlfZW50X3FyX2NleF9kZWNvbXAucHk=) | `25.8% <13.3%> (-5.4%)` | :arrow_down: | | [src/mqt/qudits/compiler/dit\_compiler.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fdit_compiler.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvZGl0X2NvbXBpbGVyLnB5) | `54.8% <44.7%> (-10.3%)` | :arrow_down: | | [src/mqt/qudits/simulation/backends/innsbruck\_01.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fsimulation%2Fbackends%2Finnsbruck_01.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvc2ltdWxhdGlvbi9iYWNrZW5kcy9pbm5zYnJ1Y2tfMDEucHk=) | `29.0% <29.0%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/53/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)