dwave.cloud.solver.StructuredSolver.reformat_parameters#
- static StructuredSolver.reformat_parameters(vartype: _Vartype, parameters: MutableMapping[str, Any], properties: Mapping[str, Any], inplace: bool = False) MutableMapping[str, Any][source]#
Reformat some solver parameters for SAPI.
Currently the only reformatted parameter is
initial_state. This method allowsinitial_stateto be submitted as a dictionary mapping the qubits to their initial value.- Parameters:
vartype – One of
'ising'or'qubo'. Ifdimodis installed, this can also be anyVartypeLike.parameters – The parameters to submit to this solver.
properties – The solver’s properties. Either
StructuredSolver.propertiesordwave.systems.DWaveSampler.propertiescan be provided.inplace – Whether to modify the
parametersin-place or return a copy.
- Returns:
The reformatted solver parameters. If
inplaceis true the modifiedparametersis returned. Ifinplaceis false then a deep copy ofparameterswith the relevant fields updated is returned.