code: def lifted_gate(gate: Gate, n_qubits: int):
      
      if len(gate.params) > 0:
          matrix = QUANTUM_GATES[gate.name](*gate.params)
      else:
          matrix = QUANTUM_GATES[gate.name]
  
      return lifted_gate_matrix(matrix=matrix,
                                qubit_inds=[q.index for q in gate.qubits],
                                n_qubits=n_qubits)
docs: Lift a pyquil :py:class:`Gate` in a full ``n_qubits``-qubit Hilbert space.
  
      This function looks up the matrix form of the gate and then dispatches to
      :py:func:`lifted_gate_matrix` with the target qubits.
  
      :param gate: A gate
      :param n_qubits: The total number of qubits.
      :return: A 2^n by 2^n lifted version of the gate acting on its specified qubits.