qml.matrix on qml.exp fails when the base operator skips wires and the coefficient is trainable
qml.matrix on qml.exp fails when the base operator skips wires and the coefficient is trainable: a task in MiMo-V2.6-RL-harbor-code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). I'm building a parameterized exponential of a multi-qubit Pauli string and trying to grab its matrix representation. As…
The task
I'm building a parameterized exponential of a multi-qubit Pauli string and trying to grab its matrix representation. As soon as the tensor product has a "gap" in the wires it acts on (e.g. wires 0, 1, 4 but nothing on 2 and 3), and the coefficient is a trainable autograd array, `qml.matrix` blows up.
Part of FineEnvs/MiMo-V2.6-RL-harbor-code.