supergrad.scgraph.SCGraph.convert_graph_to_parameters_haiku#
- SCGraph.convert_graph_to_parameters_haiku(share_params=False, unify_coupling=False, only_device_params=False)[source]#
Convert a networkX graph to Haiku’s parameters dictionary.
- Parameters:
share_params (bool) – If True, two sets of parameters will be shared according to the shared_param_mark attribute in the graph. This means that the shared parameters will remain the same during optimization. First, qubits with the same shared_param_mark will have their parameters shared. Second, the coupling strengths between qubits of type i and j are shared for all such pairs.
unify_coupling (bool) – all coupling sharing the same parameters. Valid only if share_params is True.
only_device_params (bool) – whether to only load device parameters.