Result#
- class Result(state: TState, samples: List[Tuple[TNum, ...]] | None = None)#
Class for collecting results.
- Parameters:
- to_subgraph_nodes() List[List[int]] #
Convert samples to subgraph modes.
Assuming that a graph’s adjacency matrix is embedded into the circuit, the samples from particle number measurement naturally favor dense subgraphs. The samples could be converted to subgraph modes using this method.
The resulting subgraph node indices correspond to the indices in the adjacency matrix.
Only meaningful for discrete samples generated by
ParticleNumberMeasurement
.References