result = execute(circuit, backend=simulator)
plot_histogram(result.get_counts(circuit))
I used the above code to plot a histogram for a simple entanglement circuit. I got the error mentioned below. I am running the code in google collab.
AttributeError: 'AerJob' object has no attribute 'get_counts'