ternary_quant
