cimod.utils
#
Submodules#
Package Contents#
Functions#
|
|
|
get converted state and energy. |
- cimod.utils.get_state_and_energy(model, result_state, offset=0, model_variables=[]) tuple[dict, float] [source]#
get converted state and energy. This function receives raw array of spins or binaries. If vartype of model and the vartype of the raw array are different, the raw array is automatically converted to the vartype of model with any offset shift.
- Parameters:
- Returns:
labeled states and corresponding energy
- Return type:
Examples: