format_qca_solution function

Format a QCA solution expression