Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1803 +/- ##
==========================================
- Coverage 99.51% 99.43% -0.09%
==========================================
Files 79 79
Lines 13274 13295 +21
==========================================
+ Hits 13210 13220 +10
- Misses 64 75 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I would suggest avoiding creating yet another gate that is controlled by default. This can be avoided by using the I am suggesting this because all gates that are controlled by default qibo/src/qibo/gates/abstract.py Line 35 in 91fb509 already generate secondary issues as is, e.g. Transpilation issues, gate-counting issues. Since these gates would have to be refactored anyway, it would be better not to increase the number of gates controlled by default. There are some rules to deal with edge cases in the qibo/src/qibo/models/_openqasm.py Line 115 in 91fb509 Oner rule for the CSWAP from qasm strings could be added there to be converted to a qibo SWAP with one control, and the import issue would be solved without having to create another gate class.
|
Checklist:
This draft aims to address #
In this PR I created a
CSWAPgate.While this automatically fixes the issue #1802, it feels just a copy-paste of the code in
gates.py.In alternative, the qasm parser can detect controlled gates and instantiate them.