Inverse of MCX gates generated without qubits for ancillae #4953
Labels
bug
Something isn't working
stable backport potential
The bug might be minimal and/or import enough to be port to stable
Information
What is the current behavior?
Inverting an mcx gate (with ancilla) falls back to
ControlledGate.inverse
which builds the definition of the inverse gate without ancilla. This leads to an error when transpiling because the inverse gate uses fewer qubits than the original.Steps to reproduce the problem
Suggested solutions
Adding something to
class MCXGate
likeThe text was updated successfully, but these errors were encountered: