iqm.benchmarks.optimization.qscore.create_objective_function#
- iqm.benchmarks.optimization.qscore.create_objective_function(counts: Dict[str, int], graph: Graph, qubit_to_node: Dict[int, int], virtual_nodes: List[Tuple[int, int]]) Callable #
Creates a function that maps the parameters to the parametrized circuit, runs it and computes the expectation value.
- Parameters:
- Returns:
function that gives expectation value of the cut edges from counts sampled from the ansatz
- Return type:
callable