r"""Return the Liouvillian super-operator associated with `H` and `Ls`

    The Liouvillian :math:`\mathcal{L}` generates the Markovian-dynamics of a
    system via the Master equation:

    .. math::
        \dot{\rho} = \mathcal{L}\rho
            = -i[H,\rho] + \sum_{j=1}^n \mathcal{D}[L_j] \rho

    Args:
        H (Operator): The associated Hamilton operator
        Ls (sequence or Matrix): A sequence of Lindblad operators.

    Returns:
        SuperOperator: The Liouvillian super-operator.

def liouvillian(H, Ls=None):
    r"""Return the Liouvillian super-operator associated with `H` and `Ls`

    The Liouvillian :math:`\mathcal{L}` generates the Markovian-dynamics of a
    system via the Master equation:

    .. math::
        \dot{\rho} = \mathcal{L}\rho
            = -i[H,\rho] + \sum_{j=1}^n \mathcal{D}[L_j] \rho

    Args:
        H (Operator): The associated Hamilton operator
        Ls (sequence or Matrix): A sequence of Lindblad operators.

    Returns:
        SuperOperator: The Liouvillian super-operator.
    """
    if Ls is None:
        Ls = []
    elif isinstance(Ls, Matrix):
        Ls = Ls.matrix.ravel().tolist()
    summands = [-I * commutator(H), ]
    summands.extend([lindblad(L) for L in Ls])
    return SuperOperatorPlus.create(*summands)