def evaluate(backend_str: str, prog: QuantumCircuit, shots: int, b: str) -> Any:
    quantum_state = get_statevector(prog)
    backend = Aer.get_backend(backend_str)
    results = execute(prog, backend, shots=shots).result()
    counts = results.get_counts()
    a = Counter(counts).most_common(1)[0][0][::(- 1)]
    return {'measurements': counts, 'quantum_state': quantum_state, 'a': a, 'b': b}
def evaluate(backend_str: str, prog: QuantumCircuit, shots: int, b: str) -> Any:
    quantum_state = get_statevector(prog)
    backend = Aer.get_backend(backend_str)
    results = execute(prog, backend, shots=shots).result()
    counts = results.get_counts()
    a = Counter(counts).most_common(1)[0][0][::(- 1)]
    return {'measurements': counts, 'quantum_state': quantum_state, 'a': a, 'b': b}