format_qca_term function

Format a single QCA term