def save_qconf_summary(self, qconf_summary):
            r"""
            This function is about save model's quant_state_map to a json file.
            """
            assert (
                qconf_summary is not None
            ), "A configure file name should be given to save the qconf_summary"
            quant_state_map = self._fqn_to_auto_quant_state_map
            # If user have given a json file, we will save the qconf_summary according to the user's setting,
            # otherwise,  we will first get a default_recipe, and then save the default_recipe's setting.
            if not hasattr(self, "_qconf_summary"):
                # compute scales and zero_point.
                attach_scale_zp_values_to_model(model)
                nodes = convert_quant_state_map_to_nodes(quant_state_map)
                # pooling and lstm's input and output should have same scale_zp.
                sync_pool_and_lstm_input_output_scale_zp(quant_state_map, nodes)
                get_default_recipe(nodes)
            else:
                if check_model_obsever_has_run(model):
                    # re-compute the scales and zp if user load a json file and re-do the calibration step.
                    attach_scale_zp_values_to_model(model)
                else:
                    # do nothing if user just loaded a json file and not re-do the calibration step
                    pass
            # Setting model qconf_summary attr which can be easily to check the whether the scale/zp has been computed.
            self._qconf_summary = qconf_summary
            save_quant_state(quant_state_map, qconf_summary)

            This function is about save model's quant_state_map to a json file.
            
intel_extension_for_pytorch/quantization/_quantize_utils.py