added quantization_error method and the documentation have been revised