-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Information
- Qiskit Terra version: 0.18
- Python version: 3.9.5
- Operating system: mac
What is the current behavior?
Calling the inverse
method of a conditional X gate returns an unconditional X gate.
Steps to reproduce the problem
What is the expected behavior?
I'd expect the inverse of a conditional gate to have the same condition.
That way, for instance, x.c_if(bit, 1)
immediately followed by its inverse operation would produce the identity, as one would expect for an inverse.
Suggested solutions
Assuming it's the desired behavior, could have inverse
copy the condition from the original gate to the inverse gate before returning it.
garrison
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working