iqm.benchmarks.optimization.qscore.compute_expectation_value#
- iqm.benchmarks.optimization.qscore.compute_expectation_value(counts: Dict[str, int], graph: Graph, qubit_to_node: Dict[int, int], virtual_nodes: List[Tuple[int, int]]) float #
Computes expectation value based on measurement results.
- Parameters:
- Returns:
expectation value of the cut edges for number of counts
- Return type:
avg (float)