in source/src/molecule-unfolding/utility/QMUQUBO.py [0:0]
def __init__(self, mol_data, method, **param):
# prepare parameters
self.param = param
self.mol_data = mol_data
self.name = f"qmu_{self.mol_data.name}_model"
# init model_info to store the information for model of different methods
# init model_qubo to store the qubo for model of different methods
self.model_info = {}
self.model_qubo = {}
# define vars/var_rb_map/rb_var_map for different models
self.var = None
self.var_rb_map = None
self.rb_var_map = None
for mt in method:
self.model_info[f"{mt}"] = {}
self.model_qubo[f"{mt}"] = {}
if mt == "pre-calc":
logging.info(
"initial pre-calculate for constructing molecule QUBO")
for param in self.param[mt]["param"]:
self.model_info[mt][param] = set()
elif mt == "after-calc":
logging.info(
"initial after calculate for constructing molecule QUBO not implemented !!")
else:
logging.info(f"only pre-calculate(method='pre-calc') and after-calculate(method='after-calc') are supported, \
method {mt} not support !!")