def expectation_value(state, operator):
    """
    Calculates the expectation value of a superoperator for a quantum state.

    Parameters
    ----------
    state: np.ndarray
        Vectorised density matrix of a quantum state.
    operator: list of np.array
        Quantum superoperator.
    """

    return sum((state.conj().T @ operator @ state).diagonal())