count_heavy_hitters_sampled¶
-
forest.benchmarking.quantum_volume.
count_heavy_hitters_sampled
(qc_results: Iterator[numpy.ndarray], heavy_hitters: Iterator[List[int]]) → Iterator[int]¶ Simple helper to count the number of heavy hitters sampled given the sampled results for a number of circuits along with the the actual heavy hitters for each circuit.
Parameters: - qc_results – results from running each circuit on a quantum computer.
- heavy_hitters – the heavy hitters for each circuit (presumably calculated through simulating the circuit classically)
Returns: the number of samples which were heavy for each circuit.