code: def do_gate_matrix(self, matrix: np.ndarray, qubits: Sequence[int]):
          
          unitary = lifted_gate_matrix(matrix, list(qubits), n_qubits=self.n_qubits)
          self.wf = unitary.dot(self.wf)
          return self
docs: Apply an arbitrary unitary; not necessarily a named gate.
  
          :param matrix: The unitary matrix to apply. No checks are done.
          :param qubits: The qubits to apply the unitary to.
          :return: ``self`` to support method chaining.