cda-tum / mqt-core

MQT Core - The Backbone of the Munich Quantum Toolkit
https://mqt.readthedocs.io/projects/core
MIT License
62 stars 31 forks source link

🚸 Allow creating circuits from compound operations #690

Closed burgholzer closed 2 months ago

burgholzer commented 2 months ago

Description

This PR adds functionality to construct circuits from compound operations. In the process, it also improves the QASM dumping functionality by making it const. Last, but not least, it refactors the corresponding IO tests to use more convenient interfaces that are now available.

Fixes #600

Checklist:

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.1%. Comparing base (bcb8371) to head (ace3312). Report is 7 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690/graphs/tree.svg?width=650&height=150&src=pr&token=MqstsRKdqp&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-core/pull/690?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 #690 +/- ## ===================================== Coverage 92.1% 92.1% ===================================== Files 125 125 Lines 13780 13790 +10 Branches 2153 2154 +1 ===================================== + Hits 12692 12704 +12 + Misses 1088 1086 -2 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690/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-core/pull/690/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `91.8% <100.0%> (+<0.1%)` | :arrow_up: | | [python](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `99.7% <ø> (ø)` | | | [Files with missing lines](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [include/mqt-core/ir/QuantumComputation.hpp](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690?src=pr&el=tree&filepath=include%2Fmqt-core%2Fir%2FQuantumComputation.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-aW5jbHVkZS9tcXQtY29yZS9pci9RdWFudHVtQ29tcHV0YXRpb24uaHBw) | `91.9% <100.0%> (-0.6%)` | :arrow_down: | | [src/ir/Permutation.cpp](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690?src=pr&el=tree&filepath=src%2Fir%2FPermutation.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL2lyL1Blcm11dGF0aW9uLmNwcA==) | `100.0% <100.0%> (ø)` | | | [src/ir/QuantumComputation.cpp](https://app.codecov.io/gh/cda-tum/mqt-core/pull/690?src=pr&el=tree&filepath=src%2Fir%2FQuantumComputation.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL2lyL1F1YW50dW1Db21wdXRhdGlvbi5jcHA=) | `85.0% <100.0%> (+0.6%)` | :arrow_up: |