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

Compiler Top-Down Integration #49

Closed KevinMTO closed 1 month ago

KevinMTO commented 1 month ago

Description

This PR integrates the compiler in fully automated fashion from the circuit to the simulations results.

Checklist:

KevinMTO commented 1 month ago

@burgholzer I think pre-commit still changes x = x@y into x@=y which is not supported in older versions and it messes up with the code :/ Can we fix that?:) Or can you point me to resources? Thanks!

burgholzer commented 1 month ago

@burgholzer I think pre-commit still changes x = x@y into x@=y which is not supported in older versions and it messes up with the code :/

Can we fix that?:) Or can you point me to resources? Thanks!

Yeah. Update the versions that do not support it to versions that support it 😉

Edit: or, in cases where it really does not seem valid, place a corresponding "# noqa: " directive on the respective lines.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 74.36620% with 182 lines in your changes missing coverage. Please review.

Project coverage is 80.9%. Comparing base (a65af54) to head (670f4f2). Report is 1 commits behind head on main.

Files Patch % Lines
...er/twodit/entanglement_qr/phy_ent_qr_cex_decomp.py 29.5% 31 Missing :warning:
...iational_twodit_compilation/layered_compilation.py 0.0% 22 Missing :warning:
...imulation/backends/fake_backends/fake_traps3six.py 68.3% 19 Missing :warning:
src/mqt/qudits/compiler/dit_compiler.py 67.2% 18 Missing :warning:
src/mqt/qudits/core/lanes.py 86.3% 13 Missing :warning:
...n_aware_transpilation/log_local_adaptive_decomp.py 20.0% 12 Missing :warning:
src/mqt/qudits/quantum_circuit/circuit.py 35.2% 11 Missing :warning:
...g_aware_transpilation/phy_local_adaptive_decomp.py 9.0% 10 Missing :warning:
...riational_twodit_compilation/ansatz/instantiate.py 53.3% 7 Missing :warning:
...ping_un_aware_transpilation/log_local_qr_decomp.py 14.2% 6 Missing :warning:
... and 15 more
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49/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/49?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 #49 +/- ## ======================================= + Coverage 72.7% 80.9% +8.1% ======================================= Files 108 104 -4 Lines 5370 4372 -998 Branches 262 0 -262 ======================================= - Hits 3907 3537 -370 + Misses 1463 835 -628 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49/flags?src=pr&el=flag&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/49/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `80.9% <74.3%> (+8.5%)` | :arrow_up: | | [Files](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [src/mqt/qudits/compiler/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvX19pbml0X18ucHk=) | `100.0% <100.0%> (ø)` | | | [...er/compilation\_minitools/numerical\_ansatz\_utils.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fcompilation_minitools%2Fnumerical_ansatz_utils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvY29tcGlsYXRpb25fbWluaXRvb2xzL251bWVyaWNhbF9hbnNhdHpfdXRpbHMucHk=) | `54.5% <100.0%> (+36.3%)` | :arrow_up: | | [...qt/qudits/compiler/naive\_local\_resynth/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fnaive_local_resynth%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvbmFpdmVfbG9jYWxfcmVzeW50aC9fX2luaXRfXy5weQ==) | `100.0% <100.0%> (ø)` | | | [...dits/compiler/naive\_local\_resynth/local\_resynth.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?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) | `100.0% <100.0%> (ø)` | | | [src/mqt/qudits/compiler/onedit/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fonedit%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvb25lZGl0L19faW5pdF9fLnB5) | `100.0% <100.0%> (ø)` | | | [...iler/onedit/local\_phases\_transpilation/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Fonedit%2Flocal_phases_transpilation%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvb25lZGl0L2xvY2FsX3BoYXNlc190cmFuc3BpbGF0aW9uL19faW5pdF9fLnB5) | `100.0% <100.0%> (ø)` | | | [src/mqt/qudits/compiler/twodit/blocks/crot.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fblocks%2Fcrot.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L2Jsb2Nrcy9jcm90LnB5) | `95.0% <100.0%> (ø)` | | | [src/mqt/qudits/compiler/twodit/blocks/czrot.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fblocks%2Fczrot.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L2Jsb2Nrcy9jenJvdC5weQ==) | `100.0% <100.0%> (ø)` | | | [...qudits/compiler/twodit/entanglement\_qr/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fentanglement_qr%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L2VudGFuZ2xlbWVudF9xci9fX2luaXRfXy5weQ==) | `100.0% <100.0%> (ø)` | | | [.../variational\_twodit\_compilation/ansatz/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree&filepath=src%2Fmqt%2Fqudits%2Fcompiler%2Ftwodit%2Fvariational_twodit_compilation%2Fansatz%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xdWRpdHMvY29tcGlsZXIvdHdvZGl0L3ZhcmlhdGlvbmFsX3R3b2RpdF9jb21waWxhdGlvbi9hbnNhdHovX19pbml0X18ucHk=) | `100.0% <100.0%> (ø)` | | | ... and [34 more](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | | ... and [17 files with indirect coverage changes](https://app.codecov.io/gh/cda-tum/mqt-qudits/pull/49/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)