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

🚸 natively support `c3x`, `c3sqrtx`, and `c4x` gates from OpenQASM 2 #680

Closed burgholzer closed 2 months ago

burgholzer commented 2 months ago

Description

This PR adds native support to the QASM parser for three more OpenQASM 2.0 gates typically defined in the qelib1.inc file. Qiskit does a similar transformation for these gates when reading them in.

Checklist:

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 87.0%. Comparing base (28dc65e) to head (61771ef). Report is 2 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-core/pull/680/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/680?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 #680 +/- ## ===================================== Coverage 87.0% 87.0% ===================================== Files 125 125 Lines 13781 13781 Branches 2164 2164 ===================================== + Hits 11995 11999 +4 + Misses 1786 1782 -4 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-core/pull/680/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/680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `86.6% <ø> (+<0.1%)` | :arrow_up: | | [python](https://app.codecov.io/gh/cda-tum/mqt-core/pull/680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `99.7% <ø> (ø)` | | [see 1 file with indirect coverage changes](https://app.codecov.io/gh/cda-tum/mqt-core/pull/680/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)