cda-tum / mqt-qcec

MQT QCEC - A tool for Quantum Circuit Equivalence Checking
https://mqt.readthedocs.io/projects/qcec
MIT License
90 stars 21 forks source link

Approximate equivalence checking #443

Open TeWas opened 1 month ago

TeWas commented 1 month ago

Description

Introducing approximate equivalence checking by computing the Frobenius inner product between 𝑈 and 𝑉 and comparing the result to a predefined threshold. This enhancement allows for a more flexible comparison that accounts for near-equivalent circuits. The DDAlternatingChecker and DDEquivalenceChecker have been adapted to incorporate this approach.

Fixes #442

Checklist:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.9%. Comparing base (119c781) to head (824e439). Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/checker/dd/DDEquivalenceChecker.cpp 87.5% 2 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443/graphs/tree.svg?width=650&height=150&src=pr&token=eKL7Ya7iep&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-qcec/pull/443?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 #443 +/- ## ======================================= - Coverage 96.0% 95.9% -0.1% ======================================= Files 39 39 Lines 1830 1841 +11 Branches 223 225 +2 ======================================= + Hits 1757 1767 +10 - Misses 73 74 +1 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443/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-qcec/pull/443/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `96.0% <93.1%> (-0.1%)` | :arrow_down: | | [python](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `95.8% <ø> (ø)` | | | [Files with missing lines](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443?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/Configuration.hpp](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443?src=pr&el=tree&filepath=include%2FConfiguration.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-aW5jbHVkZS9Db25maWd1cmF0aW9uLmhwcA==) | `0.0% <ø> (ø)` | | | [src/checker/dd/DDAlternatingChecker.cpp](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443?src=pr&el=tree&filepath=src%2Fchecker%2Fdd%2FDDAlternatingChecker.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL2NoZWNrZXIvZGQvRERBbHRlcm5hdGluZ0NoZWNrZXIuY3Bw) | `98.7% <100.0%> (+<0.1%)` | :arrow_up: | | [src/checker/dd/DDEquivalenceChecker.cpp](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/443?src=pr&el=tree&filepath=src%2Fchecker%2Fdd%2FDDEquivalenceChecker.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL2NoZWNrZXIvZGQvRERFcXVpdmFsZW5jZUNoZWNrZXIuY3Bw) | `94.8% <87.5%> (-0.7%)` | :arrow_down: |