<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def su(self) -> 'Gate': """Convert gate tensor to the special unitary group."""

        rank = 2**self.qubit_nb
        U = asarray(self.asoperator())
        U /= np.linalg.det(U) ** (1/rank)
        return Gate(tensor=U, qubits=self.qubits)