def _build_by_code(mat: np.ndarray) -> list[str]:
    """Transforms a matrix of Booleans into a list of Pauli strings.

    Takes into input a matrix of Boolean interpreted as row-vectors, each having dimension 2 * n.
    The matrix is converted into another matrix with as many rows, but this time the vectors
    contain the letters I, X, Y, and Z representing Pauli operators.

    Args:
        mat: The input matrix of Booleans.

    Returns:
        A list of Pauli strings.
    """
    out = []
    n = mat.shape[1] // 2
    for i in range(mat.shape[0]):
        ps = ''
        for j in range(n):
            k = 2 * mat[i, j + n] + mat[i, j]
            ps += "IXZY"[k]
        out.append(ps)
    return out
Transforms a matrix of Booleans into a list of Pauli strings.

    Takes into input a matrix of Boolean interpreted as row-vectors, each having dimension 2 * n.
    The matrix is converted into another matrix with as many rows, but this time the vectors
    contain the letters I, X, Y, and Z representing Pauli operators.

    Args:
        mat: The input matrix of Booleans.

    Returns:
        A list of Pauli strings.
    
examples/stabilizer_code.py