Tried executing plot_histogram(result.get_counts(circuit)) where result has the job result and circuit is the Quantum circuit

But an attribute error hits every time.

AttributeError: 'function' object has no attribute 'get_counts'

I tried going through the qiskit tutorial documentation, but couldn't help myself with it.

Can somebody point out what's wrong here?


It sounds like maybe one of the calls is missed. To get results you need to run

backend = Aer.get_backend('qasm_simulator')
job = execute(circ, backend)
result = job.result()
| improve this answer | |
  • 1
    $\begingroup$ Hey thanks fella. got it sorted out $\endgroup$ – Lalith Roshan Nov 1 '19 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.