code: def program_unitary(program, n_qubits):
      
      umat = np.eye(2 ** n_qubits)
      for instruction in program:
          if isinstance(instruction, Gate):
              unitary = lifted_gate(gate=instruction, n_qubits=n_qubits)
              umat = unitary.dot(umat)
          else:
              raise ValueError("Can only compute program unitary for programs composed of `Gate`s")
      return umat
docs: Return the unitary of a pyQuil program.
  
      :param program: A program consisting only of :py:class:`Gate`.:
      :return: a unitary corresponding to the composition of the program's gates.