-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining a custom gate called qft
in QASM apparently collides with qiskit QFT in v1.2
#13120
Comments
Indeed, as of #11463, the name However, despite having an explicit qasm test for qiskit/test/python/circuit/library/test_qft.py Lines 278 to 287 in 1962704
it seems that it still does not work as I've expected. First, in the above example, the qasm string
If the Second, the reconstructed circuit does not have any Third, we can probably remove this @jakelishman, @Cryoris, any pointers how to best resolve these issues? |
Update: we have discussed this problem between the developers, and (contrary to my previous comment) it is now fine to create custom gates called "qft". |
Environment
What is happening?
If I transpile this qasm:
then I get a
TranspilerError
:backtrace
If I rename the custom gate defined in the QASM file to
qft_
, then transpilation succeeds. It seems like the name of the custom gate is colliding with qiskit's built-in QFT gate? The error does not occur in version 1.1 of qiskit.How can we reproduce the issue?
QASM file contents, assume file is called
example.qasm
Python to reproduce with qiskit 1.2:
What should happen?
Transpilation should succeed and not be dependent on the name of the custom gate, if the gate name is a valid QASM identifier.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: