cda-tum / mqt-core

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

Layer: Allow Redundant Gates #655

Closed ystade closed 1 month ago

ystade commented 1 month ago

Description

Previously, the Layer.hpp class implicitly assumed that the circuit is fully reduced, i.e., redundant gates are removed. The new behaviour is to create new layer group for a gate that is already present in the current group, i.e., to handle them in the same way as they would not commute with the current group. Hence, every gate in a group is unique with respect its type and the qubits it is operating on.

Checklist:

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 91.6%. Comparing base (aa3b3bd) to head (020ca57).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655/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/655?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 #655 +/- ## ===================================== Coverage 91.6% 91.6% ===================================== Files 148 148 Lines 14759 14773 +14 Branches 2370 2370 ===================================== + Hits 13526 13546 +20 + Misses 1233 1227 -6 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655/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/655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `91.4% <100.0%> (+<0.1%)` | :arrow_up: | | [python](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655/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](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [...nclude/mqt-core/datastructures/UndirectedGraph.hpp](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655?src=pr&el=tree&filepath=include%2Fmqt-core%2Fdatastructures%2FUndirectedGraph.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-aW5jbHVkZS9tcXQtY29yZS9kYXRhc3RydWN0dXJlcy9VbmRpcmVjdGVkR3JhcGguaHBw) | `100.0% <100.0%> (+9.2%)` | :arrow_up: | | [src/datastructures/Layer.cpp](https://app.codecov.io/gh/cda-tum/mqt-core/pull/655?src=pr&el=tree&filepath=src%2Fdatastructures%2FLayer.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL2RhdGFzdHJ1Y3R1cmVzL0xheWVyLmNwcA==) | `93.4% <100.0%> (+0.6%)` | :arrow_up: |