Apply the action of this gate upon a state

def run(self, ket: State) -> State:
        """Apply the action of this gate upon a state"""
        qubits = self.qubits
        indices = [ket.qubits.index(q) for q in qubits]
        tensor = bk.tensormul(self.tensor, ket.tensor, indices)
        return State(tensor, ket.qubits, ket.memory)