qubosolver.analysis
qubosolver.analysis
Free functions for analysing QUBO solutions.
Converts one or more Solution objects into a unified
pandas.DataFrame, for filtering, comparing, and summarizing solver outputs.
Functions:
-
to_dataframeβConvert one or more
Solutioninto a single, unifiedpandas.DataFrame.
to_dataframe
to_dataframe(solutions: Sequence[Solution], *, labels: Sequence[str] | Literal['auto'] = 'auto') -> pd.DataFrame
Convert one or more Solution into a single, unified pandas.DataFrame.
The resulting pandas.DataFrame can be used for filtering, sorting, and analysis.
Parameters:
-
solutions(Sequence[Solution]) βA sequence of
Solution. -
labels(Sequence[str] | Literal['auto'], default:'auto') βOne label per solution used to identify each group in the
pandas.DataFrame. Defaults to"0","1", β¦ when"auto".
Returns:
-
pd.DataFrameβThe concatenated
pandas.DataFramecontaining all solutions.
Raises:
-
ValueErrorβIf the number of labels does not match the number of solutions.