def METHOD_NAME(opt: NDArray[Any]) -> NDArray[Any]:
    r"""
    Returns the PTM vector representation of an operator.
    :math:`\mathcal{L}(\mathcal{H}_{2^n})\ni \mathtt{opt}\rightarrow
    |\mathtt{opt}\rangle\!\rangle\in \mathcal{H}_{4^n}`.
    Args:
        opt: A square matrix representing an operator.
    Returns:
        A Pauli transfer matrix (PTM) representation of the operator.
    """
    # vector i-th entry is math:`d^{-1/2}Tr(oP_i)`
    # where P_i is the i-th Pauli matrix
    if not (len(opt.shape) == 2 and opt.shape[0] == opt.shape[1]):
        raise TypeError("Input must be a square matrix")
    num_qubits = int(np.log2(opt.shape[0]))
    opt_vec = []
    for pauli_combination in product(PAULIS, repeat=num_qubits):
        kron_product = kronecker_product(pauli_combination)
        opt_vec.append(
            np.trace(opt @ kron_product) * np.sqrt(1 / 2**num_qubits)
        )
    return np.array(opt_vec)