def METHOD_NAME(self, args: 'cirq.ApplyUnitaryArgs'):
    if isinstance(self.exponent, sympy.Basic):
        return NotImplemented
    n = int(np.prod([args.target_tensor.shape[k] for k in args.axes], dtype=np.int64))
    for i in range(n):
        p = 1j ** (4 * i / n * self.exponent)
        args.target_tensor[args.subspace_index(big_endian_bits_int=i)] *= p
    return args.target_tensor