code: def run(self, ket: State) -> 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)
docs: Apply the action of this gate upon a state