catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Using both qml.ctrl and qml.adjoint causes named operations to execute as matrix operations

Open jzaia18 opened this issue 6 months ago • 0 comments

Running the following circuit:

def small_circ():
    op = qml.T(0)
    op = qml.adjoint(op)
    op = qml.ctrl(op, control=1, control_values=[1])

    return qml.state()

using null.qubit as the device executes a matrix operation instead of the named gate. Removing either the adjoint or the controlled makes the gate named again (and applies a T gate with either inverse=True or control_wires having data), but the presence of both makes it a matrix op and not a named op.

jzaia18 avatar Apr 16 '25 15:04 jzaia18